GrapesJS / grapesjs

Free and Open source Web Builder Framework. Next generation tool for building templates without coding
https://grapesjs.com
BSD 3-Clause "New" or "Revised" License
22.38k stars 4.06k forks source link

[BUG] `allowScripts: true` still deletes <script> tags #2069

Closed Sparragus closed 5 years ago

Sparragus commented 5 years ago

Hi all. Thanks for creating and maintaining this amazing project. 🙏

Bug Description

I have a block that inserts a script as specified here: https://grapesjs.com/docs/modules/Components-js.html#basic-scripts

When I drag the block to the canvas, the component will indeed have the script attached to itself. However, when I reload the page, the script is no longer there.

I've seen multiple issues where this is discussed, and they all seem to be resolve by adding

const editor = grapesjs.init({
    ...
    allowScripts: 1,
});

Examples: https://github.com/artf/grapesjs/issues/1123 https://github.com/artf/grapesjs/issues/837 https://github.com/artf/grapesjs/issues/721

However, allowScripts: 1 doesn't seem to be working for me.

Expected

I expect the Githubissues.

  • Githubissues is a development platform for aggregating issues.