Data-Processor for CoreMedia RichText 1.0.

Hierarchy

  • Observable<this>
    • V10RichTextDataProcessor

Implements

  • default

Constructors

Accessors

Methods

  • Prepares toData transformation.

    Parameters

    • viewFragment: default

      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.

    • domFragment: Node | DocumentFragment
    • fragmentAsStringForDebugging: string
    • richTextDocument: Document
  • 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: default

      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

    • Optional targetDocument: 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