ckeditor5 icon indicating copy to clipboard operation
ckeditor5 copied to clipboard

Docs issue report from "features/collaboration/track-changes/track-changes-custom-features.html"

Open Anamon opened this issue 2 years ago • 3 comments

Origin URL

https://ckeditor.com/docs/ckeditor5/latest/features/collaboration/track-changes/track-changes-custom-features.html

Project version

40.0.0

Is the information outdated? How?

The example code in Insertions and deletions doesn't work with the official typings. It instructs to use:

const trackChangesEditing = editor.plugins.get( 'TrackChangesEditing' );
trackChangesEditing._descriptionFactory.registerElementLabel(
    'pageBreak',

    quantity => t( {
        string: 'page break',
        plural: '%0 page breaks',
        id: 'ELEMENT_PAGE_BREAK'
    }, quantity )
);

to set the custom suggestion descriptions. However, _descriptionFactory is missing from the typing for TrackChangesEditing, so the code currently only works if the plug-in is explicitly cast to any:

const trackChangesEditing = editor.plugins.get( 'TrackChangesEditing' ) as any;

Is there something missing in the guide? What is it?

No response

Is there anything else you would like to add?

No response

User agent

Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/118.0

Anamon avatar Oct 16 '23 12:10 Anamon

cc @scofalik, @DawidKossowski

Witoso avatar Oct 16 '23 12:10 Witoso

There has been no activity on this issue for the past year. We've marked it as stale and will close it in 30 days. We understand it may still be relevant, so if you're interested in the solution, leave a comment or reaction under this issue.

CKEditorBot avatar Oct 15 '24 23:10 CKEditorBot

descriptionFactory was made a public property, so I assume this is fixed?

scofalik avatar Oct 16 '24 11:10 scofalik

There has been no activity on this issue for the past year. We've marked it as stale and will close it in 30 days. We understand it may still be relevant, so if you're interested in the solution, leave a comment or reaction under this issue.

CKEditorBot avatar Oct 16 '25 23:10 CKEditorBot

Sorry, I missed the notification last year 😅 but yes, this issue is now fixed. Thanks!

Anamon avatar Oct 17 '25 12:10 Anamon