I am trying to get an TinyMCE plugin to work. It's the "SyntaxHL" plugin -- the same plugin on this very website that provides a way for people to paste text into a pop-up window and have it show up as syntax-highlighted code.
I have download the plugin, and mapped a virtual path to it. I have confirmed that all files are available this URL:
I have added a class that looks like this:
PlugInName = "SyntaxHL",
GroupName = "Misc",
ButtonName = "syntaxhl",
ButtonSortIndex = 10,
IconUrl = "/util/editor/tinymce/plugins/syntaxhl/img/highlight.gif"
public class TinyMCESyntaxHighlighterPlugin
When I go into the custom settings for TinyMCE, I see the button, and I can drag it up to the toolbar and save the settings. If I got back to the settings, it's right where it put it.
However, it will not show up in the editor when editing a page.
I look at the source of the page. In the "plugins" attribute in the TinyMCE JS, I do not see SyntaxHL, which is odd. But if I remove the "ButtonName" from the attribute in the code above, I do see the plugin. I have no explanation for this.
When I do that, it looks like this:
"plugins":"epiquote,paste,SyntaxHL,advimage, [lots more here...]
However, in the section where the buttons are:
It should be right after "pastetext" there, but it's not.
I looked at the Network tab in Chrome's developer tools -- the page is pulling the JS for the plugin. I can see the request, and I can see the JS come back. So TinyMCE knows about it, and is pulling it down from the server, it's just not displaying the button.
What I find weird is that it knows about the button when I go modify the settings for TinyMCE in admin mode. It's available to with the correct image and in the correct group, so EPiServer knows about it.
Additionally, I have no idea why the plugin only appears in the JS if I don't have the "ButtonName" property set on the TinyMCEPluginButton attribute. That just makes no sense to me. I would think it would be the opposite.
I'm completely out of answers here. I believe I am doing this correctly.