nozer/quill-delta-to-html

Feature Request: Support Checkbox input for checkbox lists

Djones4822 opened this issue · 0 comments

Right now checkboxes come in as just regular li elements, these can be styled as checkboxes, but it would be better to render these as actual inputs with the list style set to none.

I currently manage this with an afterRender function, but this should really be a core feature since we don't really ever want to show a checkbox as just a list item.

Additionally, we should somehow have a way to link a checkbox input to the delta so that checking the input can feed back to the delta. This is important because a checkbox is an intractable element - if we're rendering the checkbox as an input then it's because we expect it to be interacted with client side. However we don't want to store the html when that update is made, we should be storing the safer json delta object. So if a user interacts with the html, we need to update the corresponding delta value.

Ideally, this could be done by assigning a unique id to each element produced by the conversion which includes the operator index. Then the developer can use a listener for change, and get the index from the id to determine which delta operator to affect.

Will be working on a fork that implements this, but I'm opening this to discuss if anyone has a better idea or disagrees with my implementation.