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.36k stars 4.05k forks source link

BUG: editable text after remove focus of RTE, returns back previous state of content. #5328

Closed sdimitrenco closed 1 year ago

sdimitrenco commented 1 year ago

GrapesJS version

What browser are you using?

Chrome

Reproducible demo link

https://jsfiddle.net/sdimitrenco/wao1rh0q/30/

Describe the bug

That is my components struct

  {
    "type": "link",
    "components": [
      {
        "type": "image",
        "attributes": {
          "src": "http://localhost:8003/swt/upload/files/svg_images/envelope-square-solid.svg",
        }
      },
      {
        "tagName": "span",
        "type": "text",
        "content": "some@test.com",
      }
    ]
  }

If I change the text in the span tag in the text editor, then remove focus from that word, it returns the previous state of the text. The structure of the components looks normal, a link, but inside the picture and text inside the span tag.

DEMO image

LIVE https://jsfiddle.net/sdimitrenco/wao1rh0q/30/

Code of Conduct

artf commented 1 year ago

You shouldn't have "content" inside your text span, indeed if you replace it with "components": "some@test.com", it will work properly.