1

Trying to use the incredibly professional looking ProseMirror WYSIWYM editor to tag words in a text field with IDs, and give tagged words a background-color. E.g.

The horses took off

...might result in the html:

The <span class="tagged" data-id="horse">horses</span> <span class="tagged" data-id="take_off_2">took off</span>

The learning curve is steep for ProseMirror, I'm finding it difficult to find my feet. Anyone have any tips on what PM libraries and functions might be used to add/remove data and classes to words? Not even sure if spans are the way to do it.

chichilatte
  • 1,697
  • 19
  • 21
  • Add some details please: how are you going to create tags from the words? Should they be parsed automatically when inserted or after some kind of user interaction? – bananaspy Dec 05 '18 at 06:49
  • 1
    After some user interaction with a list of suggestions. I've actually switched over to the Quill WYSIWYM editor, but thanks for your interest. Quill is definitely easier to just plug into an existing project (not something ProseMirror is designed to do i think) – chichilatte Dec 05 '18 at 15:59

0 Answers0