@harbour-enterprises/superdoc 0.20.0-next.8 → 0.20.0-next.9
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/chunks/{PdfViewer-BoDHZ2nW.es.js → PdfViewer-BZlsmhsJ.es.js} +1 -1
- package/dist/chunks/{PdfViewer-Ch0v9vA6.cjs → PdfViewer-BqGjx7hC.cjs} +1 -1
- package/dist/chunks/{index-BWPWqVxp.es.js → index-4GToG3C3.es.js} +2 -2
- package/dist/chunks/{index-DFOT300M.cjs → index-DPzgGSfg.cjs} +2 -2
- package/dist/chunks/{super-editor.es-BQ6kZTNg.cjs → super-editor.es-BkxUKZfn.cjs} +309 -574
- package/dist/chunks/{super-editor.es-sBfWb5tn.es.js → super-editor.es-DqX3Ipsk.es.js} +309 -574
- package/dist/core/SuperDoc.d.ts.map +1 -1
- package/dist/super-editor/ai-writer.es.js +2 -2
- package/dist/super-editor/chunks/{converter-C91Sr_5w.js → converter-C6YOTAXG.js} +64 -8
- package/dist/super-editor/chunks/{docx-zipper-Cl7LYpt6.js → docx-zipper-CSiwWpmr.js} +1 -1
- package/dist/super-editor/chunks/{editor-a7cQT9Dw.js → editor-chVid4VD.js} +247 -568
- package/dist/super-editor/chunks/{toolbar-DiNFtCKr.js → toolbar-ancqgN0p.js} +2 -2
- package/dist/super-editor/converter.es.js +1 -1
- package/dist/super-editor/docx-zipper.es.js +2 -2
- package/dist/super-editor/editor.es.js +3 -3
- package/dist/super-editor/file-zipper.es.js +1 -1
- package/dist/super-editor/src/core/super-converter/helpers.d.ts +2 -0
- package/dist/super-editor/src/core/super-converter/v2/importer/imageImporter.d.ts +1 -0
- package/dist/super-editor/src/extensions/block-node/block-node.d.ts +30 -5
- package/dist/super-editor/src/extensions/bold/bold.d.ts +20 -0
- package/dist/super-editor/src/extensions/bullet-list/bullet-list.d.ts +12 -0
- package/dist/super-editor/src/extensions/color/color.d.ts +26 -0
- package/dist/super-editor/src/extensions/content-block/content-block.d.ts +30 -0
- package/dist/super-editor/src/extensions/custom-selection/custom-selection.d.ts +16 -0
- package/dist/super-editor/src/extensions/document/document.d.ts +26 -0
- package/dist/super-editor/src/extensions/dropcursor/dropcursor.d.ts +26 -0
- package/dist/super-editor/src/extensions/font-family/font-family.d.ts +29 -0
- package/dist/super-editor/src/extensions/font-size/font-size.d.ts +21 -0
- package/dist/super-editor/src/extensions/format-commands/format-commands.d.ts +9 -0
- package/dist/super-editor/src/extensions/gapcursor/gapcursor.d.ts +9 -0
- package/dist/super-editor/src/extensions/heading/heading.d.ts +12 -6
- package/dist/super-editor/src/extensions/highlight/highlight.d.ts +20 -0
- package/dist/super-editor/src/extensions/history/history.d.ts +7 -15
- package/dist/super-editor/src/extensions/image/image.d.ts +78 -0
- package/dist/super-editor/src/extensions/image/imageHelpers/index.d.ts +1 -0
- package/dist/super-editor/src/extensions/image/imageHelpers/rotation.d.ts +4 -0
- package/dist/super-editor/src/extensions/italic/italic.d.ts +10 -0
- package/dist/super-editor/src/extensions/line-break/line-break.d.ts +43 -0
- package/dist/super-editor/src/extensions/line-height/line-height.d.ts +22 -0
- package/dist/super-editor/src/extensions/link/link.d.ts +53 -25
- package/dist/super-editor/src/extensions/linked-styles/linked-styles.d.ts +9 -0
- package/dist/super-editor/src/extensions/list-item/list-item.d.ts +48 -0
- package/dist/super-editor/src/extensions/mention/mention.d.ts +26 -0
- package/dist/super-editor/src/extensions/noderesizer/noderesizer.d.ts +14 -0
- package/dist/super-editor/src/extensions/ordered-list/ordered-list.d.ts +35 -0
- package/dist/super-editor/src/extensions/page-number/page-number.d.ts +52 -0
- package/dist/super-editor/src/extensions/paragraph/paragraph.d.ts +49 -0
- package/dist/super-editor/src/extensions/placeholder/placeholder.d.ts +15 -0
- package/dist/super-editor/src/extensions/popover-plugin/popover-plugin.d.ts +9 -0
- package/dist/super-editor/src/extensions/run-item/run-item.d.ts +24 -0
- package/dist/super-editor/src/extensions/search/search.d.ts +11 -2
- package/dist/super-editor/src/extensions/shape-container/shape-container.d.ts +29 -0
- package/dist/super-editor/src/extensions/shape-textbox/shape-textbox.d.ts +26 -0
- package/dist/super-editor/src/extensions/slash-menu/slash-menu.d.ts +9 -0
- package/dist/super-editor/src/extensions/strike/strike.d.ts +10 -0
- package/dist/super-editor/src/extensions/structured-content/document-section.d.ts +46 -27
- package/dist/super-editor/src/extensions/structured-content/structured-content-block.d.ts +26 -0
- package/dist/super-editor/src/extensions/structured-content/structured-content.d.ts +26 -0
- package/dist/super-editor/src/extensions/tab/tab.d.ts +25 -0
- package/dist/super-editor/src/extensions/table/table.d.ts +112 -121
- package/dist/super-editor/src/extensions/table-cell/table-cell.d.ts +41 -0
- package/dist/super-editor/src/extensions/table-header/table-header.d.ts +22 -0
- package/dist/super-editor/src/extensions/table-row/table-row.d.ts +28 -0
- package/dist/super-editor/src/extensions/text/text.d.ts +14 -0
- package/dist/super-editor/src/extensions/text-align/text-align.d.ts +22 -0
- package/dist/super-editor/src/extensions/text-indent/text-indent.d.ts +19 -10
- package/dist/super-editor/src/extensions/text-style/text-style.d.ts +20 -0
- package/dist/super-editor/src/extensions/text-transform/text-transform.d.ts +20 -0
- package/dist/super-editor/src/extensions/underline/underline.d.ts +25 -0
- package/dist/super-editor/src/tests/helpers/editor-test-utils.d.ts +14 -0
- package/dist/super-editor/super-editor.es.js +6 -6
- package/dist/super-editor/toolbar.es.js +2 -2
- package/dist/super-editor.cjs +1 -1
- package/dist/super-editor.es.js +1 -1
- package/dist/superdoc.cjs +2 -2
- package/dist/superdoc.es.js +2 -2
- package/dist/superdoc.umd.js +309 -574
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { computed, createElementBlock, openBlock, createElementVNode, createCommentVNode, normalizeClass, normalizeStyle, ref, withKeys, unref, withModifiers, createBlock, toDisplayString, withDirectives, vModelText, nextTick, getCurrentInstance, createVNode, readonly, watch, onMounted, onBeforeUnmount, reactive, onBeforeMount, inject, onActivated, onDeactivated, createTextVNode, Fragment, Comment, defineComponent, provide, h, Teleport, toRef, renderSlot, isVNode, shallowRef, watchEffect, mergeProps, Transition, vShow, cloneVNode, Text, renderList, withCtx } from "vue";
|
|
2
|
-
import { p as process$1 } from "./converter-
|
|
3
|
-
import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-
|
|
2
|
+
import { p as process$1 } from "./converter-C6YOTAXG.js";
|
|
3
|
+
import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-chVid4VD.js";
|
|
4
4
|
const sanitizeNumber = (value, defaultNumber) => {
|
|
5
5
|
let sanitized = value.replace(/[^0-9.]/g, "");
|
|
6
6
|
sanitized = parseFloat(sanitized);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { E } from "./chunks/editor-
|
|
2
|
-
import "./chunks/converter-
|
|
3
|
-
import "./chunks/docx-zipper-
|
|
1
|
+
import { E } from "./chunks/editor-chVid4VD.js";
|
|
2
|
+
import "./chunks/converter-C6YOTAXG.js";
|
|
3
|
+
import "./chunks/docx-zipper-CSiwWpmr.js";
|
|
4
4
|
export {
|
|
5
5
|
E as Editor
|
|
6
6
|
};
|
|
@@ -11,6 +11,8 @@ export function pixelsToHalfPoints(pixels: any): number;
|
|
|
11
11
|
export function halfPointToPoints(halfPoints: any): number;
|
|
12
12
|
export function eigthPointsToPixels(eigthPoints: any): number;
|
|
13
13
|
export function pixelsToEightPoints(pixels: any): number;
|
|
14
|
+
export function rotToDegrees(rot: any): number;
|
|
15
|
+
export function degreesToRot(degrees: any): number;
|
|
14
16
|
export function getArrayBufferFromUrl(input: any, isHeadless: any): Promise<ArrayBuffer>;
|
|
15
17
|
export function getContentTypesFromXml(contentTypesXml: any): string[];
|
|
16
18
|
export function getHexColorFromDocxSystem(docxColor: any): string;
|
|
@@ -1,19 +1,36 @@
|
|
|
1
1
|
export const BlockNodePluginKey: PluginKey<any>;
|
|
2
|
+
/**
|
|
3
|
+
* @typedef {import('prosemirror-model').Node} ProseMirrorNode
|
|
4
|
+
* @typedef {import('prosemirror-state').Transaction} Transaction
|
|
5
|
+
*/
|
|
2
6
|
/**
|
|
3
7
|
* Block node information object
|
|
4
8
|
* @typedef {Object} BlockNodeInfo
|
|
5
|
-
* @property {
|
|
9
|
+
* @property {ProseMirrorNode} node - The block node
|
|
6
10
|
* @property {number} pos - Position in the document
|
|
7
11
|
*/
|
|
12
|
+
/**
|
|
13
|
+
* Configuration options for BlockNode
|
|
14
|
+
* @typedef {Object} BlockNodeOptions
|
|
15
|
+
* @category Options
|
|
16
|
+
*/
|
|
17
|
+
/**
|
|
18
|
+
* Attributes for block nodes
|
|
19
|
+
* @typedef {Object} BlockNodeAttributes
|
|
20
|
+
* @category Attributes
|
|
21
|
+
* @property {string} [sdBlockId] @internal Unique identifier for the block
|
|
22
|
+
*/
|
|
8
23
|
/**
|
|
9
24
|
* @module BlockNode
|
|
10
25
|
* @sidebarTitle Block Node
|
|
11
26
|
* @snippetPath /snippets/extensions/block-node.mdx
|
|
12
27
|
*/
|
|
13
28
|
export const BlockNode: Extension;
|
|
14
|
-
export function nodeAllowsSdBlockIdAttr(node:
|
|
15
|
-
export function nodeNeedsSdBlockId(node:
|
|
16
|
-
export function checkForNewBlockNodesInTrs(transactions:
|
|
29
|
+
export function nodeAllowsSdBlockIdAttr(node: ProseMirrorNode): boolean;
|
|
30
|
+
export function nodeNeedsSdBlockId(node: ProseMirrorNode): boolean;
|
|
31
|
+
export function checkForNewBlockNodesInTrs(transactions: Transaction[]): boolean;
|
|
32
|
+
export type ProseMirrorNode = import("prosemirror-model").Node;
|
|
33
|
+
export type Transaction = import("prosemirror-state").Transaction;
|
|
17
34
|
/**
|
|
18
35
|
* Block node information object
|
|
19
36
|
*/
|
|
@@ -21,11 +38,19 @@ export type BlockNodeInfo = {
|
|
|
21
38
|
/**
|
|
22
39
|
* - The block node
|
|
23
40
|
*/
|
|
24
|
-
node:
|
|
41
|
+
node: ProseMirrorNode;
|
|
25
42
|
/**
|
|
26
43
|
* - Position in the document
|
|
27
44
|
*/
|
|
28
45
|
pos: number;
|
|
29
46
|
};
|
|
47
|
+
/**
|
|
48
|
+
* Configuration options for BlockNode
|
|
49
|
+
*/
|
|
50
|
+
export type BlockNodeOptions = any;
|
|
51
|
+
/**
|
|
52
|
+
* Attributes for block nodes
|
|
53
|
+
*/
|
|
54
|
+
export type BlockNodeAttributes = any;
|
|
30
55
|
import { PluginKey } from 'prosemirror-state';
|
|
31
56
|
import { Extension } from '@core/Extension.js';
|
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configuration options for Bold
|
|
3
|
+
* @typedef {Object} BoldOptions
|
|
4
|
+
* @category Options
|
|
5
|
+
* @property {Object} [htmlAttributes] HTML attributes for the strong element
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Attributes for bold marks
|
|
9
|
+
* @typedef {Object} BoldAttributes
|
|
10
|
+
* @category Attributes
|
|
11
|
+
* @property {string} [value] Bold weight value ('0' renders as normal)
|
|
12
|
+
*/
|
|
1
13
|
/**
|
|
2
14
|
* @module Bold
|
|
3
15
|
* @sidebarTitle Bold
|
|
@@ -6,4 +18,12 @@
|
|
|
6
18
|
* @shortcut Mod-B | toggleBold | Toggle bold formatting (uppercase)
|
|
7
19
|
*/
|
|
8
20
|
export const Bold: Mark;
|
|
21
|
+
/**
|
|
22
|
+
* Configuration options for Bold
|
|
23
|
+
*/
|
|
24
|
+
export type BoldOptions = any;
|
|
25
|
+
/**
|
|
26
|
+
* Attributes for bold marks
|
|
27
|
+
*/
|
|
28
|
+
export type BoldAttributes = any;
|
|
9
29
|
import { Mark } from '@core/index.js';
|
|
@@ -1,2 +1,14 @@
|
|
|
1
1
|
export const BulletList: Node;
|
|
2
|
+
/**
|
|
3
|
+
* Configuration options for BulletList
|
|
4
|
+
*/
|
|
5
|
+
export type BulletListOptions = any;
|
|
6
|
+
/**
|
|
7
|
+
* Attributes for bullet list nodes
|
|
8
|
+
*/
|
|
9
|
+
export type BulletListAttributes = any;
|
|
10
|
+
/**
|
|
11
|
+
* Commands provided by BulletList extension
|
|
12
|
+
*/
|
|
13
|
+
export type BulletListCommands = any;
|
|
2
14
|
import { Node } from '@core/index.js';
|
|
@@ -3,6 +3,24 @@
|
|
|
3
3
|
* @typedef {string} ColorValue
|
|
4
4
|
* @description Accepts hex colors (#ff0000), rgb(255,0,0), or named colors (red)
|
|
5
5
|
*/
|
|
6
|
+
/**
|
|
7
|
+
* Configuration options for Color
|
|
8
|
+
* @typedef {Object} ColorOptions
|
|
9
|
+
* @category Options
|
|
10
|
+
* @property {string[]} [types=['textStyle']] Mark types to add color support to
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Attributes for color marks
|
|
14
|
+
* @typedef {Object} ColorAttributes
|
|
15
|
+
* @category Attributes
|
|
16
|
+
* @property {ColorValue} [color] Text color value
|
|
17
|
+
* @example
|
|
18
|
+
* // Apply color to selected text
|
|
19
|
+
* editor.commands.setColor('#ff0000')
|
|
20
|
+
*
|
|
21
|
+
* // Remove color
|
|
22
|
+
* editor.commands.unsetColor()
|
|
23
|
+
*/
|
|
6
24
|
/**
|
|
7
25
|
* @module Color
|
|
8
26
|
* @sidebarTitle Color
|
|
@@ -13,4 +31,12 @@ export const Color: Extension;
|
|
|
13
31
|
* Color value format
|
|
14
32
|
*/
|
|
15
33
|
export type ColorValue = string;
|
|
34
|
+
/**
|
|
35
|
+
* Configuration options for Color
|
|
36
|
+
*/
|
|
37
|
+
export type ColorOptions = any;
|
|
38
|
+
/**
|
|
39
|
+
* Attributes for color marks
|
|
40
|
+
*/
|
|
41
|
+
export type ColorAttributes = any;
|
|
16
42
|
import { Extension } from '@core/index.js';
|
|
@@ -13,6 +13,28 @@
|
|
|
13
13
|
* @property {ContentBlockSize} [size] - Size and position configuration
|
|
14
14
|
* @property {string} [background] - Background color (hex, rgb, or named color)
|
|
15
15
|
*/
|
|
16
|
+
/**
|
|
17
|
+
* Configuration options for ContentBlock
|
|
18
|
+
* @typedef {Object} ContentBlockOptions
|
|
19
|
+
* @category Options
|
|
20
|
+
* @property {Object} [htmlAttributes] HTML attributes for the block element
|
|
21
|
+
*/
|
|
22
|
+
/**
|
|
23
|
+
* Attributes for content blocks
|
|
24
|
+
* @typedef {Object} ContentBlockAttributes
|
|
25
|
+
* @category Attributes
|
|
26
|
+
* @property {boolean} [horizontalRule=false] Whether this block is a horizontal rule
|
|
27
|
+
* @property {ContentBlockSize} [size] Size and position of the content block
|
|
28
|
+
* @property {string} [background] Background color for the block
|
|
29
|
+
* @property {Object} [drawingContent] @internal Internal drawing data
|
|
30
|
+
* @property {Object} [attributes] @internal Additional internal attributes
|
|
31
|
+
* @example
|
|
32
|
+
* // Insert a custom content block
|
|
33
|
+
* editor.commands.insertContentBlock({
|
|
34
|
+
* size: { width: '100%', height: 2 },
|
|
35
|
+
* background: '#e5e7eb'
|
|
36
|
+
* })
|
|
37
|
+
*/
|
|
16
38
|
/**
|
|
17
39
|
* @module ContentBlock
|
|
18
40
|
* @sidebarTitle Content Block
|
|
@@ -57,4 +79,12 @@ export type ContentBlockConfig = {
|
|
|
57
79
|
*/
|
|
58
80
|
background?: string;
|
|
59
81
|
};
|
|
82
|
+
/**
|
|
83
|
+
* Configuration options for ContentBlock
|
|
84
|
+
*/
|
|
85
|
+
export type ContentBlockOptions = any;
|
|
86
|
+
/**
|
|
87
|
+
* Attributes for content blocks
|
|
88
|
+
*/
|
|
89
|
+
export type ContentBlockAttributes = any;
|
|
60
90
|
import { Node } from '@core/index.js';
|
|
@@ -5,6 +5,18 @@
|
|
|
5
5
|
* @property {Object|null} preservedSelection - Stored selection
|
|
6
6
|
* @property {boolean} showVisualSelection - Whether to show selection decoration
|
|
7
7
|
*/
|
|
8
|
+
/**
|
|
9
|
+
* Configuration options for CustomSelection
|
|
10
|
+
* @typedef {Object} CustomSelectionOptions
|
|
11
|
+
* @category Options
|
|
12
|
+
* @example
|
|
13
|
+
* // CustomSelection works automatically
|
|
14
|
+
* new SuperDoc({
|
|
15
|
+
* selector: '#editor',
|
|
16
|
+
* document: 'document.docx'
|
|
17
|
+
* // Selection handling is built-in
|
|
18
|
+
* });
|
|
19
|
+
*/
|
|
8
20
|
/**
|
|
9
21
|
* Plugin key for custom selection management
|
|
10
22
|
* @private
|
|
@@ -33,5 +45,9 @@ export type SelectionState = {
|
|
|
33
45
|
*/
|
|
34
46
|
showVisualSelection: boolean;
|
|
35
47
|
};
|
|
48
|
+
/**
|
|
49
|
+
* Configuration options for CustomSelection
|
|
50
|
+
*/
|
|
51
|
+
export type CustomSelectionOptions = any;
|
|
36
52
|
import { PluginKey } from 'prosemirror-state';
|
|
37
53
|
import { Extension } from '@core/Extension.js';
|
|
@@ -1,7 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configuration options for Document
|
|
3
|
+
* @typedef {Object} DocumentOptions
|
|
4
|
+
* @category Options
|
|
5
|
+
* @example
|
|
6
|
+
* // Document node is the root - always included
|
|
7
|
+
* new SuperDoc({
|
|
8
|
+
* selector: '#editor',
|
|
9
|
+
* document: 'document.docx',
|
|
10
|
+
* // Document node wraps all content
|
|
11
|
+
* });
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* Attributes for document nodes
|
|
15
|
+
* @typedef {Object} DocumentAttributes
|
|
16
|
+
* @category Attributes
|
|
17
|
+
* @property {Object} [attributes] @internal Internal document attributes
|
|
18
|
+
*/
|
|
1
19
|
/**
|
|
2
20
|
* @module Document
|
|
3
21
|
* @sidebarTitle Document
|
|
4
22
|
* @snippetPath /snippets/extensions/document.mdx
|
|
5
23
|
*/
|
|
6
24
|
export const Document: Node;
|
|
25
|
+
/**
|
|
26
|
+
* Configuration options for Document
|
|
27
|
+
*/
|
|
28
|
+
export type DocumentOptions = any;
|
|
29
|
+
/**
|
|
30
|
+
* Attributes for document nodes
|
|
31
|
+
*/
|
|
32
|
+
export type DocumentAttributes = any;
|
|
7
33
|
import { Node } from '@core/index.js';
|
|
@@ -1,7 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configuration options for DropCursor
|
|
3
|
+
* @typedef {Object} DropCursorOptions
|
|
4
|
+
* @category Options
|
|
5
|
+
* @property {string} [color='currentColor'] CSS color for the drop cursor indicator
|
|
6
|
+
* @property {number} [width=2] Width of the drop cursor line in pixels
|
|
7
|
+
* @property {string} [class] Optional CSS class to apply to the drop cursor element
|
|
8
|
+
* @example
|
|
9
|
+
* // Customize drop cursor appearance
|
|
10
|
+
* const ConfiguredDropCursor = DropCursor.configure({
|
|
11
|
+
* color: '#3b82f6',
|
|
12
|
+
* width: 3,
|
|
13
|
+
* class: 'custom-drop-cursor'
|
|
14
|
+
* });
|
|
15
|
+
*
|
|
16
|
+
* // Use in SuperDoc
|
|
17
|
+
* new SuperDoc({
|
|
18
|
+
* selector: '#editor',
|
|
19
|
+
* document: 'document.docx',
|
|
20
|
+
* editorExtensions: [ConfiguredDropCursor]
|
|
21
|
+
* });
|
|
22
|
+
*/
|
|
1
23
|
/**
|
|
2
24
|
* @module DropCursor
|
|
3
25
|
* @sidebarTitle Drop Cursor
|
|
4
26
|
* @snippetPath /snippets/extensions/dropcursor.mdx
|
|
5
27
|
*/
|
|
6
28
|
export const DropCursor: Extension;
|
|
29
|
+
/**
|
|
30
|
+
* Configuration options for DropCursor
|
|
31
|
+
*/
|
|
32
|
+
export type DropCursorOptions = any;
|
|
7
33
|
import { Extension } from '@core/index.js';
|
|
@@ -3,6 +3,27 @@
|
|
|
3
3
|
* @typedef {string} FontFamilyValue
|
|
4
4
|
* @description CSS font-family string (e.g., 'Arial', 'Times New Roman', 'sans-serif')
|
|
5
5
|
*/
|
|
6
|
+
/**
|
|
7
|
+
* Configuration options for FontFamily
|
|
8
|
+
* @typedef {Object} FontFamilyOptions
|
|
9
|
+
* @category Options
|
|
10
|
+
* @property {string[]} [types=['textStyle']] Mark types to add font family support to
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Attributes for font family marks
|
|
14
|
+
* @typedef {Object} FontFamilyAttributes
|
|
15
|
+
* @category Attributes
|
|
16
|
+
* @property {FontFamilyValue} [fontFamily] Font family for text
|
|
17
|
+
* @example
|
|
18
|
+
* // Set font family on selected text
|
|
19
|
+
* editor.commands.setFontFamily('Arial')
|
|
20
|
+
*
|
|
21
|
+
* // Change to serif font
|
|
22
|
+
* editor.commands.setFontFamily('Georgia, serif')
|
|
23
|
+
*
|
|
24
|
+
* // Remove custom font
|
|
25
|
+
* editor.commands.unsetFontFamily()
|
|
26
|
+
*/
|
|
6
27
|
/**
|
|
7
28
|
* @module FontFamily
|
|
8
29
|
* @sidebarTitle Font Family
|
|
@@ -13,4 +34,12 @@ export const FontFamily: Extension;
|
|
|
13
34
|
* Font family value
|
|
14
35
|
*/
|
|
15
36
|
export type FontFamilyValue = string;
|
|
37
|
+
/**
|
|
38
|
+
* Configuration options for FontFamily
|
|
39
|
+
*/
|
|
40
|
+
export type FontFamilyOptions = any;
|
|
41
|
+
/**
|
|
42
|
+
* Attributes for font family marks
|
|
43
|
+
*/
|
|
44
|
+
export type FontFamilyAttributes = any;
|
|
16
45
|
import { Extension } from '@core/index.js';
|
|
@@ -18,6 +18,19 @@
|
|
|
18
18
|
* @typedef {string|number} FontSizeValue
|
|
19
19
|
* @description Size with optional unit (e.g., '12pt', '16px', 14)
|
|
20
20
|
*/
|
|
21
|
+
/**
|
|
22
|
+
* Configuration options for FontSize
|
|
23
|
+
* @typedef {Object} FontSizeOptions
|
|
24
|
+
* @category Options
|
|
25
|
+
* @property {string[]} [types=['textStyle', 'tableCell']] - Node/mark types to add font size support to
|
|
26
|
+
* @property {FontSizeDefaults} [defaults] - Default size configuration
|
|
27
|
+
*/
|
|
28
|
+
/**
|
|
29
|
+
* Attributes for font size
|
|
30
|
+
* @typedef {Object} FontSizeAttributes
|
|
31
|
+
* @category Attributes
|
|
32
|
+
* @property {FontSizeValue} [fontSize] - Font size with unit
|
|
33
|
+
*/
|
|
21
34
|
/**
|
|
22
35
|
* @module FontSize
|
|
23
36
|
* @sidebarTitle Font Size
|
|
@@ -49,4 +62,12 @@ export type FontSizeDefaults = {
|
|
|
49
62
|
* Font size value
|
|
50
63
|
*/
|
|
51
64
|
export type FontSizeValue = string | number;
|
|
65
|
+
/**
|
|
66
|
+
* Configuration options for FontSize
|
|
67
|
+
*/
|
|
68
|
+
export type FontSizeOptions = any;
|
|
69
|
+
/**
|
|
70
|
+
* Attributes for font size
|
|
71
|
+
*/
|
|
72
|
+
export type FontSizeAttributes = any;
|
|
52
73
|
import { Extension } from '@core/index.js';
|
|
@@ -4,6 +4,11 @@
|
|
|
4
4
|
* @property {string} name - Mark name
|
|
5
5
|
* @property {Object} attrs - Mark attributes
|
|
6
6
|
*/
|
|
7
|
+
/**
|
|
8
|
+
* Configuration options for FormatCommands
|
|
9
|
+
* @typedef {Object} FormatCommandsOptions
|
|
10
|
+
* @category Options
|
|
11
|
+
*/
|
|
7
12
|
/**
|
|
8
13
|
* @module FormatCommands
|
|
9
14
|
* @sidebarTitle Format Commands
|
|
@@ -24,4 +29,8 @@ export type StoredStyle = {
|
|
|
24
29
|
*/
|
|
25
30
|
attrs: any;
|
|
26
31
|
};
|
|
32
|
+
/**
|
|
33
|
+
* Configuration options for FormatCommands
|
|
34
|
+
*/
|
|
35
|
+
export type FormatCommandsOptions = any;
|
|
27
36
|
import { Extension } from '@core/index.js';
|
|
@@ -1,7 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configuration options for Gapcursor
|
|
3
|
+
* @typedef {Object} GapcursorOptions
|
|
4
|
+
* @category Options
|
|
5
|
+
*/
|
|
1
6
|
/**
|
|
2
7
|
* @module Gapcursor
|
|
3
8
|
* @sidebarTitle Gap Cursor
|
|
4
9
|
* @snippetPath /snippets/extensions/gapcursor.mdx
|
|
5
10
|
*/
|
|
6
11
|
export const Gapcursor: Extension;
|
|
12
|
+
/**
|
|
13
|
+
* Configuration options for Gapcursor
|
|
14
|
+
*/
|
|
15
|
+
export type GapcursorOptions = any;
|
|
7
16
|
import { Extension } from '@core/index.js';
|
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Heading attributes
|
|
3
3
|
* @typedef {Object} HeadingAttributes
|
|
4
|
+
* @category Attributes
|
|
4
5
|
* @property {number} level - Heading level (1-6)
|
|
5
6
|
*/
|
|
7
|
+
/**
|
|
8
|
+
* Configuration options for Heading
|
|
9
|
+
* @typedef {Object} HeadingOptions
|
|
10
|
+
* @category Options
|
|
11
|
+
* @property {number[]} [levels=[1,2,3,4,5,6]] - Supported heading levels
|
|
12
|
+
*/
|
|
6
13
|
/**
|
|
7
14
|
* @module Heading
|
|
8
15
|
* @sidebarTitle Heading
|
|
@@ -18,10 +25,9 @@ export const Heading: Extension;
|
|
|
18
25
|
/**
|
|
19
26
|
* Heading attributes
|
|
20
27
|
*/
|
|
21
|
-
export type HeadingAttributes =
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
};
|
|
28
|
+
export type HeadingAttributes = any;
|
|
29
|
+
/**
|
|
30
|
+
* Configuration options for Heading
|
|
31
|
+
*/
|
|
32
|
+
export type HeadingOptions = any;
|
|
27
33
|
import { Extension } from '@core/index.js';
|
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configuration options for Highlight
|
|
3
|
+
* @typedef {Object} HighlightOptions
|
|
4
|
+
* @category Options
|
|
5
|
+
* @property {Object} [htmlAttributes={}] - HTML attributes for highlight elements
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Attributes for highlight marks
|
|
9
|
+
* @typedef {Object} HighlightAttributes
|
|
10
|
+
* @category Attributes
|
|
11
|
+
* @property {string} [color] - Background color (CSS color value)
|
|
12
|
+
*/
|
|
1
13
|
/**
|
|
2
14
|
* @module Highlight
|
|
3
15
|
* @sidebarTitle Highlight
|
|
@@ -5,4 +17,12 @@
|
|
|
5
17
|
* @shortcut Mod-Shift-h | toggleHighlight | Toggle highlighted formatting
|
|
6
18
|
*/
|
|
7
19
|
export const Highlight: Mark;
|
|
20
|
+
/**
|
|
21
|
+
* Configuration options for Highlight
|
|
22
|
+
*/
|
|
23
|
+
export type HighlightOptions = any;
|
|
24
|
+
/**
|
|
25
|
+
* Attributes for highlight marks
|
|
26
|
+
*/
|
|
27
|
+
export type HighlightAttributes = any;
|
|
8
28
|
import { Mark } from '@core/index.js';
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* History
|
|
3
|
-
* @typedef {Object}
|
|
4
|
-
* @
|
|
5
|
-
* @property {number} [
|
|
2
|
+
* Configuration options for History
|
|
3
|
+
* @typedef {Object} HistoryOptions
|
|
4
|
+
* @category Options
|
|
5
|
+
* @property {number} [depth=100] - Maximum undo/redo steps to remember
|
|
6
|
+
* @property {number} [newGroupDelay=500] - Milliseconds to wait before starting a new history group
|
|
6
7
|
*/
|
|
7
8
|
/**
|
|
8
9
|
* @module History
|
|
@@ -14,16 +15,7 @@
|
|
|
14
15
|
*/
|
|
15
16
|
export const History: Extension;
|
|
16
17
|
/**
|
|
17
|
-
* History
|
|
18
|
+
* Configuration options for History
|
|
18
19
|
*/
|
|
19
|
-
export type
|
|
20
|
-
/**
|
|
21
|
-
* - Maximum number of history events to store
|
|
22
|
-
*/
|
|
23
|
-
depth?: number;
|
|
24
|
-
/**
|
|
25
|
-
* - Time in ms to group changes together
|
|
26
|
-
*/
|
|
27
|
-
newGroupDelay?: number;
|
|
28
|
-
};
|
|
20
|
+
export type HistoryOptions = any;
|
|
29
21
|
import { Extension } from '@core/Extension.js';
|
|
@@ -1,7 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configuration options for Image
|
|
3
|
+
* @typedef {Object} ImageOptions
|
|
4
|
+
* @category Options
|
|
5
|
+
* @property {boolean} [allowBase64=true] - Allow base64 encoded images
|
|
6
|
+
* @property {Object} [htmlAttributes] - Default HTML attributes for image elements
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Attributes for image nodes
|
|
10
|
+
* @typedef {Object} ImageAttributes
|
|
11
|
+
* @category Attributes
|
|
12
|
+
* @property {string} [src] - Image source URL or path
|
|
13
|
+
* @property {string} [alt='Uploaded picture'] - Alternative text for accessibility
|
|
14
|
+
* @property {string} [title] - Image title/tooltip text
|
|
15
|
+
* @property {Object} [size] - Image dimensions
|
|
16
|
+
* @property {number} [size.width] - Width in pixels
|
|
17
|
+
* @property {number} [size.height] - Height in pixels
|
|
18
|
+
* @property {Object} [padding] - Image padding/margins
|
|
19
|
+
* @property {number} [padding.left] - Left padding in pixels
|
|
20
|
+
* @property {number} [padding.top] - Top padding in pixels
|
|
21
|
+
* @property {number} [padding.bottom] - Bottom padding in pixels
|
|
22
|
+
* @property {number} [padding.right] - Right padding in pixels
|
|
23
|
+
* @property {Object} [marginOffset] - Margin offset for anchored images
|
|
24
|
+
* @property {number} [marginOffset.left] - Left margin offset
|
|
25
|
+
* @property {number} [marginOffset.top] - Top margin offset
|
|
26
|
+
* @property {string} [style] - Custom inline CSS styles
|
|
27
|
+
* @property {string} [id] @internal Image element ID
|
|
28
|
+
* @property {string} [rId] @internal Relationship ID for Word export
|
|
29
|
+
* @property {Object} [originalPadding] @internal Original padding values from Word import
|
|
30
|
+
* @property {Object} [originalAttributes] @internal Original attributes from Word import
|
|
31
|
+
* @property {boolean} [wrapTopAndBottom] @internal Wrap text above and below image
|
|
32
|
+
* @property {Object} [anchorData] @internal Anchor positioning data for Word
|
|
33
|
+
* @property {boolean} [isAnchor] @internal Whether image is anchored
|
|
34
|
+
* @property {boolean} [simplePos] @internal Simple positioning flag
|
|
35
|
+
* @property {string} [wrapText] @internal Text wrapping style
|
|
36
|
+
*/
|
|
37
|
+
/**
|
|
38
|
+
* Options for inserting an image
|
|
39
|
+
* @typedef {Object} ImageInsertOptions
|
|
40
|
+
* @property {string} src - Image source URL or data URI
|
|
41
|
+
* @property {string} [alt] - Alternative text
|
|
42
|
+
* @property {string} [title] - Image title
|
|
43
|
+
* @property {Object} [size] - Image dimensions
|
|
44
|
+
* @property {number} [size.width] - Width in pixels
|
|
45
|
+
* @property {number} [size.height] - Height in pixels
|
|
46
|
+
*/
|
|
1
47
|
/**
|
|
2
48
|
* @module Image
|
|
3
49
|
* @sidebarTitle Image
|
|
4
50
|
* @snippetPath /snippets/extensions/image.mdx
|
|
5
51
|
*/
|
|
6
52
|
export const Image: Node;
|
|
53
|
+
/**
|
|
54
|
+
* Configuration options for Image
|
|
55
|
+
*/
|
|
56
|
+
export type ImageOptions = any;
|
|
57
|
+
/**
|
|
58
|
+
* Attributes for image nodes
|
|
59
|
+
*/
|
|
60
|
+
export type ImageAttributes = any;
|
|
61
|
+
/**
|
|
62
|
+
* Options for inserting an image
|
|
63
|
+
*/
|
|
64
|
+
export type ImageInsertOptions = {
|
|
65
|
+
/**
|
|
66
|
+
* - Image source URL or data URI
|
|
67
|
+
*/
|
|
68
|
+
src: string;
|
|
69
|
+
/**
|
|
70
|
+
* - Alternative text
|
|
71
|
+
*/
|
|
72
|
+
alt?: string;
|
|
73
|
+
/**
|
|
74
|
+
* - Image title
|
|
75
|
+
*/
|
|
76
|
+
title?: string;
|
|
77
|
+
/**
|
|
78
|
+
* - Image dimensions
|
|
79
|
+
*/
|
|
80
|
+
size?: {
|
|
81
|
+
width?: number;
|
|
82
|
+
height?: number;
|
|
83
|
+
};
|
|
84
|
+
};
|
|
7
85
|
import { Node } from '@core/index.js';
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configuration options for Italic
|
|
3
|
+
* @typedef {Object} ItalicOptions
|
|
4
|
+
* @category Options
|
|
5
|
+
* @property {Object} [htmlAttributes={}] - HTML attributes for italic elements
|
|
6
|
+
*/
|
|
1
7
|
/**
|
|
2
8
|
* @module Italic
|
|
3
9
|
* @sidebarTitle Italic
|
|
@@ -6,4 +12,8 @@
|
|
|
6
12
|
* @shortcut Mod-I | toggleItalic | Toggle italic formatting (uppercase)
|
|
7
13
|
*/
|
|
8
14
|
export const Italic: Mark;
|
|
15
|
+
/**
|
|
16
|
+
* Configuration options for Italic
|
|
17
|
+
*/
|
|
18
|
+
export type ItalicOptions = any;
|
|
9
19
|
import { Mark } from '@core/index.js';
|