@ckeditor/ckeditor5-track-changes
Version:
CKEditor 5 track changes plugin.
35 lines (34 loc) • 1.6 kB
TypeScript
/**
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
*/
/**
* @module track-changes/integrations/style
*/
import { Plugin } from "@ckeditor/ckeditor5-core";
/**
* Provides track changes plugin integration for the styles dropdown feature.
*
* Two responsibilities only:
*
* 1. Wire the `style` command into attribute-suggestion tracking via
* {@link module:track-changes/trackchangesediting~TrackChangesEditing#enableDefaultAttributesIntegration}.
* The Style command mutates GHS attribute keys (`htmlSpan`, `htmlPAttributes`, ...), and those
* changes flow through the standard `recordAttributeChanges` path as `attribute`-typed suggestions.
*
* 2. Render descriptions for *legacy* `formatBlock` / `formatInline` suggestions emitted before
* the migration to attribute suggestions — see `_registerLegacyDescription`.
*
* Description rendering for *new* Style edits is owned by the GHS integration
* (`TrackChangesGeneralHtmlSupport`), which diffs the GHSAttributeBag and produces
* `Set format: class (small)` style descriptions. This integration used to register a generic
* `FORMAT_STYLE` ("style") attribute-label fallback for the same keys, but it overclaimed —
* it labeled *any* attribute change to a configured element key as "style", including non-Style
* edits — and was always shadowed by the GHS callback in practice. Removed in #9745.
*/
export declare class TrackChangesStylesDropdown extends Plugin {
/**
* @inheritDoc
*/
afterInit(): void;
}