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

Change marker-to-data logic to improve conversion inside document fragment #9622

Closed
scofalik opened this issue May 4, 2021 · 0 comments · Fixed by #9624
Closed

Change marker-to-data logic to improve conversion inside document fragment #9622

scofalik opened this issue May 4, 2021 · 0 comments · Fixed by #9624
Assignees
Labels
type:improvement This issue reports a possible enhancement of an existing feature.

Comments

@scofalik
Copy link
Contributor

scofalik commented May 4, 2021

📝 Provide a description of the improvement

Marker-to-data conversion converts marker boundaries to either an element or and attribute on an element. The decision is based on whether text is allowed at given place. So, for example, we have:

<p>Foo<comment-start name="..."></comment-start>bar</p><img data-comment-end-after="..." ... />

The problem is in that document fragment allows everything inside, to enable both conversion of bigger structures with multiple elements on top-level as well as simply a fragment of a text.

However, since document fragment allows text, markers are always converted to elements. This is problematic for two reasons:

  1. For the same model, the output is simply different than what editor.getData() returns, which may be problematic.
  2. There is at least one specific problem: the marker element is placed inside <ul> but upon upcast, all non-allowed elements are cleared from <ul>. (BTW this mechanism most probably is not needed and I will create additional issue for that).
@scofalik scofalik added the type:improvement This issue reports a possible enhancement of an existing feature. label May 4, 2021
@scofalik scofalik added this to the iteration 43 milestone May 4, 2021
@scofalik scofalik self-assigned this May 4, 2021
niegowski added a commit that referenced this issue May 5, 2021
Other (engine): In marker-to-data conversion, attributes for marker boundaries will be used every time the marker starts or ends before or after a model element, instead only where text is not allowed by model schema. Closes #9622.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:improvement This issue reports a possible enhancement of an existing feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant