Code Monkey home page Code Monkey logo

Comments (5)

jhchen avatar jhchen commented on August 22, 2024

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?

from parchment.

alecgibson avatar alecgibson commented on August 22, 2024

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 span so that we can underline it when the user selects the change (as in the screenshot). So we're currently adding this span manually, and also having to make sure it stays at the end of the Block if the contents of the paragraph change.

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.

Screen Shot 2019-06-21 at 08 11 48

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!)

from parchment.

jhchen avatar jhchen commented on August 22, 2024

Do you think this is something that would be worth adding to core Quill?

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.

from parchment.

alecgibson avatar alecgibson commented on August 22, 2024

To be clear "this" is something that exists in Quill's DOM purely for display and does not represent content?

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".

from parchment.

quill-bot avatar quill-bot commented on August 22, 2024

Closing inactive issue.

from parchment.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.