Keeping css inline on imported components #4485
Unanswered
gustavohleal
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi!
I'm developing an editor where the RTE was replaced by CKEditor.
When something is edited with CKEditor it adds a envolving the text with inline css defining the styling. Then the style attribute is not removed from the DOM even when the componentes are reinserted into the canvas.
The problem is: i have build one conversor to adapt some legacy HTML templates from an older editor we have. It is working really well until now. For texts we are getting the old content and inserting into divs with the
data-gjs-type = "text"
. Works ok. The problem is that inside those texts are some spans tags defining the styling added from CKEditor. Then when we open inside the grapes with RTE replaced by CKEditor, the inline styles are removed from thosespans
and thedata-gjs-type="text"
is being added to<span>
tags.Then we are losing the styling from those texts and CKEditor is not opening for
<span>
because is not recognizing it as a styling span. I'm looking for a way to add the components byeditor.addComponents
keeping the style attribute inline and prevent the editor from adding thedata-gjs-type
to spans inside adiv
with the same attribute.Is there a way?
Beta Was this translation helpful? Give feedback.
All reactions