Docs issue report from "features/collaboration/track-changes/track-changes-custom-features.html" #15188
Open
Description
opened on Oct 16, 2023
Origin URL
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
Activity