Adding additional custom buttons
To add a custom button to TinyMCE you’ll need to make a small plugin for it. If you want to add an existing TinyMCE plugin, it needs to be “wrapped” in a WordPress plugin.
I have a similar question – I am trying to add the imgmap plugin (for tinymce). Seriously though Andrew, you are not suggesting having to install a separate wordpress plugin to add that on?
I think Chris, like myself just want to add more plugins than what is included with the install.
I reckon the added text need to be done in the tadv_admin.php after uploading the plugin folder?
All that really is the question is exactly what one need to add and to what function.
Of course, this would mean that an update of the plugin would wipe away any changes, but that is not really a big issue.
…you are not suggesting having to install a separate wordpress plugin to add that on?
Why not? the JS files for TinyMCE have to be stored somewhere and some PHP code is needed for loading them. This is so easy to do from a WordPress plugin.
Of course, this would mean that an update of the plugin would wipe away any changes…
Yes. If you’re tweaking only your site, you can probably live with this, but imagine having to re-apply the changes to 10-20-30 sites every time.
It is possible to support “sub-plugins” for TinyMCE Advanced that contain the JS files for TinyMCE plus couple of lines of PHP, but it making new WordPress plugin would be the same.
Guess I will give it a whirl with building a wordpress plugin.
However, an idea for a future version: Would it be possible for tinymce advanced to simply look inside the MCE directory and simply add on the plugins with the same names as the directory?
That would minimize the need for editing and users can simply drop plugin-folders. Keeping the extra folders as a list in the settings for the plugin could even keep them from being deleted when upgrading. Or even simpler: have a separate folder for them outside of the core, for instance under the theme directory. If the folder is there, then load the editor_plugin.js files inside the directories.
Just an idea. I love your plugin. It is very easy and straight forward to use.
Would it be possible for tinymce advanced to simply look inside the MCE directory and simply add on the plugins with the same names as the directory?
It would but… Where would that directory be? Shouldn’t be inside TinyMCE Advanced’s directory as it will get deleted on update. Also adding a plugin often requires adding a button, sometimes several buttons. Not possible to do that if auto-adding.
- The topic ‘Adding additional custom buttons’ is closed to new replies.