Issue #1484Opened October 8, 2018by mararn16181 reactions

[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").

image

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)

mararn1618October 9, 20180 reactions

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.

mararn1618October 9, 20180 reactions

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.

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.