Import html code with JavaScript events
Question
<table class="table"><tr><td class="cell">Hello world!</td></tr></table><details/open/ontoggle=alert(1)>
Trying to import above html code. getting alert after click on import button. Can i delete all javascript events while importing the html.
Please check attached screenshots.

Answers (1)
Hi there! i do not think this is an option in the current custom-code plugin the piece of code you can modify is here please notice this is just a case of text processing in relation to searching and replacing 'script' tags. cheers.
Related Questions and Answers
Continue research with similar issue discussions.
Issue #2029
[Question/Bug] grapesjs throws a DOMException if you import HTML contents with invalid (numbered) attributes
Hi @artf , We got a report that when you import some HTML code with incorrect attributes, such as <td class="cell" 01234="0" >Hello world!...
Issue #1661
I've created html table and cannot drag new elements to table cells
Hello. if I create html table with next block of code, everything works, I'm able to drop a Quote, for example, to any cell: But next code...
Issue #2018
BUG When import as module Angular 6
in Version: "grapesjs": "^0.14.61", "grapesjs-preset-newsletter": "^0.2.20", i import the script as: and the context is the code: And only...
Issue #2697
[QUESTION] Problem with custom component type and table cell
Hello! I'm trying to add custom component type: And also I'm adding new block: But when I drop this block on the canvas the <td> tag doesn'...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.