@umbraco-cms/backoffice
    Preparing search index...

    Interface CharacterCountStorage

    interface CharacterCountStorage {
        characters: (
            options?: { mode?: "nodeSize" | "textSize"; node?: Node },
        ) => number;
        words: (options?: { node?: Node }) => number;
    }
    Index

    Properties

    Properties

    characters: (
        options?: { mode?: "nodeSize" | "textSize"; node?: Node },
    ) => number

    Get the number of characters for the current document.

    Type Declaration

      • (options?: { mode?: "nodeSize" | "textSize"; node?: Node }): number
      • Parameters

        • Optionaloptions: { mode?: "nodeSize" | "textSize"; node?: Node }

          The options for the character count. (optional)

          • Optionalmode?: "nodeSize" | "textSize"

            The mode by which the size is calculated. If set to textSize, the textContent of the document is used.

          • Optionalnode?: Node

            The node to get the characters from. Defaults to the current document.

        Returns number

    words: (options?: { node?: Node }) => number

    Get the number of words for the current document.

    Type Declaration

      • (options?: { node?: Node }): number
      • Parameters

        • Optionaloptions: { node?: Node }

          The options for the character count. (optional)

          • Optionalnode?: Node

            The node to get the words from. Defaults to the current document.

        Returns number