-
-
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
[Document list] GHS integration #11391
[Document list] GHS integration #11391
Conversation
… with multiple strategies.
*/ | ||
|
||
import { Plugin } from 'ckeditor5/src/core'; | ||
import { setViewAttributes } from '../conversionutils.js'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be conversion-utils
.
@@ -134,25 +139,29 @@ export default class DocumentListEditing extends Plugin { | |||
// First we want to allow user to outdent all indendations from other features then he can oudent list item. | |||
outdent.registerChildCommand( commands.get( 'outdentList' ), { priority: 'lowest' } ); | |||
} | |||
|
|||
// Register conversion and model post-fixer after other plugins had a chance to register their attribute strategies. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note for Kuba: Race condition. This may be registered too late.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, the problem is that GHS is registering conversions after all the plugins got initialized (at the DataController#init
event) and that is too late for document lists to register converters. We could postpone the DL conversion (and post-fixing) registration but that would very complicate the code. So I went with the convention of prefixing document list model attributes (list
) so those can be captured by the prefix itself (when needed, the conversion itself is using the later registered conversion strategies because they are really used when any of those attributes need conversion).
packages/ckeditor5-list/src/documentlistproperties/documentlistpropertiesediting.js
Outdated
Show resolved
Hide resolved
packages/ckeditor5-html-support/src/integrations/documentlist.js
Outdated
Show resolved
Hide resolved
…prefix convention)." This reverts commit 5ad2f0f
…nt-list-ghs # Conflicts: # packages/ckeditor5-list/src/documentlist/converters.js # packages/ckeditor5-list/src/documentlist/documentlistcommand.js # packages/ckeditor5-list/src/documentlist/documentlistediting.js
packages/ckeditor5-list/src/documentlist/documentlistediting.js
Outdated
Show resolved
Hide resolved
packages/ckeditor5-html-support/tests/integrations/documentlist.js
Outdated
Show resolved
Hide resolved
return editor.destroy(); | ||
} ); | ||
|
||
describe( 'upcast', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add tests for downcast.
Suggested merge commit message (convention)
Feature (html-support): Adds support for document list in GHS. Closes #11454. Closes #11359. Closes #11358.