-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Neighboring embeds collapse together #312
Comments
thomsbg
added a commit
to voxmedia/quill
that referenced
this issue
Mar 24, 2015
Avoiding the optimization of inserting text into an existing node with identical formats which fixes slab#312. Without this optimization, insertText() will always split the existing html at the offset and create a new node just for the inserted text. To achieve similar behavior as before, Line#optimize() is called instead of
thomsbg
added a commit
to voxmedia/quill
that referenced
this issue
Mar 24, 2015
Avoiding the optimization of inserting text into an existing node with identical formats which fixes slab#312. Without this optimization, insertText() will always split the existing html at the offset and create a new node just for the inserted text. To achieve similar behavior as before, Line#optimize() is called instead of
thomsbg
added a commit
to voxmedia/quill
that referenced
this issue
Mar 24, 2015
Avoiding the optimization of inserting text into an existing node with identical formats fixes slab#312. Without this optimization, insertText() will always split the existing html at the offset and create a new node just for the inserted text. To achieve similar behavior as before, Line#optimize() is called instead of
thomsbg
added a commit
to voxmedia/quill
that referenced
this issue
Mar 24, 2015
Avoiding the optimization of inserting text into an existing node with identical formats fixes slab#312. Without this optimization, insertText() will always split the existing html at the offset and create a new node just for the inserted text. To achieve similar behavior as before, Line#optimize() is called instead of Line#rebuild().
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Quill collapses adjacent
Leaf
objects with identical formats into a singleLeaf
. This is desirable for normal inline formats, but causes some trouble with embed formats. For example, running these commands on the quilljs.com homepage throws a javascript error:I'm not sure of the best solution for this, but it seems like adjacent embeds shouldn't collapse in order to reflect the desired markup:
<div><img><img></div>
. Also, the newline probably shouldn't have the embed format either. i.e. the call togetContents()
after these operations should look like:The text was updated successfully, but these errors were encountered: