You need to be logged in to post in the forum - Log In

An active JCE Pro Subscription is required to post in the forum - Buy a Subscription

Support is currently Online

Official support hours
Monday to Friday
09:00 - 17:00 Europe/London (BST)

#99112 Custom plug-in not functioning after upgrade

Posted in ‘Editor’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Latest post by temills on Saturday, 06 April 2019 01:34 BST

temills
I use plug-ins for inserting custom HTML (following instructions at (https://github.com/widgetfactory/jce-custom/archive/master.zip. With the 2.7.2 upgrade, the plug-in icons no longer appear in the editor profiles. Contents of the plug-in editor_plugin.js file are:

(function () {
    tinymce.create('tinymce.plugins.RegisterButton', {
        init: function (ed, url) {
            ed.addButton('register', {
                title: 'Register Button',
                image: url + '/img/register.png',
                onclick: function () {
                    var html = '<a href="https://www.joomlacontenteditor.net/index.php?option=com_eventbooking&view=upcomingevents&layout=table&id=0&Itemid=143"><img style="display: block; margin-left: auto; margin-right: auto;" src="https://www.joomlacontenteditor.net/images/stories/jevents/register_now_195.png" alt="" /></a>';
                    
                    ed.execCommand('mceInsertContent', false, html);
                }
            });
        }
    });
    tinymce.PluginManager.add('register', tinymce.plugins.RegisterButton);
})();
Thanks for any help you can provide.

Ryan
Add an "image" attribute to the <icon> tag in the xml file, pointing to the relative path of the icon image, eg:

<icon image="plugins/jce/editor-custom/img/custom.png">custom</icon>
I have update the Custom HTML example xml file - https://github.com/widgetfactory/jce-custom/blob/master/editor-custom.xml

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

temills
Works like a charm! Thanks.