In the given PSC documentation link, "MyCustomPlugin" is the name of the plugin. A plugin definition needs to be pushed into the map associated with the name of the plugin.
Plugin definition should contain a method called "init" which gets called on plugin initialization. Inside this method, we can add commands and buttons.
A "command" is a named operation to be performed. The editor instance is available as the parameter to the command's exec method. Any of the editor API (CKEditor 4 Documentation) and other arbitrary JS code can be executed from within the command's exec method.
A "button" is a toolbar component. Each button has to be associated with a command. On clicking the button the associated command's exec method gets called.
Please note that any extra JS files can be added or referenced on the harness containing the section which contains the RTE.
Refer the CKEditor 4 documentation Mathjax library link
Sorry for the late reply but i had to stop working on this issue for a while and now I'm back on it.
So for each plug-in that we need to add to RTE. we have 2 js files, plugin.js and pluginName.js (mathjax.js).
If we try to include these js files in the harness they generate multiple error and they wont work, and we can't add the functionality to the command since it's not a simple function, and it needs multiple functions and event actions.
Is there a way that we include the plug-in library directly in the directories and enable this plug-in, if not can you facilitate and give a more detailed instructions?
Is the mathjax library enabled in newer versions of pega (8.1, 8.2)?