CoreMedia CKEditor 5 Plugins
    Preparing search index...

    Class BBCodeDataProcessor

    Data processor for BBCode.

    This data processor converts BBCode to HTML and uses the HtmlDataProcessor to generate the resulting view tree.

    Implements

    • DataProcessor
    Index

    Constructors

    Methods

    • Registers a MatcherPattern for view elements whose content should be treated as raw data and not processed during the conversion from generated HTML to view elements.

      The raw data can be later accessed by a custom property of a view element called "$rawContent".

      Parameters

      • pattern: MatcherPattern

        The pattern matching all view elements whose content should be treated as raw data.

      Returns void

    • Converts the provided DocumentFragment to data format — in this case to a BBCode string.

      Parameters

      • viewFragment: ViewDocumentFragment

        The viewFragment.

      Returns string

      BBCode string.

    • Converts the provided BBCode string to a data view tree.

      Parameters

      • data: string

        The BBCode string.

      Returns ViewDocumentFragment

      The converted view element.