BUG: update listener triggered on initial load
Question
Hello! I found weird bug with update listener. It's triggered on initial load if html code has <img> tag with class attribute:
const editor = grapesjs.init({
container: "#gjs",
storageManager: { type: 0 },
plugins: [],
components: `
<img src="https://images.unsplash.com/photo-1602536062611-8996fd6f8149?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1998&q=80" alt="Some alt text" class="centered"/>
`
});
editor.on("update", () => {
console.log("udpdated");
});
You can check live demo in this sandbox
Answers (2)
I'm not sure why it's happening but I'd not assign a high priority to the issue for 1 false-positive update. So, if anyone would like to help in debugging this I'd appreciate
Shouldn't be an issue anymore
Related Questions and Answers
Continue research with similar issue discussions.
Issue #2315
Allow returning promises from StorageManager `.load` and `.store` methods
This would offer a more modern and clean API than the current callback based approach. Proposed API: --- There are a few ways this could be...
Issue #2207
[BUG]: Can't drag component if there is some space on top/left with Mode Absolute
Given the following code example... Results in no ability to drag and drop elements to correct position using drag icon on the panel. See F...
Issue #325
Bug in class names
Editor replaces all instances of '--'(double hyphen) with '-'(single hyphen) in the initial class names. For example in the editor iframe I...
Issue #384
Create and Edit Template into Database
This is my code to Create a new template and insert the inline html with style into the database : I am able to insert the template-data in...
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.