Is there a way to get my custom TinyMCE button to insert multiple lines of text? Ultimately I am making a “Premade Themes” button where a user will select a theme and it will insert about 6-8 different shortcodes with one click and they can edit the shortcodes accordingly..
A problem I’m having is that all of these shortcodes get put in one line. Here’s the code I use that actually pastes the shortcodes:
tinyMCEPopup.editor.execCommand('mceInsertClipboardContent', false, {content : 'the shortcodes go here'});
Any help is appreciated!
This should be as easy as adding
<br />
between shortcodes or every time you want to add a new line and also if you are inserting content you should usemceInsertContent
instead ofmceInsertClipboardContent
unless you are actually getting the content from the clipbard, so: