Wednesday, 16 June 2021

Code Mirror - How to store information in an annotation or metadata?

I'm using Code Mirror to create a simple code editor that creates shapes on a canvas based on certain commands. I would like to use Code Mirror's annotations to store a shape ID in the line's metadata. That way when I delete a line on the commands I can easily tell the Canvas which shape to delete.

I've been looking through the code mirror's documentation for a while now and still have no idea how I would go about implementing this.

How can I access the metadata (annotations) in text with CodeMirror?

Any help is much appreciated.

enter image description here



from Code Mirror - How to store information in an annotation or metadata?

No comments:

Post a Comment