Ways to add buttons/tags in WYSIWYG editor?
Created 1 year ago by gonziis

Would like to add a simple button just for adding a class to an element. Maybe even something more complicated. Are there any examples/documentations?

ryanthompson  —  1 year ago

Last time I did this I published the addon and used my own JS based on the original files and adjusted the config to allow for it in the field configuration too (since we let client manage custom fields in a few areas).

gonziis  —  1 year ago

I'll check it out, just not sure where I need to put that code. https://pyrocms.com/forum/channels/field-types/customising-the-wysiwyg-field-type-with-additional-redactor-plugin Found this topic, seems pretty helpful.

ryanthompson  —  1 year ago

You can put the JS wherever. In my case I put it in a theme::js/support/wysiwyg/ folder. Just a naming pattern I tend to use.

When you publish the addon it'll be in your resources/REF folder.