support check list, drag and drop text #120
Replies: 1 comment
-
It's certainly possible. The complication relative to what already exists is that it would be a kind of <input> Element, and the MarkupEditor is currently not supporting <input> Elements at all right now. If it is just supported within the standard paragraph styles, like:
then it would be fairly contained in scope. Even in that case, it might require special handling for arrow key navigation, Enter, and Delete, which in turn requires special handling for Undo. The check/uncheck action also needs to trigger a callback to the Swift side so that you will know the document changed (e.g., so you know whether it needs to be saved). I don't think any of those things are too difficult, but they're not simple. It would be a starting point, but every time you need a checkbox, you would have to manually insert it. It wouldn't behave like lists currently do. If you want to support something that behaves like Apple's Notes app, then the implementation starts to resemble something more like lists, which was probably the most complicated part of the MarkupEditor implementation. Leaving aside nested lists (which are not applicable to checkboxes in forms) lists were complicated because of the special handling needed for Enter (and to some degree Delete and Paste). If you're in a list and press Enter, but you're at the end of a list item, you need to create a new list item of the same type after. If at the beginning, before. If in the middle, split the list item and put part in the front and part in the back. And in all cases, restore the selection point properly. And then support Undo and Redo for each of these cases. You can see Notes does all of this "like you would expect". I would love to support this in MarkupEditor, and I would certainly use it myself. It seems like a pretty big job. I wonder (without a lot of confidence) if there might be some hack of existing lists to suppress the bullet/number and insert a checkbox, thereby magically inheriting all the work I put into lists. I will think about it some more and maybe experiment a bit when I get back into cleaning up some of the open issues, which I hope to do soon. Thanks. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
Is it possible when you support adding check list and also drag drop text like in text view, that would be great. It's similar to apple's note taking app
Beta Was this translation helpful? Give feedback.
All reactions