Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mapping inside and outside of the element differently #3603

Closed
pjasiun opened this issue Mar 14, 2016 · 3 comments
Closed

Mapping inside and outside of the element differently #3603

pjasiun opened this issue Mar 14, 2016 · 3 comments
Assignees
Labels
intro Good first ticket. package:engine type:feature This issue reports a feature request (an idea for a new functionality or a missing option).
Milestone

Comments

@pjasiun
Copy link

pjasiun commented Mar 14, 2016

It should be possible to map differently inside and outside of the model element into the view element.

Now to create such structure:

<div data-widget contenteditable="false">
    <div data-mask></div>
    <div data-label>Fixed label</div>
    <div contenteditable="true">Editable</div>
</div>

You need to have two separate model elements:

<widget>
    <editable>Editable</editable>
</widget>

And the mapping is:

<widget> <-> <div data-widget>
<editable> <-> <div contenteditable="true">

It should be possible to map <widget> outside (element) to <div data-widget> and <widget> inside (children) to <div contenteditable="true">, so the model would look like:

<widget>Editable<</widget>

And no additional element would be needed.

@pjasiun
Copy link
Author

pjasiun commented Apr 5, 2016

It should be also possible where attributes should be mapped.

@pjasiun
Copy link
Author

pjasiun commented Apr 5, 2016

Never mind. It does not make sense.

@scofalik scofalik self-assigned this Sep 13, 2016
@scofalik
Copy link
Contributor

We implemented different solution in ckeditor/ckeditor5-engine#584. Mapper uses callbacks for position mapping now, so it is possible to recognize special case scenario in them and modify how position is mapped.

@mlewand mlewand transferred this issue from ckeditor/ckeditor5-engine Oct 9, 2019
@mlewand mlewand added this to the iteration 3 milestone Oct 9, 2019
@mlewand mlewand added intro Good first ticket. status:confirmed type:feature This issue reports a feature request (an idea for a new functionality or a missing option). package:engine labels Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
intro Good first ticket. package:engine type:feature This issue reports a feature request (an idea for a new functionality or a missing option).
Projects
None yet
Development

No branches or pull requests

3 participants