Couldn't make text editable after running the "editor.getSelected().view.disableEditing()" command? Any alternate command to become editable text?
Question
Hi @artf ,
I'm currently working on customizing link property, So in the mid of my flow, I need to restrict the selected text to become uneditable(to get exact list of text components), by doing so , I couldn't perform further RTE actions (to unlink). I followed our previoues Grapesjs guides and docs regarding Links, editors etc.. But i couldn't get to know how to make text editable again using editor command as i did for disableEditing? Here's my chunk of code,
linkRTEAction.result = function (rte) {
// insert the link with a specific href value so we can find it later
rte.exec('createLink', '__new__');
editor.getSelected().view.disableEditing();
rte.exec('unlink');
I believe that I can make unlink only after removing the disableEditing property, I need your help ASAP on removing it buddy.
Answers (1)
Just use the editable property (eg. editor.getSelected().set('editable', false))
Related Questions and Answers
Continue research with similar issue discussions.
Issue #1639
[Question]: Would it be possible to have change settings under style manager in a way that it has href when a link is created?
I'm using preset newsletter with built-in RTE (do not want to use ck editor like the demo) In order to make any text to link, i need to cli...
Issue #2953
BUG: Error when navigating out from Grapes with something selected.
Hey @artf, Steps: Open Canvas with GrapesJS, select any of the components, then click on Go to Random, I get an error that says "Cannot rea...
Issue #2101
selected content parent tag remove
https://github.com/artf/grapesjs/issues/906#issuecomment-381403858 I need to remove the html content from editor.getSelected(). Now I'm usi...
Issue #767
Generate a new grapes.min.js after make changes to grapes.js
Hi guys - happy new year, I'm currently doing some investigation of GrapesJs for our further project. The question is I fellow the https://...
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.