-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add option to enable the style
element rendering
#12838
Comments
<style>
element renderingstyle
element rendering
The problem with rendering One hack around this would be to parse the content of these |
We discussed this F2F and automat style prefixing isn't trivial. There are many scenarios like:
Thus, we still believe that we can only achieve here the very basic thing which is rendering the content of the |
I created a PoC showing a simple plugin that enables rendering the The plugin is really simple: function RenderStyleElements( editor ) {
// Remove the 'style' name from the list of unsafe elements.
const unsafeElements = editor.editing.view.domConverter.unsafeElements;
const indexOfStyle = unsafeElements.indexOf( 'style' );
if ( indexOfStyle > -1 ) {
unsafeElements.splice( indexOfStyle, 1 );
}
} It has to be combined with GHS (as in the linked example) or a custom converter for NOTE: We don't plan to release such a plugin officially because it's fairly simple to customize the editor with a custom plugin. Also, we don't want to promote rendering |
📝 Provide a description of the new feature
Currently, we don't render the
<style>
element, but preserve it in the data. Sometimes, the loaded content (for example from CKEditor 4) might include some styles that should be preserved.This feature request is for introducing an option to add support for enabling
<style>
rendering on demand.If you'd like to see this feature implemented, add a 👍 reaction to this post.
The text was updated successfully, but these errors were encountered: