Skip to content
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

Merged
merged 27 commits into from
Mar 30, 2022

Conversation

Reinmar
Copy link
Member

@Reinmar Reinmar commented Mar 3, 2022

Suggested merge commit message (convention)

Feature (html-support): Adds support for document list in GHS. Closes #11454. Closes #11359. Closes #11358.

*/

import { Plugin } from 'ckeditor5/src/core';
import { setViewAttributes } from '../conversionutils.js';
Copy link
Member Author

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.
Copy link
Member Author

@Reinmar Reinmar Mar 3, 2022

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.

Copy link
Contributor

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).

…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
return editor.destroy();
} );

describe( 'upcast', () => {
Copy link
Contributor

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.

Base automatically changed from ck/11065-document-list-properties to ck/10812-document-list-editing March 22, 2022 14:54
@niegowski niegowski changed the base branch from ck/10812-document-list-editing to ck/epic/2973-document-lists March 22, 2022 15:10
@arkflpc arkflpc merged commit 24f77dc into ck/epic/2973-document-lists Mar 30, 2022
@arkflpc arkflpc deleted the ck/11284-document-list-ghs branch March 30, 2022 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants