-
-
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
Close SourceEditing view on plugin disabling #17729
base: master
Are you sure you want to change the base?
Conversation
It generally works as intended, but there is more general topic to discuss. What happens with any modifications while the source mode gets disabled programmatically? The current implementation is done in a way that all changes are automatically propagated (I also reported a related issue which somehow touches it - #17738). This is because when ckeditor5/packages/ckeditor5-source-editing/src/sourceediting.ts Lines 124 to 133 in 9333cc9
ckeditor5/packages/ckeditor5-source-editing/src/sourceediting.ts Lines 294 to 298 in 9333cc9
I'll bring this topic to broader discussion so we can decide how to move forward. Maybe that was one of the reasons it earlier applied read-only mode in similar scenarios instead of switching back to WYSIWYG mode? |
Sorry for the confusion, as I suggested that maybe source editing should close if the plugin is disabled, but I didn't fully understand how this plugin operates now and what we want to achieve. Right now, the plugin has some issues, both from:
We won't solve all the problems without a bigger refactor, so let's stick to something that makes sense and is quick. Right now, when you switch to read-only following things happen in source editing plugin:
Let's go with exactly same behavior for when the plugin is disabled (e.g. for comments-only mode, note, that comments-only mode will be set to So, if the plugin gets disabled (comments-only is activated), we will disable the buttons and textareas. And I think that for this behavior we don't need any change in the plugin, correct? |
Suggested merge commit message (convention)
Other (source-editing): The SourceEditing plugin now closes its view upon being disabled, preventing users from remaining stuck in this mode.
Additional information
A change is needed to ensure that SourceEditing is properly closed when CommentsOnly mode is enabled or when SourceEditing is disabled by API calls. These two plugins should not operate simultaneously.