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

    Function nodeInputRule

    • Build an input rule that adds a node when the matched text is typed into it.

      Parameters

      • config: {
            find: InputRuleFinder;
            getAttributes?:
                | null
                | false
                | Record<string, any>
                | ((match: ExtendedRegExpMatchArray) => Record<string, any>);
            type: NodeType;
            undoable?: boolean;
        }
        • find: InputRuleFinder

          The regex to match.

        • OptionalgetAttributes?:
              | null
              | false
              | Record<string, any>
              | ((match: ExtendedRegExpMatchArray) => Record<string, any>)

          A function that returns the attributes for the node can also be an object of attributes

        • type: NodeType

          The node type to add.

        • Optionalundoable?: boolean

          Whether the input rule should be undoable when the user presses backspace.

      Returns InputRule