Custom markup in mobiledoc-kit

122 Views Asked by At

I'm using mobiledoc-kit to create an editor. It comes with a few toolbar buttons that let you make text bold, italic, etc. Some text can be wrapped in H1, H2... tags.

What I want is to create a button that will wrap text in a custom tag with attributes (<div data-tag="some data here">TEXT</div>)

I can see the tags are limited in VALID_MARKUP_TAGNAMES constant which is in src/js/models/markup.js file

I installed mobiledoc-kit via npm.

The question is how can I extend this file and add a custom tag to the constant.

0

There are 0 best solutions below