@witchcraft/editor
    Preparing search index...
    • Removes all fileLoader nodes from the document.

      Searches up parent wrappers of the given wrappingTypes. If any exist and have no other children, they are removed.

      Parameters

      • tr: Transaction
      • schema: Schema
      • fileLoaderTypeOrName: string | NodeType
      • wrappingTypesOrNames: (string | NodeType)[]
      • replaceTypeOrName: string | NodeType
      • callback: (
            tr: Transaction,
            pos: number,
            fileLoaderType: NodeType,
            wrappingTypes: NodeType[],
            replaceType: NodeType,
        ) => boolean = cleanupFileLoaderNode
          • (
                tr: Transaction,
                pos: number,
                fileLoaderType: NodeType,
                wrappingTypes: NodeType[],
                replaceType: NodeType,
            ): boolean
          • Like cleanupFileLoaderNodes but for single nodes when you already know the position. Returns true if it deleted a node.

            Parameters

            • tr: Transaction
            • pos: number
            • fileLoaderType: NodeType
            • wrappingTypes: NodeType[]
            • replaceType: NodeType

            Returns boolean

      Returns Transaction