• I’m having an issue with a shortcode button. I’m wondering why when I try to enter the spans inside the return_text variable only the div container is output. If I enter the shortcode manually using the shortcode function the spans are there, will I need to set this up differently using a function in the php file. I don’t really understand a great deal of this but any help in the right direction would be appreciated.

    ed.addCommand('captionleft', function() {
                    var selected_text = ed.selection.getContent();
                    var return_text = '';
                    return_text = '<div class="captionLeft"><span class="leftQuote"></span><span class="rightQuote"></span><p>' + selected_text + '</p></div>';
                    ed.execCommand('mceInsertContent', 0, return_text);
                });
  • The topic ‘mce buttons – custom shortcode’ is closed to new replies.