-
-
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
Disable text transformations inside code blocks #5862
Disable text transformations inside code blocks #5862
Comments
TODO: Does it apply to inline code too? TODO: How was it fixed in inline code + autoformat case? |
I've checked the TextTransformation's code and I think that we need to be able to either disable some sort of command (which doesn't exist at the moment) or the whole plugin (which isn't "disableable" yet). I'd go with the command, if it's possible to introduce here a reasonable command. By "reasonable" I mean a command which API will make sense. If that's impossible, we should allow disabling the whole plugin. And this can be made the same way as in ckeditor/ckeditor5-widget#113 – by introducing |
I'm against a command in this case. ATM the plugin's Besides, execution of any command is, in terms of a state machine, a transition between state A and state B. This text transformation command (that brings a watcher) would impact all editor states from some point until it gets disabled. IMO it violates the "paradigm of commands" as we know it. I'm for another solution with disabling the plugin. It can have methods |
I'm fine with no command. As I said – I'd only go this way if we'd consider it clean. We recently introduced plugin disabling in one of the plugins: ckeditor/ckeditor5-widget#113. It's a copy-paste from the command API because we didn't know how soon we'll need this in another plugin. I think I'm fine with moving this to core now so the API is available for all plugins. |
OK, I'll do it that way. |
I raised few PRs for the text transformation typing issue, but probably there will be another ticket for handling conversion to code block from for example paragraph with transformed text inside, like:
|
After a lot of struggle and search,
Modify your config in ckeditor component like above |
📝 Provide detailed reproduction steps (if any)
ClassicEditor.create()
with:yarn run manual -f code-block
1/2
✔️ Expected result
1/2
should stay as1/2
.❌ Actual result
1/2
is replaced with½
📃 Other details
If you'd like to see this fixed sooner, add a 👍 reaction to this post.
The text was updated successfully, but these errors were encountered: