ContentTools icon indicating copy to clipboard operation
ContentTools copied to clipboard

Request for tutorial on building custom tags

Open Eeliya opened this issue 9 years ago • 3 comments

I want to have a class ContentEdit.MyCustomP that handles all the <p class='.my-custom-p'></p> or <p data-my-custom-p></p> and all the other p tags get handled by the ContentEdit.Text

Eeliya avatar Mar 02 '16 14:03 Eeliya

Hi @Eeliya , You can override the Element class used to parse an element using the data-ce-tag attribute. Please read the documentation on custom tag names here: http://getcontenttools.com/api/content-edit#tag-names

anthonyjb avatar Mar 02 '16 14:03 anthonyjb

Thank you,

it would be great if you could also add an example element to that tutorial :)

Eeliya avatar Mar 02 '16 15:03 Eeliya

Yes we're short off an example on how to build custom tags and I agree we should have one.

anthonyjb avatar Mar 02 '16 15:03 anthonyjb