607 posts WeNotMe
  • 5 Years of Membership
  • Elite Author
  • Author Level 7
  • Trendsetter
+4 more
codeex
says

Hi, thank you for the tutorial. It seems like text editor is not working. When I change to ‘Text’ tab, content is still formated like in Visual editor.

try this

(function($) {
"use strict";   

   tinymce.PluginManager.add( 'ubl_location', function( editor, url ) {

      editor.addButton( 'shortcodes', {
         type: 'listbox',
         icon: false,
         title:  'Shortcodes',
         onclick : function(e) {},
         values: [
            {text: 'Alerts',onclick:function(){
               //code here
            }},
         ]
      });

   });

})(jQuery);
2 posts
  • 1 Year of Membership
matrasoriginal
says


Hi, thank you for the tutorial. It seems like text editor is not working. When I change to ‘Text’ tab, content is still formated like in Visual editor.

try this

(function($) {
"use strict";   

   tinymce.PluginManager.add( 'ubl_location', function( editor, url ) {

      editor.addButton( 'shortcodes', {
         type: 'listbox',
         icon: false,
         title:  'Shortcodes',
         onclick : function(e) {},
         values: [
            {text: 'Alerts',onclick:function(){
               //code here
            }},
         ]
      });

   });

})(jQuery);

It works! Thank you!

607 posts WeNotMe
  • 5 Years of Membership
  • Elite Author
  • Author Level 7
  • Trendsetter
+4 more
codeex
says



Hi, thank you for the tutorial. It seems like text editor is not working. When I change to ‘Text’ tab, content is still formated like in Visual editor.

try this

(function($) {
"use strict";   

   tinymce.PluginManager.add( 'ubl_location', function( editor, url ) {

      editor.addButton( 'shortcodes', {
         type: 'listbox',
         icon: false,
         title:  'Shortcodes',
         onclick : function(e) {},
         values: [
            {text: 'Alerts',onclick:function(){
               //code here
            }},
         ]
      });

   });

})(jQuery);
It works! Thank you!

Your Welcome! :)

by
by
by
by
by
by