GrapesJS / mjml

Newsletter Builder with MJML components in GrapesJS
http://grapesjs.com/demo-mjml.html
BSD 3-Clause "New" or "Revised" License
636 stars 226 forks source link

Using `textable` components #160

Closed mval1002 closed 1 month ago

mval1002 commented 4 years ago

I've been trying to find a way to insert placeholder text into my template all day. I spent a long time trying to use the insertHTML method of the RTE, which I had some success with, but I couldn't restore the cursor position after closing the popup. Everything I tried, the cursor would jump to the beginning.

I then came across the textable property mentioned on the main GrapesJS git here: https://github.com/artf/grapesjs/issues/481 and on this mjml plugin git here: https://github.com/artf/grapesjs-mjml/issues/32

That does not seem to be cooperating either. I'm able to drag the component to the template, but it's then completely unusable. I can't move it, change it, delete it, or anything. It seems to only add to the column and not the text blocks, which I imagine is a part of the issue. Presumably, that's due to a difference between normal Text components and MJ-Text components, but I have no idea how to resolve that.

If anyone has any advice, I'd love to hear it! I'm indifferent to doing this through the textable components or through the RTE insert, so any clues to making either one work would be great

jcze91 commented 4 years ago

Hello, did you had any news on the way to do it via textable components ?

mval1002 commented 4 years ago

No, unfortunately, nothing I've tried has solved the problem I'm facing. Either with textable components or a text editor extension.

AlexanderFinkbeiner commented 3 years ago

A solution I could think of is, to override the default Text.js Component with a new custom component which is similar to the Text Component from the root project, that it can handle the textable property in an mj-text element. But I have no idea how this could look like. Anyone else an idea?

Bran72 commented 2 years ago

Hello everyone ! Did u have some news about this ?

I'm able to create a textable component, which could be dragged into an <mj-text>, but I can't drag it between words / letters: it's always putted on the beginning šŸ‘ŽšŸ» (Of course it's fully working in a classic HTML template, without the MJML plugin).

I tried the solution proposed by @AlexanderFinkbeiner but I can't make it working... Any ideas @artf ?

Thanks and have a nice day !

LcsGa commented 11 months ago

Hi @artf! Almost 4 years later, it doesn't seem to be fixed... And there is a similar issue there opened more recently https://github.com/GrapesJS/mjml/issues/337

artf commented 1 month ago

Tried to use the textable component from this example and seems to work as expected. Note: textable components work only with the default RTE, not custom one like CKEditor.