Report an issue
Module

paste-from-office/filters/parse

@ckeditor/ckeditor5-paste-from-office/src/filters/parse

module

Filtering

Functions

  • parseHtml( htmlString ) → Object

    static

    Parses provided HTML extracting contents of <body> and <style> tags.

    Parameters

    htmlString : String

    HTML string to be parsed.

    Returns

    Object

    result

    DocumentFragment

    result.body Parsed body content as a traversable structure.

    String

    result.bodyString Entire body content as a string.

    Array.<CSSStyleSheet>

    result.styles Array of native CSSStyleSheet objects, each representing separate style tag from the source HTML.

    String

    result.stylesString All style tags contents combined in the order of occurrence into one string.