Say we want to add checkboxes (QCheckBox), images, or any other custom or non custom widgets, we'll need to implement support for active widgets inside QTextEdit.
This will require quite a bit of work. We'll need to support
Back Ctrl + z / forward Ctrl + y
Drag and drop.
Copying the editor content should copy the underline markdown. So, selecting and copying CheckBox and some text should result in - [ ] and some text
It will work by the editor rendering whatever markdown is written. It should be done like Bear's Panda (https://bear.app/alpha/) here:
[ ] Custom to-do list. With the ability to collapse todos. With drag and drop (and showing where it's gonna end up while dragging). Markdown - [ ] (unchecked), - [x] (checked)
[ ] Unordered list with drag and drop like the to-do list. Markdown -
[ ] Collapsable sections (by headers?)
[ ] Images support
Since all we're doing is just rendering the underline markdown, nothing much changes in the way notes are represented in the database.
This issue is part of #317.
Active widgets in QTextEdit
Say we want to add checkboxes (QCheckBox), images, or any other custom or non custom widgets, we'll need to implement support for active widgets inside QTextEdit.
Proof-of-concept
First proof-of-concept was done in PyQt here: http://blog.rfox.eu/en/Programming/Python/Active_widget_in_PyQT5_-_QTextEdit.html. I asked GPT-4 to convert the code to C++, but its output didn't work well. Then, @bjorn took the code and made it work, thus creating the proof-of-concept: https://gist.github.com/bjorn/35a8b1290731d1f82dd7ddbb5d81272c
This will require quite a bit of work. We'll need to support
CheckBox and some text
should result in- [ ] and some text
It will work by the editor rendering whatever markdown is written. It should be done like Bear's Panda (https://bear.app/alpha/) here:
- [ ]
(unchecked),- [x]
(checked)-
Since all we're doing is just rendering the underline markdown, nothing much changes in the way notes are represented in the database.