Skip to content

another approach #1

@xem

Description

@xem

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions