Open TechWhiz10 opened 9 months ago
Hi, @Artur Arseniev. Grapesjs is very awesome. just like WordPress or Bubble.
I made a function using https://github.com/GrapesJS/grapesjs/issues/481. editor.RichTextEditor.add('custom-vars', { icon: `
<option value="[[firstname]]">FirstName</option> <option value="[[lastname]]">LastName</option> <option value="[[age]]">Age</option> </select>`, // Bind the 'result' on 'change' listener
event: 'change', result: (rte, action) => rte.insertHTML(action.btn.firstChild.value), // Reset the select on change update: (rte, action) => { action.btn.firstChild.value = "";} })
It works well in grapesjs-plugins-newsletter. but it doesn't work in grapesjs-mjml. Sometimes it works.
![Uploading image.png…] ()
I don't know why it doesn't work. How can I resolve this problem?
Hi have the exact same issue for the exact same need!
Did you find a solution @TechWhiz10?
@LcsGa not yet
Hi, @Artur Arseniev. Grapesjs is very awesome. just like WordPress or Bubble.
I made a function using https://github.com/GrapesJS/grapesjs/issues/481. editor.RichTextEditor.add('custom-vars', { icon: `
event: 'change', result: (rte, action) => rte.insertHTML(action.btn.firstChild.value), // Reset the select on change update: (rte, action) => { action.btn.firstChild.value = "";} })
It works well in grapesjs-plugins-newsletter. but it doesn't work in grapesjs-mjml. Sometimes it works.
![Uploading image.png…]
()
I don't know why it doesn't work. How can I resolve this problem?