Issue #2916Opened July 24, 2020by mcottret1 reactions

[Bug]: Text component content not retrieved properly when using custom RTE

Question

Version: 0.16.12

Are you able to reproduce the bug from the demo ?

[ ] Yes [x] No (it does not include a custom RTE)

What is the expected behavior ?

When using a custom RTE, the generated / exported code should correspond to the RTE's generated code

What is the current behavior ?

The generated code corresponds to the text component canvas element's innerHTML.

If we take CKEditor as an example: creating an empty anchor (as shown in screenshot 1) results in GJS' generated code containing the anchor flag's <img> element (cf screenshot 2), whereas CKEditor generates it properly (cf screenshot 3).

Proposed solution:

Does this look good to you ? As always, I'd be happy to open both PRs to fix this :) !

Are you able to attach screenshots, screencasts or a live demo ?

[x] Yes (attach)

Screenshot 1 (example canvas):

<img width="200" alt="Screenshot 2020-07-24 at 4 05 06 PM" src="https://user-images.githubusercontent.com/9916749/88408361-bf547c00-cdd3-11ea-9bfa-df6dcb3b3fbb.png">

Screenshot 2 (GJS' generated code):

<img width="408" alt="Screenshot 2020-07-24 at 4 05 17 PM" src="https://user-images.githubusercontent.com/9916749/88408374-c24f6c80-cdd3-11ea-9682-fa80454fabf9.png">

Screenshot 3 (CKEditor's generated code):

<img width="818" alt="Screenshot 2020-07-24 at 5 22 57 PM" src="https://user-images.githubusercontent.com/9916749/88408382-c4b1c680-cdd3-11ea-8605-33e0ed9e6a26.png">

[ ] No

Answers (2)

artfAugust 25, 20201 reactions

Your solution seems to be correct 👍 a PR would be really helpful

mcottretAugust 26, 20200 reactions

Awesome ! artf/grapesjs-plugin-ckeditor#39 & #2977 opened.

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.