-
Notifications
You must be signed in to change notification settings - Fork 146
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
UI element at end of blot #73
Comments
The ui element is still not rigorously tested and I would be reluctant to try to expand its usage. I'm not sure the use case you are describing is what it was designed for either though. Can you explain more about the newline + Block scenario? |
We're working on a track changes feature for showing the changes a user has made to a document. Part of this is showing them when they've inserted a paragraph break. We're doing this by showing a "return" character at the end of the block. In theory this could be done with a pseudoelement, but we'd quite like for it to be a The character is purely for UI, and should not be considered part of the document, or be able to be interacted with. It also belongs conceptually one-to-one with a block. In these ways, it feels a lot like the existing UI elements in lists. It could be that the UI elements don't quite fit this bill - I haven't dug into them in depth yet - hence the exploratory issue. Do you think this is something that would be worth adding to core Quill? (Obviously if not, we'll just extend however we see fit with subclasses - just thought it might be a nice feature to add if other people have other use cases, eg status indicators at the end of a list item?) (Side note on UI elements not being tested: I've noticed an issue with keyboard behaviour in lists in Quill. I've raised slab/quill#2651, although I'm still not sure if the solution is correct, so it'd be good to get thoughts on that when you have time, please!) |
To be clear "this" is something that exists in Quill's DOM purely for display and does not represent content? The list issue you noted is an example of why the ui node is still needs to be tweaked and tested. |
Yes, I suppose I was talking about having something at the end of the blot, but perhaps it would be better to think more "generally". |
Closing inactive issue. |
The latest parchment supports having a UI element at the start of a blot (eg for list items). Would it be acceptable to submit a pull request that adds support for these elements at the end of a blot? Our particular use case is adding a newline character to the end of a
Block
. At the moment we fudge this manually, but manipulating the DOM outside of Quill can be a little hairy, and it would be nicer if we could work with Quill rather than against it.The text was updated successfully, but these errors were encountered: