From 5f800872c17ea2a1a9d3a78857e363e5c9c10253 Mon Sep 17 00:00:00 2001 From: Claudio-Emmolo <113107618+Claudio-Emmolo@users.noreply.github.com> Date: Fri, 15 Nov 2024 10:26:33 +0100 Subject: [PATCH] WidgetBox list, hero layout --- src/widgetbay.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/widgetbay.js b/src/widgetbay.js index 7d0e9ee..916a85e 100644 --- a/src/widgetbay.js +++ b/src/widgetbay.js @@ -38,6 +38,13 @@ tinymce.PluginManager.add('widgetbay', function (editor, url) {

It only works on single product

+ + @@ -139,8 +146,9 @@ function generateShortcode () { 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 useHeroLayout = formData.get('use-hero-layout') ? 'layout="hero"' : '' - const content = '[widgetbay ' + parsedId + parsedLink + parsedTitle + parsedForceLink + ']' + const content = '[widgetbay ' + parsedId + parsedLink + parsedTitle + parsedForceLink + useHeroLayout + ']' tinymce.activeEditor.insertContent(content) tinymce.activeEditor.windowManager.close()