Issue #3454Opened May 12, 2021by TheDude700 reactions

BUG: RTE insert link does not update DOM

Question

Version: "0.17.3"

Are you able to reproduce the bug from the demo?

  • Yes
  • No

What is the expected behavior? After inserting link using default RTE that it is immediately available to be further edited in settings, i.e. setting the HREF and Target

Describe the bug detailed After selecting text with the default RTE and turning it into a link, the text is correctly wrapped in <a> tags, however it is not available as a link component until after deselecting and then selecting some other text, sometimes having to repeat this twice before it is recognized as a GrapesJS component.

Are you able to attach screenshots, screencasts or a live demo?

  • Yes (attach)
  • No

this is my editor init:

this.editor = grapesjs.init({
      container: '#gjs',
      width: 'auto',
      noticeOnUnload: 0,
      components: this.landing_page.components || this.landing_page.html,
      style: this.landing_page.style || this.landing_page.css,
      storageManager: {
        type: null
      },
      styleManager: {
        clearProperties: true,
      },
      fromElement: false,
      assetManager: {
        storageType: '',
        storeOnChange: true,
        storeAfterUpload: true,
        assets: [],
        uploadFile: this.uploadImage,
      },
}

Is there a way to force an update of the edited component after the link is inserted?

Answers (2)

artfMay 22, 20210 reactions

Yeah, this is how it works right now (content is parsed and transformed in components only once the editing is finished). Probably we can use an approach like this as the default behaviour for links.

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.