@tiptap/core 3.10.7 → 3.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +217 -79
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +116 -5
- package/dist/index.d.ts +116 -5
- package/dist/index.js +210 -72
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/src/Editor.ts +5 -0
- package/src/commands/index.ts +2 -0
- package/src/commands/resetAttributes.ts +20 -12
- package/src/commands/setTextDirection.ts +51 -0
- package/src/commands/unsetTextDirection.ts +51 -0
- package/src/commands/updateAttributes.ts +68 -58
- package/src/extensions/index.ts +1 -0
- package/src/extensions/textDirection.ts +86 -0
- package/src/helpers/getSchemaByResolvedExtensions.ts +2 -2
- package/src/types.ts +65 -2
- package/src/utilities/markdown/parseIndentedBlocks.ts +2 -1
package/dist/index.d.cts
CHANGED
|
@@ -1164,6 +1164,14 @@ interface EditorOptions {
|
|
|
1164
1164
|
* Whether the editor is editable
|
|
1165
1165
|
*/
|
|
1166
1166
|
editable: boolean;
|
|
1167
|
+
/**
|
|
1168
|
+
* The default text direction for all content in the editor.
|
|
1169
|
+
* When set to 'ltr' or 'rtl', all nodes will have the corresponding dir attribute.
|
|
1170
|
+
* When set to 'auto', the dir attribute will be set based on content detection.
|
|
1171
|
+
* When undefined, no dir attribute will be added.
|
|
1172
|
+
* @default undefined
|
|
1173
|
+
*/
|
|
1174
|
+
textDirection?: 'ltr' | 'rtl' | 'auto';
|
|
1167
1175
|
/**
|
|
1168
1176
|
* The editor's props
|
|
1169
1177
|
*/
|
|
@@ -1217,7 +1225,7 @@ interface EditorOptions {
|
|
|
1217
1225
|
*
|
|
1218
1226
|
* @default true
|
|
1219
1227
|
*/
|
|
1220
|
-
enableCoreExtensions?: boolean | Partial<Record<'editable' | 'clipboardTextSerializer' | 'commands' | 'focusEvents' | 'keymap' | 'tabindex' | 'drop' | 'paste' | 'delete', false>>;
|
|
1228
|
+
enableCoreExtensions?: boolean | Partial<Record<'editable' | 'clipboardTextSerializer' | 'commands' | 'focusEvents' | 'keymap' | 'tabindex' | 'drop' | 'paste' | 'delete' | 'textDirection', false>>;
|
|
1221
1229
|
/**
|
|
1222
1230
|
* If `true`, the editor will check the content for errors on initialization.
|
|
1223
1231
|
* Emitting the `contentError` event if the content is invalid.
|
|
@@ -1297,17 +1305,71 @@ interface EditorOptions {
|
|
|
1297
1305
|
*/
|
|
1298
1306
|
type HTMLContent = string;
|
|
1299
1307
|
/**
|
|
1300
|
-
*
|
|
1308
|
+
* A Tiptap JSON node or document. Tiptap JSON is the standard format for
|
|
1309
|
+
* storing and manipulating Tiptap content. It is equivalent to the JSON
|
|
1310
|
+
* representation of a Prosemirror node.
|
|
1311
|
+
*
|
|
1312
|
+
* Tiptap JSON documents are trees of nodes. The root node is usually of type
|
|
1313
|
+
* `doc`. Nodes can have other nodes as children. Nodes can also have marks and
|
|
1314
|
+
* attributes. Text nodes (nodes with type `text`) have a `text` property and no
|
|
1315
|
+
* children.
|
|
1316
|
+
*
|
|
1317
|
+
* @example
|
|
1318
|
+
* ```ts
|
|
1319
|
+
* const content: JSONContent = {
|
|
1320
|
+
* type: 'doc',
|
|
1321
|
+
* content: [
|
|
1322
|
+
* {
|
|
1323
|
+
* type: 'paragraph',
|
|
1324
|
+
* content: [
|
|
1325
|
+
* {
|
|
1326
|
+
* type: 'text',
|
|
1327
|
+
* text: 'Hello ',
|
|
1328
|
+
* },
|
|
1329
|
+
* {
|
|
1330
|
+
* type: 'text',
|
|
1331
|
+
* text: 'world',
|
|
1332
|
+
* marks: [{ type: 'bold' }],
|
|
1333
|
+
* },
|
|
1334
|
+
* ],
|
|
1335
|
+
* },
|
|
1336
|
+
* ],
|
|
1337
|
+
* }
|
|
1338
|
+
* ```
|
|
1301
1339
|
*/
|
|
1302
1340
|
type JSONContent = {
|
|
1341
|
+
/**
|
|
1342
|
+
* The type of the node
|
|
1343
|
+
*/
|
|
1303
1344
|
type?: string;
|
|
1345
|
+
/**
|
|
1346
|
+
* The attributes of the node. Attributes can have any JSON-serializable value.
|
|
1347
|
+
*/
|
|
1304
1348
|
attrs?: Record<string, any> | undefined;
|
|
1349
|
+
/**
|
|
1350
|
+
* The children of the node. A node can have other nodes as children.
|
|
1351
|
+
*/
|
|
1305
1352
|
content?: JSONContent[];
|
|
1353
|
+
/**
|
|
1354
|
+
* A list of marks of the node. Inline nodes can have marks.
|
|
1355
|
+
*/
|
|
1306
1356
|
marks?: {
|
|
1357
|
+
/**
|
|
1358
|
+
* The type of the mark
|
|
1359
|
+
*/
|
|
1307
1360
|
type: string;
|
|
1361
|
+
/**
|
|
1362
|
+
* The attributes of the mark. Attributes can have any JSON-serializable value.
|
|
1363
|
+
*/
|
|
1308
1364
|
attrs?: Record<string, any>;
|
|
1309
1365
|
[key: string]: any;
|
|
1310
1366
|
}[];
|
|
1367
|
+
/**
|
|
1368
|
+
* The text content of the node. This property is only present on text nodes
|
|
1369
|
+
* (i.e. nodes with `type: 'text'`).
|
|
1370
|
+
*
|
|
1371
|
+
* Text nodes cannot have children, but they can have marks.
|
|
1372
|
+
*/
|
|
1311
1373
|
text?: string;
|
|
1312
1374
|
[key: string]: any;
|
|
1313
1375
|
};
|
|
@@ -2892,6 +2954,23 @@ declare module '@tiptap/core' {
|
|
|
2892
2954
|
}
|
|
2893
2955
|
declare const setNodeSelection: RawCommands['setNodeSelection'];
|
|
2894
2956
|
|
|
2957
|
+
declare module '@tiptap/core' {
|
|
2958
|
+
interface Commands<ReturnType> {
|
|
2959
|
+
setTextDirection: {
|
|
2960
|
+
/**
|
|
2961
|
+
* Set the text direction for nodes.
|
|
2962
|
+
* If no position is provided, it will use the current selection.
|
|
2963
|
+
* @param direction The text direction to set ('ltr', 'rtl', or 'auto')
|
|
2964
|
+
* @param position Optional position or range to apply the direction to
|
|
2965
|
+
* @example editor.commands.setTextDirection('rtl')
|
|
2966
|
+
* @example editor.commands.setTextDirection('ltr', { from: 0, to: 10 })
|
|
2967
|
+
*/
|
|
2968
|
+
setTextDirection: (direction: 'ltr' | 'rtl' | 'auto', position?: number | Range) => ReturnType;
|
|
2969
|
+
};
|
|
2970
|
+
}
|
|
2971
|
+
}
|
|
2972
|
+
declare const setTextDirection: RawCommands['setTextDirection'];
|
|
2973
|
+
|
|
2895
2974
|
declare module '@tiptap/core' {
|
|
2896
2975
|
interface Commands<ReturnType> {
|
|
2897
2976
|
setTextSelection: {
|
|
@@ -3079,6 +3158,22 @@ declare module '@tiptap/core' {
|
|
|
3079
3158
|
}
|
|
3080
3159
|
declare const unsetMark: RawCommands['unsetMark'];
|
|
3081
3160
|
|
|
3161
|
+
declare module '@tiptap/core' {
|
|
3162
|
+
interface Commands<ReturnType> {
|
|
3163
|
+
unsetTextDirection: {
|
|
3164
|
+
/**
|
|
3165
|
+
* Remove the text direction attribute from nodes.
|
|
3166
|
+
* If no position is provided, it will use the current selection.
|
|
3167
|
+
* @param position Optional position or range to remove the direction from
|
|
3168
|
+
* @example editor.commands.unsetTextDirection()
|
|
3169
|
+
* @example editor.commands.unsetTextDirection({ from: 0, to: 10 })
|
|
3170
|
+
*/
|
|
3171
|
+
unsetTextDirection: (position?: number | Range) => ReturnType;
|
|
3172
|
+
};
|
|
3173
|
+
}
|
|
3174
|
+
}
|
|
3175
|
+
declare const unsetTextDirection: RawCommands['unsetTextDirection'];
|
|
3176
|
+
|
|
3082
3177
|
declare module '@tiptap/core' {
|
|
3083
3178
|
interface Commands<ReturnType> {
|
|
3084
3179
|
updateAttributes: {
|
|
@@ -3179,6 +3274,7 @@ declare const index$2_setMark: typeof setMark;
|
|
|
3179
3274
|
declare const index$2_setMeta: typeof setMeta;
|
|
3180
3275
|
declare const index$2_setNode: typeof setNode;
|
|
3181
3276
|
declare const index$2_setNodeSelection: typeof setNodeSelection;
|
|
3277
|
+
declare const index$2_setTextDirection: typeof setTextDirection;
|
|
3182
3278
|
declare const index$2_setTextSelection: typeof setTextSelection;
|
|
3183
3279
|
declare const index$2_sinkListItem: typeof sinkListItem;
|
|
3184
3280
|
declare const index$2_splitBlock: typeof splitBlock;
|
|
@@ -3190,11 +3286,12 @@ declare const index$2_toggleWrap: typeof toggleWrap;
|
|
|
3190
3286
|
declare const index$2_undoInputRule: typeof undoInputRule;
|
|
3191
3287
|
declare const index$2_unsetAllMarks: typeof unsetAllMarks;
|
|
3192
3288
|
declare const index$2_unsetMark: typeof unsetMark;
|
|
3289
|
+
declare const index$2_unsetTextDirection: typeof unsetTextDirection;
|
|
3193
3290
|
declare const index$2_updateAttributes: typeof updateAttributes;
|
|
3194
3291
|
declare const index$2_wrapIn: typeof wrapIn;
|
|
3195
3292
|
declare const index$2_wrapInList: typeof wrapInList;
|
|
3196
3293
|
declare namespace index$2 {
|
|
3197
|
-
export { type index$2_InsertContentAtOptions as InsertContentAtOptions, type index$2_InsertContentOptions as InsertContentOptions, type index$2_SetContentOptions as SetContentOptions, index$2_blur as blur, index$2_clearContent as clearContent, index$2_clearNodes as clearNodes, index$2_command as command, index$2_createParagraphNear as createParagraphNear, index$2_cut as cut, index$2_deleteCurrentNode as deleteCurrentNode, index$2_deleteNode as deleteNode, index$2_deleteRange as deleteRange, index$2_deleteSelection as deleteSelection, index$2_enter as enter, index$2_exitCode as exitCode, index$2_extendMarkRange as extendMarkRange, index$2_first as first, index$2_focus as focus, index$2_forEach as forEach, index$2_insertContent as insertContent, index$2_insertContentAt as insertContentAt, index$2_joinBackward as joinBackward, index$2_joinDown as joinDown, index$2_joinForward as joinForward, index$2_joinItemBackward as joinItemBackward, index$2_joinItemForward as joinItemForward, index$2_joinTextblockBackward as joinTextblockBackward, index$2_joinTextblockForward as joinTextblockForward, index$2_joinUp as joinUp, index$2_keyboardShortcut as keyboardShortcut, index$2_lift as lift, index$2_liftEmptyBlock as liftEmptyBlock, index$2_liftListItem as liftListItem, index$2_newlineInCode as newlineInCode, index$2_resetAttributes as resetAttributes, index$2_scrollIntoView as scrollIntoView, index$2_selectAll as selectAll, index$2_selectNodeBackward as selectNodeBackward, index$2_selectNodeForward as selectNodeForward, index$2_selectParentNode as selectParentNode, index$2_selectTextblockEnd as selectTextblockEnd, index$2_selectTextblockStart as selectTextblockStart, index$2_setContent as setContent, index$2_setMark as setMark, index$2_setMeta as setMeta, index$2_setNode as setNode, index$2_setNodeSelection as setNodeSelection, index$2_setTextSelection as setTextSelection, index$2_sinkListItem as sinkListItem, index$2_splitBlock as splitBlock, index$2_splitListItem as splitListItem, index$2_toggleList as toggleList, index$2_toggleMark as toggleMark, index$2_toggleNode as toggleNode, index$2_toggleWrap as toggleWrap, index$2_undoInputRule as undoInputRule, index$2_unsetAllMarks as unsetAllMarks, index$2_unsetMark as unsetMark, index$2_updateAttributes as updateAttributes, index$2_wrapIn as wrapIn, index$2_wrapInList as wrapInList };
|
|
3294
|
+
export { type index$2_InsertContentAtOptions as InsertContentAtOptions, type index$2_InsertContentOptions as InsertContentOptions, type index$2_SetContentOptions as SetContentOptions, index$2_blur as blur, index$2_clearContent as clearContent, index$2_clearNodes as clearNodes, index$2_command as command, index$2_createParagraphNear as createParagraphNear, index$2_cut as cut, index$2_deleteCurrentNode as deleteCurrentNode, index$2_deleteNode as deleteNode, index$2_deleteRange as deleteRange, index$2_deleteSelection as deleteSelection, index$2_enter as enter, index$2_exitCode as exitCode, index$2_extendMarkRange as extendMarkRange, index$2_first as first, index$2_focus as focus, index$2_forEach as forEach, index$2_insertContent as insertContent, index$2_insertContentAt as insertContentAt, index$2_joinBackward as joinBackward, index$2_joinDown as joinDown, index$2_joinForward as joinForward, index$2_joinItemBackward as joinItemBackward, index$2_joinItemForward as joinItemForward, index$2_joinTextblockBackward as joinTextblockBackward, index$2_joinTextblockForward as joinTextblockForward, index$2_joinUp as joinUp, index$2_keyboardShortcut as keyboardShortcut, index$2_lift as lift, index$2_liftEmptyBlock as liftEmptyBlock, index$2_liftListItem as liftListItem, index$2_newlineInCode as newlineInCode, index$2_resetAttributes as resetAttributes, index$2_scrollIntoView as scrollIntoView, index$2_selectAll as selectAll, index$2_selectNodeBackward as selectNodeBackward, index$2_selectNodeForward as selectNodeForward, index$2_selectParentNode as selectParentNode, index$2_selectTextblockEnd as selectTextblockEnd, index$2_selectTextblockStart as selectTextblockStart, index$2_setContent as setContent, index$2_setMark as setMark, index$2_setMeta as setMeta, index$2_setNode as setNode, index$2_setNodeSelection as setNodeSelection, index$2_setTextDirection as setTextDirection, index$2_setTextSelection as setTextSelection, index$2_sinkListItem as sinkListItem, index$2_splitBlock as splitBlock, index$2_splitListItem as splitListItem, index$2_toggleList as toggleList, index$2_toggleMark as toggleMark, index$2_toggleNode as toggleNode, index$2_toggleWrap as toggleWrap, index$2_undoInputRule as undoInputRule, index$2_unsetAllMarks as unsetAllMarks, index$2_unsetMark as unsetMark, index$2_unsetTextDirection as unsetTextDirection, index$2_updateAttributes as updateAttributes, index$2_wrapIn as wrapIn, index$2_wrapInList as wrapInList };
|
|
3198
3295
|
}
|
|
3199
3296
|
|
|
3200
3297
|
declare const Commands$1: Extension<any, any>;
|
|
@@ -3217,6 +3314,19 @@ declare const Paste: Extension<any, any>;
|
|
|
3217
3314
|
|
|
3218
3315
|
declare const Tabindex: Extension<any, any>;
|
|
3219
3316
|
|
|
3317
|
+
interface TextDirectionOptions {
|
|
3318
|
+
direction: 'ltr' | 'rtl' | 'auto' | undefined;
|
|
3319
|
+
}
|
|
3320
|
+
/**
|
|
3321
|
+
* The TextDirection extension adds support for setting text direction (LTR/RTL/auto)
|
|
3322
|
+
* on all nodes in the editor.
|
|
3323
|
+
*
|
|
3324
|
+
* This extension adds a global `dir` attribute to all node types, which can be used
|
|
3325
|
+
* to control bidirectional text rendering. The direction can be set globally via
|
|
3326
|
+
* editor options or per-node using commands.
|
|
3327
|
+
*/
|
|
3328
|
+
declare const TextDirection: Extension<TextDirectionOptions, any>;
|
|
3329
|
+
|
|
3220
3330
|
declare const index$1_ClipboardTextSerializer: typeof ClipboardTextSerializer;
|
|
3221
3331
|
declare const index$1_Delete: typeof Delete;
|
|
3222
3332
|
declare const index$1_Drop: typeof Drop;
|
|
@@ -3225,9 +3335,10 @@ declare const index$1_FocusEvents: typeof FocusEvents;
|
|
|
3225
3335
|
declare const index$1_Keymap: typeof Keymap;
|
|
3226
3336
|
declare const index$1_Paste: typeof Paste;
|
|
3227
3337
|
declare const index$1_Tabindex: typeof Tabindex;
|
|
3338
|
+
declare const index$1_TextDirection: typeof TextDirection;
|
|
3228
3339
|
declare const index$1_focusEventsPluginKey: typeof focusEventsPluginKey;
|
|
3229
3340
|
declare namespace index$1 {
|
|
3230
|
-
export { index$1_ClipboardTextSerializer as ClipboardTextSerializer, Commands$1 as Commands, index$1_Delete as Delete, index$1_Drop as Drop, index$1_Editable as Editable, index$1_FocusEvents as FocusEvents, index$1_Keymap as Keymap, index$1_Paste as Paste, index$1_Tabindex as Tabindex, index$1_focusEventsPluginKey as focusEventsPluginKey };
|
|
3341
|
+
export { index$1_ClipboardTextSerializer as ClipboardTextSerializer, Commands$1 as Commands, index$1_Delete as Delete, index$1_Drop as Drop, index$1_Editable as Editable, index$1_FocusEvents as FocusEvents, index$1_Keymap as Keymap, index$1_Paste as Paste, index$1_Tabindex as Tabindex, index$1_TextDirection as TextDirection, index$1_focusEventsPluginKey as focusEventsPluginKey };
|
|
3231
3342
|
}
|
|
3232
3343
|
|
|
3233
3344
|
interface TiptapEditorHTMLElement extends HTMLElement {
|
|
@@ -4532,4 +4643,4 @@ interface Commands<ReturnType = any> {
|
|
|
4532
4643
|
interface Storage {
|
|
4533
4644
|
}
|
|
4534
4645
|
|
|
4535
|
-
export { type AnyCommands, type AnyConfig, type AnyExtension, type AtomBlockMarkdownSpecOptions, type Attribute, type Attributes$1 as Attributes, type BlockMarkdownSpecOptions, type BlockParserConfig, type CanCommands, type ChainedCommands, type ChangedRange, type Command, CommandManager, type CommandProps, type CommandSpec, type Commands, type Content, type CreateNodeFromContentOptions, type DOMNode, type DOMOutputSpecArray$1 as DOMOutputSpecArray, type DecorationType, type DecorationWithType, type Diff, type Dispatch, type DocumentType, Editor, type EditorEvents, type EditorOptions, type EnableRules, Extendable, type ExtendableConfig, type ExtendedRegExpMatchArray, Extension, type ExtensionAttribute, type ExtensionConfig, type Extensions, type FocusPosition, Fragment, type FullMarkdownHelpers, type GlobalAttributes, type HTMLContent, type InlineMarkdownSpecOptions, InputRule, type InputRuleFinder, type InputRuleMatch, type InsertContentAtOptions, type InsertContentOptions, type JSONContent, type KeyboardShortcutCommand, type KeysWithTypeOf, Mark, type MarkConfig, type MarkRange, type MarkType, MarkView, type MarkViewProps, type MarkViewRenderer, type MarkViewRendererOptions, type MarkViewRendererProps, type MarkdownExtensionSpec, type MarkdownHelpers, type MarkdownLexerConfiguration, type MarkdownParseHelpers, type MarkdownParseResult, type MarkdownRendererHelpers, type MarkdownToken, type MarkdownTokenizer, type MaybeReturnType, type MaybeThisParameterType, Node, type NodeConfig, NodePos, type NodeRange, type NodeType, NodeView, type NodeViewProps, type NodeViewRenderer, type NodeViewRendererOptions, type NodeViewRendererProps, type NodeWithPos, type Overwrite, type ParentConfig, type ParsedBlock, PasteRule, type PasteRuleFinder, type PasteRuleMatch, type PickValue, type Predicate, type Primitive, type Range, type RawCommands, type RemoveThis, type RenderContext, type ResizableNodeDimensions, ResizableNodeView, type ResizableNodeViewDirection, type ResizableNodeViewOptions, ResizableNodeview, type SetContentOptions, type SingleCommands, type Storage, type TextSerializer, type TextType, type TiptapEditorHTMLElement, Tracker, type TrackerResult, type UnionCommands, type UnionToIntersection, type ValuesOf, blur, callOrReturn, canInsertNode, clearContent, clearNodes, combineTransactionSteps, command, index$2 as commands, createAtomBlockMarkdownSpec, createBlockMarkdownSpec, createChainableState, createDocument, h as createElement, createInlineMarkdownSpec, createNodeFromContent, createParagraphNear, createStyleTag, cut, defaultBlockAt, deleteCurrentNode, deleteNode, deleteProps, deleteRange, deleteSelection, elementFromString, enter, escapeForRegEx, exitCode, extendMarkRange, index$1 as extensions, findChildren, findChildrenInRange, findDuplicates, findParentNode, findParentNodeClosestToPos, first, flattenExtensions, focus, forEach, fromString, generateHTML, generateJSON, generateText, getAttributes, getAttributesFromExtensions, getChangedRanges, getDebugJSON, getExtensionField, getHTMLFromFragment, getMarkAttributes, getMarkRange, getMarkType, getMarksBetween, getNodeAtPosition, getNodeAttributes, getNodeType, getRenderedAttributes, getSchema, getSchemaByResolvedExtensions, getSchemaTypeByName, getSchemaTypeNameByName, getSplittedAttributes, getText, getTextBetween, getTextContentFromNodes, getTextSerializersFromSchema, h, injectExtensionAttributesToParseRule, inputRulesPlugin, insertContent, insertContentAt, isActive, isAndroid, isAtEndOfNode, isAtStartOfNode, isEmptyObject, isExtensionRulesEnabled, isFunction, isList, isMacOS, isMarkActive, isNodeActive, isNodeEmpty, isNodeSelection, isNumber, isPlainObject, isRegExp, isString, isTextSelection, isiOS, joinBackward, joinDown, joinForward, joinItemBackward, joinItemForward, joinTextblockBackward, joinTextblockForward, joinUp, keyboardShortcut, lift, liftEmptyBlock, liftListItem, markInputRule, markPasteRule, index as markdown, mergeAttributes, mergeDeep, minMax, newlineInCode, nodeInputRule, nodePasteRule, objectIncludes, parseAttributes, parseIndentedBlocks, pasteRulesPlugin, posToDOMRect, removeDuplicates, renderNestedMarkdownContent, resetAttributes, resolveExtensions, resolveFocusPosition, rewriteUnknownContent, scrollIntoView, selectAll, selectNodeBackward, selectNodeForward, selectParentNode, selectTextblockEnd, selectTextblockStart, selectionToInsertionEnd, serializeAttributes, setContent, setMark, setMeta, setNode, setNodeSelection, setTextSelection, sinkListItem, sortExtensions, splitBlock, splitExtensions, splitListItem, textInputRule, textPasteRule, textblockTypeInputRule, toggleList, toggleMark, toggleNode, toggleWrap, undoInputRule, unsetAllMarks, unsetMark, updateAttributes, updateMarkViewAttributes, wrapIn, wrapInList, wrappingInputRule };
|
|
4646
|
+
export { type AnyCommands, type AnyConfig, type AnyExtension, type AtomBlockMarkdownSpecOptions, type Attribute, type Attributes$1 as Attributes, type BlockMarkdownSpecOptions, type BlockParserConfig, type CanCommands, type ChainedCommands, type ChangedRange, type Command, CommandManager, type CommandProps, type CommandSpec, type Commands, type Content, type CreateNodeFromContentOptions, type DOMNode, type DOMOutputSpecArray$1 as DOMOutputSpecArray, type DecorationType, type DecorationWithType, type Diff, type Dispatch, type DocumentType, Editor, type EditorEvents, type EditorOptions, type EnableRules, Extendable, type ExtendableConfig, type ExtendedRegExpMatchArray, Extension, type ExtensionAttribute, type ExtensionConfig, type Extensions, type FocusPosition, Fragment, type FullMarkdownHelpers, type GlobalAttributes, type HTMLContent, type InlineMarkdownSpecOptions, InputRule, type InputRuleFinder, type InputRuleMatch, type InsertContentAtOptions, type InsertContentOptions, type JSONContent, type KeyboardShortcutCommand, type KeysWithTypeOf, Mark, type MarkConfig, type MarkRange, type MarkType, MarkView, type MarkViewProps, type MarkViewRenderer, type MarkViewRendererOptions, type MarkViewRendererProps, type MarkdownExtensionSpec, type MarkdownHelpers, type MarkdownLexerConfiguration, type MarkdownParseHelpers, type MarkdownParseResult, type MarkdownRendererHelpers, type MarkdownToken, type MarkdownTokenizer, type MaybeReturnType, type MaybeThisParameterType, Node, type NodeConfig, NodePos, type NodeRange, type NodeType, NodeView, type NodeViewProps, type NodeViewRenderer, type NodeViewRendererOptions, type NodeViewRendererProps, type NodeWithPos, type Overwrite, type ParentConfig, type ParsedBlock, PasteRule, type PasteRuleFinder, type PasteRuleMatch, type PickValue, type Predicate, type Primitive, type Range, type RawCommands, type RemoveThis, type RenderContext, type ResizableNodeDimensions, ResizableNodeView, type ResizableNodeViewDirection, type ResizableNodeViewOptions, ResizableNodeview, type SetContentOptions, type SingleCommands, type Storage, type TextSerializer, type TextType, type TiptapEditorHTMLElement, Tracker, type TrackerResult, type UnionCommands, type UnionToIntersection, type ValuesOf, blur, callOrReturn, canInsertNode, clearContent, clearNodes, combineTransactionSteps, command, index$2 as commands, createAtomBlockMarkdownSpec, createBlockMarkdownSpec, createChainableState, createDocument, h as createElement, createInlineMarkdownSpec, createNodeFromContent, createParagraphNear, createStyleTag, cut, defaultBlockAt, deleteCurrentNode, deleteNode, deleteProps, deleteRange, deleteSelection, elementFromString, enter, escapeForRegEx, exitCode, extendMarkRange, index$1 as extensions, findChildren, findChildrenInRange, findDuplicates, findParentNode, findParentNodeClosestToPos, first, flattenExtensions, focus, forEach, fromString, generateHTML, generateJSON, generateText, getAttributes, getAttributesFromExtensions, getChangedRanges, getDebugJSON, getExtensionField, getHTMLFromFragment, getMarkAttributes, getMarkRange, getMarkType, getMarksBetween, getNodeAtPosition, getNodeAttributes, getNodeType, getRenderedAttributes, getSchema, getSchemaByResolvedExtensions, getSchemaTypeByName, getSchemaTypeNameByName, getSplittedAttributes, getText, getTextBetween, getTextContentFromNodes, getTextSerializersFromSchema, h, injectExtensionAttributesToParseRule, inputRulesPlugin, insertContent, insertContentAt, isActive, isAndroid, isAtEndOfNode, isAtStartOfNode, isEmptyObject, isExtensionRulesEnabled, isFunction, isList, isMacOS, isMarkActive, isNodeActive, isNodeEmpty, isNodeSelection, isNumber, isPlainObject, isRegExp, isString, isTextSelection, isiOS, joinBackward, joinDown, joinForward, joinItemBackward, joinItemForward, joinTextblockBackward, joinTextblockForward, joinUp, keyboardShortcut, lift, liftEmptyBlock, liftListItem, markInputRule, markPasteRule, index as markdown, mergeAttributes, mergeDeep, minMax, newlineInCode, nodeInputRule, nodePasteRule, objectIncludes, parseAttributes, parseIndentedBlocks, pasteRulesPlugin, posToDOMRect, removeDuplicates, renderNestedMarkdownContent, resetAttributes, resolveExtensions, resolveFocusPosition, rewriteUnknownContent, scrollIntoView, selectAll, selectNodeBackward, selectNodeForward, selectParentNode, selectTextblockEnd, selectTextblockStart, selectionToInsertionEnd, serializeAttributes, setContent, setMark, setMeta, setNode, setNodeSelection, setTextDirection, setTextSelection, sinkListItem, sortExtensions, splitBlock, splitExtensions, splitListItem, textInputRule, textPasteRule, textblockTypeInputRule, toggleList, toggleMark, toggleNode, toggleWrap, undoInputRule, unsetAllMarks, unsetMark, unsetTextDirection, updateAttributes, updateMarkViewAttributes, wrapIn, wrapInList, wrappingInputRule };
|
package/dist/index.d.ts
CHANGED
|
@@ -1164,6 +1164,14 @@ interface EditorOptions {
|
|
|
1164
1164
|
* Whether the editor is editable
|
|
1165
1165
|
*/
|
|
1166
1166
|
editable: boolean;
|
|
1167
|
+
/**
|
|
1168
|
+
* The default text direction for all content in the editor.
|
|
1169
|
+
* When set to 'ltr' or 'rtl', all nodes will have the corresponding dir attribute.
|
|
1170
|
+
* When set to 'auto', the dir attribute will be set based on content detection.
|
|
1171
|
+
* When undefined, no dir attribute will be added.
|
|
1172
|
+
* @default undefined
|
|
1173
|
+
*/
|
|
1174
|
+
textDirection?: 'ltr' | 'rtl' | 'auto';
|
|
1167
1175
|
/**
|
|
1168
1176
|
* The editor's props
|
|
1169
1177
|
*/
|
|
@@ -1217,7 +1225,7 @@ interface EditorOptions {
|
|
|
1217
1225
|
*
|
|
1218
1226
|
* @default true
|
|
1219
1227
|
*/
|
|
1220
|
-
enableCoreExtensions?: boolean | Partial<Record<'editable' | 'clipboardTextSerializer' | 'commands' | 'focusEvents' | 'keymap' | 'tabindex' | 'drop' | 'paste' | 'delete', false>>;
|
|
1228
|
+
enableCoreExtensions?: boolean | Partial<Record<'editable' | 'clipboardTextSerializer' | 'commands' | 'focusEvents' | 'keymap' | 'tabindex' | 'drop' | 'paste' | 'delete' | 'textDirection', false>>;
|
|
1221
1229
|
/**
|
|
1222
1230
|
* If `true`, the editor will check the content for errors on initialization.
|
|
1223
1231
|
* Emitting the `contentError` event if the content is invalid.
|
|
@@ -1297,17 +1305,71 @@ interface EditorOptions {
|
|
|
1297
1305
|
*/
|
|
1298
1306
|
type HTMLContent = string;
|
|
1299
1307
|
/**
|
|
1300
|
-
*
|
|
1308
|
+
* A Tiptap JSON node or document. Tiptap JSON is the standard format for
|
|
1309
|
+
* storing and manipulating Tiptap content. It is equivalent to the JSON
|
|
1310
|
+
* representation of a Prosemirror node.
|
|
1311
|
+
*
|
|
1312
|
+
* Tiptap JSON documents are trees of nodes. The root node is usually of type
|
|
1313
|
+
* `doc`. Nodes can have other nodes as children. Nodes can also have marks and
|
|
1314
|
+
* attributes. Text nodes (nodes with type `text`) have a `text` property and no
|
|
1315
|
+
* children.
|
|
1316
|
+
*
|
|
1317
|
+
* @example
|
|
1318
|
+
* ```ts
|
|
1319
|
+
* const content: JSONContent = {
|
|
1320
|
+
* type: 'doc',
|
|
1321
|
+
* content: [
|
|
1322
|
+
* {
|
|
1323
|
+
* type: 'paragraph',
|
|
1324
|
+
* content: [
|
|
1325
|
+
* {
|
|
1326
|
+
* type: 'text',
|
|
1327
|
+
* text: 'Hello ',
|
|
1328
|
+
* },
|
|
1329
|
+
* {
|
|
1330
|
+
* type: 'text',
|
|
1331
|
+
* text: 'world',
|
|
1332
|
+
* marks: [{ type: 'bold' }],
|
|
1333
|
+
* },
|
|
1334
|
+
* ],
|
|
1335
|
+
* },
|
|
1336
|
+
* ],
|
|
1337
|
+
* }
|
|
1338
|
+
* ```
|
|
1301
1339
|
*/
|
|
1302
1340
|
type JSONContent = {
|
|
1341
|
+
/**
|
|
1342
|
+
* The type of the node
|
|
1343
|
+
*/
|
|
1303
1344
|
type?: string;
|
|
1345
|
+
/**
|
|
1346
|
+
* The attributes of the node. Attributes can have any JSON-serializable value.
|
|
1347
|
+
*/
|
|
1304
1348
|
attrs?: Record<string, any> | undefined;
|
|
1349
|
+
/**
|
|
1350
|
+
* The children of the node. A node can have other nodes as children.
|
|
1351
|
+
*/
|
|
1305
1352
|
content?: JSONContent[];
|
|
1353
|
+
/**
|
|
1354
|
+
* A list of marks of the node. Inline nodes can have marks.
|
|
1355
|
+
*/
|
|
1306
1356
|
marks?: {
|
|
1357
|
+
/**
|
|
1358
|
+
* The type of the mark
|
|
1359
|
+
*/
|
|
1307
1360
|
type: string;
|
|
1361
|
+
/**
|
|
1362
|
+
* The attributes of the mark. Attributes can have any JSON-serializable value.
|
|
1363
|
+
*/
|
|
1308
1364
|
attrs?: Record<string, any>;
|
|
1309
1365
|
[key: string]: any;
|
|
1310
1366
|
}[];
|
|
1367
|
+
/**
|
|
1368
|
+
* The text content of the node. This property is only present on text nodes
|
|
1369
|
+
* (i.e. nodes with `type: 'text'`).
|
|
1370
|
+
*
|
|
1371
|
+
* Text nodes cannot have children, but they can have marks.
|
|
1372
|
+
*/
|
|
1311
1373
|
text?: string;
|
|
1312
1374
|
[key: string]: any;
|
|
1313
1375
|
};
|
|
@@ -2892,6 +2954,23 @@ declare module '@tiptap/core' {
|
|
|
2892
2954
|
}
|
|
2893
2955
|
declare const setNodeSelection: RawCommands['setNodeSelection'];
|
|
2894
2956
|
|
|
2957
|
+
declare module '@tiptap/core' {
|
|
2958
|
+
interface Commands<ReturnType> {
|
|
2959
|
+
setTextDirection: {
|
|
2960
|
+
/**
|
|
2961
|
+
* Set the text direction for nodes.
|
|
2962
|
+
* If no position is provided, it will use the current selection.
|
|
2963
|
+
* @param direction The text direction to set ('ltr', 'rtl', or 'auto')
|
|
2964
|
+
* @param position Optional position or range to apply the direction to
|
|
2965
|
+
* @example editor.commands.setTextDirection('rtl')
|
|
2966
|
+
* @example editor.commands.setTextDirection('ltr', { from: 0, to: 10 })
|
|
2967
|
+
*/
|
|
2968
|
+
setTextDirection: (direction: 'ltr' | 'rtl' | 'auto', position?: number | Range) => ReturnType;
|
|
2969
|
+
};
|
|
2970
|
+
}
|
|
2971
|
+
}
|
|
2972
|
+
declare const setTextDirection: RawCommands['setTextDirection'];
|
|
2973
|
+
|
|
2895
2974
|
declare module '@tiptap/core' {
|
|
2896
2975
|
interface Commands<ReturnType> {
|
|
2897
2976
|
setTextSelection: {
|
|
@@ -3079,6 +3158,22 @@ declare module '@tiptap/core' {
|
|
|
3079
3158
|
}
|
|
3080
3159
|
declare const unsetMark: RawCommands['unsetMark'];
|
|
3081
3160
|
|
|
3161
|
+
declare module '@tiptap/core' {
|
|
3162
|
+
interface Commands<ReturnType> {
|
|
3163
|
+
unsetTextDirection: {
|
|
3164
|
+
/**
|
|
3165
|
+
* Remove the text direction attribute from nodes.
|
|
3166
|
+
* If no position is provided, it will use the current selection.
|
|
3167
|
+
* @param position Optional position or range to remove the direction from
|
|
3168
|
+
* @example editor.commands.unsetTextDirection()
|
|
3169
|
+
* @example editor.commands.unsetTextDirection({ from: 0, to: 10 })
|
|
3170
|
+
*/
|
|
3171
|
+
unsetTextDirection: (position?: number | Range) => ReturnType;
|
|
3172
|
+
};
|
|
3173
|
+
}
|
|
3174
|
+
}
|
|
3175
|
+
declare const unsetTextDirection: RawCommands['unsetTextDirection'];
|
|
3176
|
+
|
|
3082
3177
|
declare module '@tiptap/core' {
|
|
3083
3178
|
interface Commands<ReturnType> {
|
|
3084
3179
|
updateAttributes: {
|
|
@@ -3179,6 +3274,7 @@ declare const index$2_setMark: typeof setMark;
|
|
|
3179
3274
|
declare const index$2_setMeta: typeof setMeta;
|
|
3180
3275
|
declare const index$2_setNode: typeof setNode;
|
|
3181
3276
|
declare const index$2_setNodeSelection: typeof setNodeSelection;
|
|
3277
|
+
declare const index$2_setTextDirection: typeof setTextDirection;
|
|
3182
3278
|
declare const index$2_setTextSelection: typeof setTextSelection;
|
|
3183
3279
|
declare const index$2_sinkListItem: typeof sinkListItem;
|
|
3184
3280
|
declare const index$2_splitBlock: typeof splitBlock;
|
|
@@ -3190,11 +3286,12 @@ declare const index$2_toggleWrap: typeof toggleWrap;
|
|
|
3190
3286
|
declare const index$2_undoInputRule: typeof undoInputRule;
|
|
3191
3287
|
declare const index$2_unsetAllMarks: typeof unsetAllMarks;
|
|
3192
3288
|
declare const index$2_unsetMark: typeof unsetMark;
|
|
3289
|
+
declare const index$2_unsetTextDirection: typeof unsetTextDirection;
|
|
3193
3290
|
declare const index$2_updateAttributes: typeof updateAttributes;
|
|
3194
3291
|
declare const index$2_wrapIn: typeof wrapIn;
|
|
3195
3292
|
declare const index$2_wrapInList: typeof wrapInList;
|
|
3196
3293
|
declare namespace index$2 {
|
|
3197
|
-
export { type index$2_InsertContentAtOptions as InsertContentAtOptions, type index$2_InsertContentOptions as InsertContentOptions, type index$2_SetContentOptions as SetContentOptions, index$2_blur as blur, index$2_clearContent as clearContent, index$2_clearNodes as clearNodes, index$2_command as command, index$2_createParagraphNear as createParagraphNear, index$2_cut as cut, index$2_deleteCurrentNode as deleteCurrentNode, index$2_deleteNode as deleteNode, index$2_deleteRange as deleteRange, index$2_deleteSelection as deleteSelection, index$2_enter as enter, index$2_exitCode as exitCode, index$2_extendMarkRange as extendMarkRange, index$2_first as first, index$2_focus as focus, index$2_forEach as forEach, index$2_insertContent as insertContent, index$2_insertContentAt as insertContentAt, index$2_joinBackward as joinBackward, index$2_joinDown as joinDown, index$2_joinForward as joinForward, index$2_joinItemBackward as joinItemBackward, index$2_joinItemForward as joinItemForward, index$2_joinTextblockBackward as joinTextblockBackward, index$2_joinTextblockForward as joinTextblockForward, index$2_joinUp as joinUp, index$2_keyboardShortcut as keyboardShortcut, index$2_lift as lift, index$2_liftEmptyBlock as liftEmptyBlock, index$2_liftListItem as liftListItem, index$2_newlineInCode as newlineInCode, index$2_resetAttributes as resetAttributes, index$2_scrollIntoView as scrollIntoView, index$2_selectAll as selectAll, index$2_selectNodeBackward as selectNodeBackward, index$2_selectNodeForward as selectNodeForward, index$2_selectParentNode as selectParentNode, index$2_selectTextblockEnd as selectTextblockEnd, index$2_selectTextblockStart as selectTextblockStart, index$2_setContent as setContent, index$2_setMark as setMark, index$2_setMeta as setMeta, index$2_setNode as setNode, index$2_setNodeSelection as setNodeSelection, index$2_setTextSelection as setTextSelection, index$2_sinkListItem as sinkListItem, index$2_splitBlock as splitBlock, index$2_splitListItem as splitListItem, index$2_toggleList as toggleList, index$2_toggleMark as toggleMark, index$2_toggleNode as toggleNode, index$2_toggleWrap as toggleWrap, index$2_undoInputRule as undoInputRule, index$2_unsetAllMarks as unsetAllMarks, index$2_unsetMark as unsetMark, index$2_updateAttributes as updateAttributes, index$2_wrapIn as wrapIn, index$2_wrapInList as wrapInList };
|
|
3294
|
+
export { type index$2_InsertContentAtOptions as InsertContentAtOptions, type index$2_InsertContentOptions as InsertContentOptions, type index$2_SetContentOptions as SetContentOptions, index$2_blur as blur, index$2_clearContent as clearContent, index$2_clearNodes as clearNodes, index$2_command as command, index$2_createParagraphNear as createParagraphNear, index$2_cut as cut, index$2_deleteCurrentNode as deleteCurrentNode, index$2_deleteNode as deleteNode, index$2_deleteRange as deleteRange, index$2_deleteSelection as deleteSelection, index$2_enter as enter, index$2_exitCode as exitCode, index$2_extendMarkRange as extendMarkRange, index$2_first as first, index$2_focus as focus, index$2_forEach as forEach, index$2_insertContent as insertContent, index$2_insertContentAt as insertContentAt, index$2_joinBackward as joinBackward, index$2_joinDown as joinDown, index$2_joinForward as joinForward, index$2_joinItemBackward as joinItemBackward, index$2_joinItemForward as joinItemForward, index$2_joinTextblockBackward as joinTextblockBackward, index$2_joinTextblockForward as joinTextblockForward, index$2_joinUp as joinUp, index$2_keyboardShortcut as keyboardShortcut, index$2_lift as lift, index$2_liftEmptyBlock as liftEmptyBlock, index$2_liftListItem as liftListItem, index$2_newlineInCode as newlineInCode, index$2_resetAttributes as resetAttributes, index$2_scrollIntoView as scrollIntoView, index$2_selectAll as selectAll, index$2_selectNodeBackward as selectNodeBackward, index$2_selectNodeForward as selectNodeForward, index$2_selectParentNode as selectParentNode, index$2_selectTextblockEnd as selectTextblockEnd, index$2_selectTextblockStart as selectTextblockStart, index$2_setContent as setContent, index$2_setMark as setMark, index$2_setMeta as setMeta, index$2_setNode as setNode, index$2_setNodeSelection as setNodeSelection, index$2_setTextDirection as setTextDirection, index$2_setTextSelection as setTextSelection, index$2_sinkListItem as sinkListItem, index$2_splitBlock as splitBlock, index$2_splitListItem as splitListItem, index$2_toggleList as toggleList, index$2_toggleMark as toggleMark, index$2_toggleNode as toggleNode, index$2_toggleWrap as toggleWrap, index$2_undoInputRule as undoInputRule, index$2_unsetAllMarks as unsetAllMarks, index$2_unsetMark as unsetMark, index$2_unsetTextDirection as unsetTextDirection, index$2_updateAttributes as updateAttributes, index$2_wrapIn as wrapIn, index$2_wrapInList as wrapInList };
|
|
3198
3295
|
}
|
|
3199
3296
|
|
|
3200
3297
|
declare const Commands$1: Extension<any, any>;
|
|
@@ -3217,6 +3314,19 @@ declare const Paste: Extension<any, any>;
|
|
|
3217
3314
|
|
|
3218
3315
|
declare const Tabindex: Extension<any, any>;
|
|
3219
3316
|
|
|
3317
|
+
interface TextDirectionOptions {
|
|
3318
|
+
direction: 'ltr' | 'rtl' | 'auto' | undefined;
|
|
3319
|
+
}
|
|
3320
|
+
/**
|
|
3321
|
+
* The TextDirection extension adds support for setting text direction (LTR/RTL/auto)
|
|
3322
|
+
* on all nodes in the editor.
|
|
3323
|
+
*
|
|
3324
|
+
* This extension adds a global `dir` attribute to all node types, which can be used
|
|
3325
|
+
* to control bidirectional text rendering. The direction can be set globally via
|
|
3326
|
+
* editor options or per-node using commands.
|
|
3327
|
+
*/
|
|
3328
|
+
declare const TextDirection: Extension<TextDirectionOptions, any>;
|
|
3329
|
+
|
|
3220
3330
|
declare const index$1_ClipboardTextSerializer: typeof ClipboardTextSerializer;
|
|
3221
3331
|
declare const index$1_Delete: typeof Delete;
|
|
3222
3332
|
declare const index$1_Drop: typeof Drop;
|
|
@@ -3225,9 +3335,10 @@ declare const index$1_FocusEvents: typeof FocusEvents;
|
|
|
3225
3335
|
declare const index$1_Keymap: typeof Keymap;
|
|
3226
3336
|
declare const index$1_Paste: typeof Paste;
|
|
3227
3337
|
declare const index$1_Tabindex: typeof Tabindex;
|
|
3338
|
+
declare const index$1_TextDirection: typeof TextDirection;
|
|
3228
3339
|
declare const index$1_focusEventsPluginKey: typeof focusEventsPluginKey;
|
|
3229
3340
|
declare namespace index$1 {
|
|
3230
|
-
export { index$1_ClipboardTextSerializer as ClipboardTextSerializer, Commands$1 as Commands, index$1_Delete as Delete, index$1_Drop as Drop, index$1_Editable as Editable, index$1_FocusEvents as FocusEvents, index$1_Keymap as Keymap, index$1_Paste as Paste, index$1_Tabindex as Tabindex, index$1_focusEventsPluginKey as focusEventsPluginKey };
|
|
3341
|
+
export { index$1_ClipboardTextSerializer as ClipboardTextSerializer, Commands$1 as Commands, index$1_Delete as Delete, index$1_Drop as Drop, index$1_Editable as Editable, index$1_FocusEvents as FocusEvents, index$1_Keymap as Keymap, index$1_Paste as Paste, index$1_Tabindex as Tabindex, index$1_TextDirection as TextDirection, index$1_focusEventsPluginKey as focusEventsPluginKey };
|
|
3231
3342
|
}
|
|
3232
3343
|
|
|
3233
3344
|
interface TiptapEditorHTMLElement extends HTMLElement {
|
|
@@ -4532,4 +4643,4 @@ interface Commands<ReturnType = any> {
|
|
|
4532
4643
|
interface Storage {
|
|
4533
4644
|
}
|
|
4534
4645
|
|
|
4535
|
-
export { type AnyCommands, type AnyConfig, type AnyExtension, type AtomBlockMarkdownSpecOptions, type Attribute, type Attributes$1 as Attributes, type BlockMarkdownSpecOptions, type BlockParserConfig, type CanCommands, type ChainedCommands, type ChangedRange, type Command, CommandManager, type CommandProps, type CommandSpec, type Commands, type Content, type CreateNodeFromContentOptions, type DOMNode, type DOMOutputSpecArray$1 as DOMOutputSpecArray, type DecorationType, type DecorationWithType, type Diff, type Dispatch, type DocumentType, Editor, type EditorEvents, type EditorOptions, type EnableRules, Extendable, type ExtendableConfig, type ExtendedRegExpMatchArray, Extension, type ExtensionAttribute, type ExtensionConfig, type Extensions, type FocusPosition, Fragment, type FullMarkdownHelpers, type GlobalAttributes, type HTMLContent, type InlineMarkdownSpecOptions, InputRule, type InputRuleFinder, type InputRuleMatch, type InsertContentAtOptions, type InsertContentOptions, type JSONContent, type KeyboardShortcutCommand, type KeysWithTypeOf, Mark, type MarkConfig, type MarkRange, type MarkType, MarkView, type MarkViewProps, type MarkViewRenderer, type MarkViewRendererOptions, type MarkViewRendererProps, type MarkdownExtensionSpec, type MarkdownHelpers, type MarkdownLexerConfiguration, type MarkdownParseHelpers, type MarkdownParseResult, type MarkdownRendererHelpers, type MarkdownToken, type MarkdownTokenizer, type MaybeReturnType, type MaybeThisParameterType, Node, type NodeConfig, NodePos, type NodeRange, type NodeType, NodeView, type NodeViewProps, type NodeViewRenderer, type NodeViewRendererOptions, type NodeViewRendererProps, type NodeWithPos, type Overwrite, type ParentConfig, type ParsedBlock, PasteRule, type PasteRuleFinder, type PasteRuleMatch, type PickValue, type Predicate, type Primitive, type Range, type RawCommands, type RemoveThis, type RenderContext, type ResizableNodeDimensions, ResizableNodeView, type ResizableNodeViewDirection, type ResizableNodeViewOptions, ResizableNodeview, type SetContentOptions, type SingleCommands, type Storage, type TextSerializer, type TextType, type TiptapEditorHTMLElement, Tracker, type TrackerResult, type UnionCommands, type UnionToIntersection, type ValuesOf, blur, callOrReturn, canInsertNode, clearContent, clearNodes, combineTransactionSteps, command, index$2 as commands, createAtomBlockMarkdownSpec, createBlockMarkdownSpec, createChainableState, createDocument, h as createElement, createInlineMarkdownSpec, createNodeFromContent, createParagraphNear, createStyleTag, cut, defaultBlockAt, deleteCurrentNode, deleteNode, deleteProps, deleteRange, deleteSelection, elementFromString, enter, escapeForRegEx, exitCode, extendMarkRange, index$1 as extensions, findChildren, findChildrenInRange, findDuplicates, findParentNode, findParentNodeClosestToPos, first, flattenExtensions, focus, forEach, fromString, generateHTML, generateJSON, generateText, getAttributes, getAttributesFromExtensions, getChangedRanges, getDebugJSON, getExtensionField, getHTMLFromFragment, getMarkAttributes, getMarkRange, getMarkType, getMarksBetween, getNodeAtPosition, getNodeAttributes, getNodeType, getRenderedAttributes, getSchema, getSchemaByResolvedExtensions, getSchemaTypeByName, getSchemaTypeNameByName, getSplittedAttributes, getText, getTextBetween, getTextContentFromNodes, getTextSerializersFromSchema, h, injectExtensionAttributesToParseRule, inputRulesPlugin, insertContent, insertContentAt, isActive, isAndroid, isAtEndOfNode, isAtStartOfNode, isEmptyObject, isExtensionRulesEnabled, isFunction, isList, isMacOS, isMarkActive, isNodeActive, isNodeEmpty, isNodeSelection, isNumber, isPlainObject, isRegExp, isString, isTextSelection, isiOS, joinBackward, joinDown, joinForward, joinItemBackward, joinItemForward, joinTextblockBackward, joinTextblockForward, joinUp, keyboardShortcut, lift, liftEmptyBlock, liftListItem, markInputRule, markPasteRule, index as markdown, mergeAttributes, mergeDeep, minMax, newlineInCode, nodeInputRule, nodePasteRule, objectIncludes, parseAttributes, parseIndentedBlocks, pasteRulesPlugin, posToDOMRect, removeDuplicates, renderNestedMarkdownContent, resetAttributes, resolveExtensions, resolveFocusPosition, rewriteUnknownContent, scrollIntoView, selectAll, selectNodeBackward, selectNodeForward, selectParentNode, selectTextblockEnd, selectTextblockStart, selectionToInsertionEnd, serializeAttributes, setContent, setMark, setMeta, setNode, setNodeSelection, setTextSelection, sinkListItem, sortExtensions, splitBlock, splitExtensions, splitListItem, textInputRule, textPasteRule, textblockTypeInputRule, toggleList, toggleMark, toggleNode, toggleWrap, undoInputRule, unsetAllMarks, unsetMark, updateAttributes, updateMarkViewAttributes, wrapIn, wrapInList, wrappingInputRule };
|
|
4646
|
+
export { type AnyCommands, type AnyConfig, type AnyExtension, type AtomBlockMarkdownSpecOptions, type Attribute, type Attributes$1 as Attributes, type BlockMarkdownSpecOptions, type BlockParserConfig, type CanCommands, type ChainedCommands, type ChangedRange, type Command, CommandManager, type CommandProps, type CommandSpec, type Commands, type Content, type CreateNodeFromContentOptions, type DOMNode, type DOMOutputSpecArray$1 as DOMOutputSpecArray, type DecorationType, type DecorationWithType, type Diff, type Dispatch, type DocumentType, Editor, type EditorEvents, type EditorOptions, type EnableRules, Extendable, type ExtendableConfig, type ExtendedRegExpMatchArray, Extension, type ExtensionAttribute, type ExtensionConfig, type Extensions, type FocusPosition, Fragment, type FullMarkdownHelpers, type GlobalAttributes, type HTMLContent, type InlineMarkdownSpecOptions, InputRule, type InputRuleFinder, type InputRuleMatch, type InsertContentAtOptions, type InsertContentOptions, type JSONContent, type KeyboardShortcutCommand, type KeysWithTypeOf, Mark, type MarkConfig, type MarkRange, type MarkType, MarkView, type MarkViewProps, type MarkViewRenderer, type MarkViewRendererOptions, type MarkViewRendererProps, type MarkdownExtensionSpec, type MarkdownHelpers, type MarkdownLexerConfiguration, type MarkdownParseHelpers, type MarkdownParseResult, type MarkdownRendererHelpers, type MarkdownToken, type MarkdownTokenizer, type MaybeReturnType, type MaybeThisParameterType, Node, type NodeConfig, NodePos, type NodeRange, type NodeType, NodeView, type NodeViewProps, type NodeViewRenderer, type NodeViewRendererOptions, type NodeViewRendererProps, type NodeWithPos, type Overwrite, type ParentConfig, type ParsedBlock, PasteRule, type PasteRuleFinder, type PasteRuleMatch, type PickValue, type Predicate, type Primitive, type Range, type RawCommands, type RemoveThis, type RenderContext, type ResizableNodeDimensions, ResizableNodeView, type ResizableNodeViewDirection, type ResizableNodeViewOptions, ResizableNodeview, type SetContentOptions, type SingleCommands, type Storage, type TextSerializer, type TextType, type TiptapEditorHTMLElement, Tracker, type TrackerResult, type UnionCommands, type UnionToIntersection, type ValuesOf, blur, callOrReturn, canInsertNode, clearContent, clearNodes, combineTransactionSteps, command, index$2 as commands, createAtomBlockMarkdownSpec, createBlockMarkdownSpec, createChainableState, createDocument, h as createElement, createInlineMarkdownSpec, createNodeFromContent, createParagraphNear, createStyleTag, cut, defaultBlockAt, deleteCurrentNode, deleteNode, deleteProps, deleteRange, deleteSelection, elementFromString, enter, escapeForRegEx, exitCode, extendMarkRange, index$1 as extensions, findChildren, findChildrenInRange, findDuplicates, findParentNode, findParentNodeClosestToPos, first, flattenExtensions, focus, forEach, fromString, generateHTML, generateJSON, generateText, getAttributes, getAttributesFromExtensions, getChangedRanges, getDebugJSON, getExtensionField, getHTMLFromFragment, getMarkAttributes, getMarkRange, getMarkType, getMarksBetween, getNodeAtPosition, getNodeAttributes, getNodeType, getRenderedAttributes, getSchema, getSchemaByResolvedExtensions, getSchemaTypeByName, getSchemaTypeNameByName, getSplittedAttributes, getText, getTextBetween, getTextContentFromNodes, getTextSerializersFromSchema, h, injectExtensionAttributesToParseRule, inputRulesPlugin, insertContent, insertContentAt, isActive, isAndroid, isAtEndOfNode, isAtStartOfNode, isEmptyObject, isExtensionRulesEnabled, isFunction, isList, isMacOS, isMarkActive, isNodeActive, isNodeEmpty, isNodeSelection, isNumber, isPlainObject, isRegExp, isString, isTextSelection, isiOS, joinBackward, joinDown, joinForward, joinItemBackward, joinItemForward, joinTextblockBackward, joinTextblockForward, joinUp, keyboardShortcut, lift, liftEmptyBlock, liftListItem, markInputRule, markPasteRule, index as markdown, mergeAttributes, mergeDeep, minMax, newlineInCode, nodeInputRule, nodePasteRule, objectIncludes, parseAttributes, parseIndentedBlocks, pasteRulesPlugin, posToDOMRect, removeDuplicates, renderNestedMarkdownContent, resetAttributes, resolveExtensions, resolveFocusPosition, rewriteUnknownContent, scrollIntoView, selectAll, selectNodeBackward, selectNodeForward, selectParentNode, selectTextblockEnd, selectTextblockStart, selectionToInsertionEnd, serializeAttributes, setContent, setMark, setMeta, setNode, setNodeSelection, setTextDirection, setTextSelection, sinkListItem, sortExtensions, splitBlock, splitExtensions, splitListItem, textInputRule, textPasteRule, textblockTypeInputRule, toggleList, toggleMark, toggleNode, toggleWrap, undoInputRule, unsetAllMarks, unsetMark, unsetTextDirection, updateAttributes, updateMarkViewAttributes, wrapIn, wrapInList, wrappingInputRule };
|