Module

engine/model/utils/autoparagraphing

@ckeditor/ckeditor5-engine/src/model/utils/autoparagraphing

module

Filtering

Functions

  • autoParagraphEmptyRoots( writer ) → Boolean

    protected

    Fixes all empty roots.

    Parameters

    writer : Writer

    The model writer.

    Returns

    Boolean

    true if any change has been applied, false otherwise.

  • isParagraphable( position, nodeOrType, schema )

    protected

    Checks if the given node wrapped with a paragraph would be accepted by the schema in the given position.

    Parameters

    position : Position

    The position at which to check.

    nodeOrType : Node | String

    The child node or child type to check.

    schema : Schema

    A schema instance used for element validation.

  • wrapInParagraph( position, writer ) → Position

    protected

    Inserts a new paragraph at the given position and returns a position inside that paragraph.

    Parameters

    position : Position

    The position where a paragraph should be inserted.

    writer : Writer

    The model writer.

    Returns

    Position

    Position inside the created paragraph.