TrackChangesPreviewConfig
interface
Properties
-
renderFunction : ( container: HTMLElement, elements: Array<HTMLElement> ) => void | undefined
module:track-changes/trackchangesconfig~TrackChangesPreviewConfig#renderFunction
A callback function that allows for modifying the structure of the track changes preview container.
The callback receives the container element (
.ck-track-changes-preview
) and an array of root elements.- If the editor only has one root, there's only one element in the array.
- If the editor has multiple roots, the there's one element per root. They are ordered either by
order
root attribute or, if it's not present, by DOM order.
The callback should append all array elements to the container, but can also add custom classes, elements in between etc.
The default callback simply appends all elements to the container in the order they are provided.