Hi, nice project!
Here's an idea that is a bit dirty but could make a shorter code and a better compatibility (multiple checkboxes, firefox, ... which is not currently the case)
The textarea contains monospace characters. They are something like 10*18px each.
So when the user clicks the textarea, knowing the mouse position in the textarea, you can compute which character is clicked, and if this character is part of "[ ]", replace it with "[x]".
The only trap is to handle line breaks / line wraps correctly. But that's doable.
Hi, nice project!
Here's an idea that is a bit dirty but could make a shorter code and a better compatibility (multiple checkboxes, firefox, ... which is not currently the case)
The textarea contains monospace characters. They are something like 10*18px each.
So when the user clicks the textarea, knowing the mouse position in the textarea, you can compute which character is clicked, and if this character is part of "[ ]", replace it with "[x]".
The only trap is to handle line breaks / line wraps correctly. But that's doable.