This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

R.
R.

Hello,

Richeditor already has a built-in button, which changes editor mode between html and wysiwyg content. I want to create a plugin, which adds a button to richeditor toolbar. This button will change editor's mode to custom one (lets say "pagebuilder" mode).

I managed to inject javascript file into backend forms of Rainlab StaticPages plugin, but I couldn't find a neat way to add a button with icon to editor's toolbar. There seems to be a lot of issues with richeditor external API (is it outdated? some of the official Imperavi Redactor methods are missing, i.e. button.setIcon), but I looked up sources and found button.changeIcon method. It does add icon, but the result html code is different from other buttons (added by october?) and the icon is not displayed correctly.

So, is there any documentation on octobercms' version of Imperavi Redactor? Or should I extend Imperavi Redactor and add buttons via javascript plugins? Or maybe the best solution would be to abandon the ship and stick with custom form widget / field with custom js logic to manipulate richeditor's DOM under the hood?

floriskoch
floriskoch

Would be interested to hear more about this!

zakir2229
zakir2229

is anybody found a way to this ??/

1-3 of 3

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.