BUG: src is stored twice with image
Question
The output of "JSON.stringify(editor.getComponents())" shows that the src of an image is stored twice.
{
"type": "image",
"void": true,
"status": "selected",
"content": "",
"attributes": {
"id": "iy3c7",
"src": "data:image/png;base64,..." <--- 1.
},
"src": "data:image/png;base64,...", <--- 2.
"activeOnRender": 0,
"open": false
}
Version is v0.16.18 - validated with the demo.
Answers (2)
@longdoan7421 I think we can delete it in toJSON method when the src is equal to attribute.src and ensure is loaded back correctly on load
Hi @artf,
I just took a quick look through ComponentImage. I think it is possible to drop the src property in image model and replace the code which use src in ComponentImage and ComponentImageView with the attribute.src.
But I am not sure that do you use the src property in any where else? What do you think about that?
Related Questions and Answers
Continue research with similar issue discussions.
Issue #3515
BUG: gjs-selected Style is Hardcoded
This definition: https://github.com/artf/grapesjs/blob/88249c38577852dc3c42047356a70a12066ee6ca/src/canvas/view/FrameView.js#L303-L306 is a...
Issue #2196
[Bug] Link element selection shows no toolbar
Steps to reproduce: add Text, select a word, click on Link icon in RTE panel, select a Link. Expected behaviour: when I select Link I expec...
Issue #1567
rte toolbar bug
Hello all, I am using the latest grapesjs stable version (40) and I noticed the following bug in the rich text editor: If the user drags an...
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...
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.