CoreMedia CKEditor 5 Plugins
    Preparing search index...

    Data-Processor for CoreMedia RichText 1.0.

    Hierarchy

    • Observable<this>
      • RichTextDataProcessor

    Implements

    • DataProcessor
    Index

    Constructors

    Methods

    • Prepares toData transformation.

      Parameters

      • viewFragment: ViewDocumentFragment

        view fragment to transform

      Returns {
          fragmentAsStringForDebugging: string;
          htmlDomFragment: Node | DocumentFragment;
      }

      domFragment the view DOM-structure to transform; fragmentAsStringForDebugging some representation of domFragment to be used for debugging — it will only be initialized, if debug logging is turned on.

    • Registers a module:engine/view/matcher~MatcherPattern for view elements whose content should be treated as raw data and its content should be converted to a module:engine/view/element~ViewElement#getCustomProperty custom property of a view element called "$rawContent" while converting #toView to view.

      Parameters

      • pattern: MatcherPattern

        Pattern matching all view elements whose content should be treated as plain text.

      Returns void

    • Transforms CKEditor HTML to CoreMedia RichText 1.0. Note that to trigger data processor for empty text as well, you have to set the option trim: 'none' on CKEditor.getData().

      Parameters

      • viewFragment: ViewDocumentFragment

        fragment from the view model to process

      Returns string

      CoreMedia RichText 1.0 XML as string

    • Transforms data to data view, thus, from CoreMedia Rich Text 1.0 to CKEditor 5 HTML as expected in data view by CKEditor.

      Parameters

      • data: string

        data to transform

      Returns ViewDocumentFragment

    • If the processor is set to use marked fillers, it will insert &nbsp; fillers wrapped in <span> elements (<span data-cke-filler="true">&nbsp;</span>) instead of regular &nbsp; characters.

      This mode allows for more precise handling of block fillers (so they do not leak into the editor content) but bloats the editor data with additional markup.

      This mode may be required by some features and will be turned on by them automatically.

      Parameters

      • type: "default" | "marked"

        Whether to use the default or marked &nbsp; block fillers.

      Returns void