CoreMedia CKEditor 5 Plugins
    Preparing search index...

    Data-Processor for CoreMedia RichText 1.0.

    Hierarchy

    • Observable<this>
      • V10RichTextDataProcessor

    Implements

    • DataProcessor
    Index

    Constructors

    Accessors

    Methods

    • Prepares toData transformation.

      Parameters

      • viewFragment: ViewDocumentFragment

        view fragment to transform

      Returns {
          domFragment: Node | DocumentFragment;
          fragmentAsStringForDebugging: string;
          richTextDocument: Document;
      }

      richTextDocument the (empty) document, which shall receive the transformed data; 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 view model to process

      Returns string

      CoreMedia RichText 1.0 XML as string

    • Internal toData transformation, especially meant for testing purpose.

      Parameters

      • fromView: Node | DocumentFragment

        the fragment created from view

      • OptionaltargetDocument: Document

        the target document, which will get the elements added and will be transformed according to the rules

      Returns string

      the transformed CoreMedia RichText XML

    • 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