Closed roytang closed 7 years ago
I've used that trick to avoid some issues with text components and span
tags but not sure if it's still necessary. You can avoid it by changing the span
tag or make the parent see there is more than one child inside, for example, just by adding an empty space an the end, so from <div><span class="my-class">Test</span></div>
to <div><span class="my-class">Test</span> </div>
Hi art! I'm having the same problem. This problem is very evident when we use ckeditor plugin. See my screen cast
Thanks @rgcarrasqueira for your screen cast, but I just didn't get where is the disappeared text (or how is happening), I'd really like to solve this, so can you explain better your use case? thk
Hi Art!
I thought that my screencast could explain better than writing it. So the problem happens mainly with ckeditor plugin that addw div and span tags into the code. So, we save into a database with all stuffs right and when we recover the data from a database, or a session, for example, the grapesjs strips all code that has as div or span applied.
I've tried to replace the content for p tag and table>tr>td, after that I've saved into the database and recovered from there and all things was normal. So there is a problem with grapesjs to deal with these div and span tags, mainly if we have ckeditor applied html tags on it.
Thanks for you time to attempt that!
Ok thanks @rgcarrasqueira I'll try to fix it as soon as possible
Hey Art!
After this last update, the problem was not perceived any more running grapejs with ckeditor. I've made some content with ckeditor and the divs were not stripped from the canvas. I did not tested with default rte.
Thanks
Rogério
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
I have the following simple test case:
When I load the editor and click the "View code" button in the upper panel, the HTML is shown as:
i.e., the span tag with my custom class is removed/stripped. Why is this happening? Can I prevent it?
Thanks!