diff --git a/src/shortcodeList.js b/src/shortcodeList.js index b5ab52a..cb65ed3 100644 --- a/src/shortcodeList.js +++ b/src/shortcodeList.js @@ -34,7 +34,7 @@ tinymce.PluginManager.add('shortcodeList', function (editor, url) { }, { title: 'Widgetbay', - code: '[widgetbay id="optional" link="optional"]', + code: '[widgetbay id="optional" link="optional" forceLink="optional"]', description: 'Insert a widgetbay iframe. You can use the id or the link, but not both. You can use multiple links separated by a comma. - link="https://link1.com,https://link2.com' }, { diff --git a/src/widgetbay.js b/src/widgetbay.js index 1fc5796..7d0e9ee 100644 --- a/src/widgetbay.js +++ b/src/widgetbay.js @@ -26,13 +26,18 @@ tinymce.PluginManager.add('widgetbay', function (editor, url) { - - + + + @@ -133,8 +138,9 @@ function generateShortcode () { const parsedTitle = formData.get('widget-title') ? 'title="' + formData.get('widget-title') + '" ' : '' const parsedLink = link ? 'link="' + link + '" ' : ' ' const parsedId = formData.get('widget-id') ? 'id="' + formData.get('widget-id') + '"' : ' ' + const parsedForceLink = formData.get('widget-force-link') ? 'forceLink="' + formData.get('widget-force-link') + '" ' : ' ' - const content = '[widgetbay ' + parsedId + parsedLink + parsedTitle + ']' + const content = '[widgetbay ' + parsedId + parsedLink + parsedTitle + parsedForceLink + ']' tinymce.activeEditor.insertContent(content) tinymce.activeEditor.windowManager.close()