Couldn't make text editable after running the "editor.getSelected().view.disableEditing()" command? Any alternate command to become editable text?
Just use the editable property (eg. editor.getSelected().set('editable', false))
Read full answer below ↓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 #3559
page.getMainComponent().view gives undefined when page is selected
Hello @artf, I want to get the HTML Element of selected page. But it returns undefined when using following code:
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...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.
Browse free plugins →Premium plugins ship with support, regular updates, and production-ready features — save days of integration work.
Browse premium plugins →Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.