[Question]: Textblock subsequent rows do not give cursor/richtext editor when clicked, but are selected instead
Question
I have noticed a strange behaviour in my adaptation of GrapesJS concerning the richtext editor and the gjs-blocks-basic plugin. Whenever I drop a textblock and start writing, I will end up with one component for the dropped block and several sub-components for each row (see elements in screenshot with data-gjs-type="text").

This is okay so far. What is different and problematic is that ..
- When clicking into the text, instead of starting the richtext editor and getting a cursor, the subcomponent is selected
- In this case it is not possible to type
- Every once in a while, after clicking several times, I will get a cursor in this position
I have not seen this behavior in any of the demos and could not figure out what I am doing wrong. Can anyone help me out?
Thanks and Kind Regards
Answers (3)
Thanks, my issue seems to be a duplicate of https://github.com/artf/grapesjs/issues/761 I have tried GrapesJS 0.14.33, which should contain the fix for 761, but unfortunately it gives me a new exception within the richtext editor, which I did not have before.
index.js:141 Uncaught TypeError: Cannot read property 'body' of null
at Object.getBody (index.js:141)
at Object.getWrapperEl (index.js:149)
at i.getCanvasWrapper (CommandAbstract.js:63)
at initialize (CommandAbstract.js:26)
at i.e.View (backbone.js:1224)
at i [as constructor] (backbone.js:1884)
at new i (backbone.js:1884)
at Object.get (index.js:244)
at Object.method (index.js:146)
at keymaster.js:106
I will prepare another demo with GrapesJS 0.14.33 shortly.
I fail to recreate an isolated demo to reproduce the new exception, but I have found that the exception will also occur with GrapesJS 0.14.25, i.e. it was not introduced recently.
Related Questions and Answers
Continue research with similar issue discussions.
Issue #1895
[QUESTION] Drag component over canvas with script, script appended multiple times.
Hi, not sure if this is a bug or not. But I noticed a weird behavior, when I drag a block that has a component that contains a script funct...
Issue #1907
[QUESTION]: Drag and drop external html to editor ?
I have created a component which is heading and a block element for it. I have set the draggable property to be section html element. If I...
Issue #2061
[QUESTION] How to place a component at the end of the canvas.
How can I put my footer at the end of the canvas? I want the editor to not allow placing a block/widget below the footer. example
Issue #1982
[QUESTIONS] addcomponent after the selected component
how do I make it possible to add new components after the component I selected, at this time I use editor.DomComponents.addComponent (block...
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.