@editora/plugins 1.0.13 → 1.0.15
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/clear-formatting.cjs.js +1 -1
- package/dist/clear-formatting.esm.js +45 -35
- package/dist/code.cjs.js +27 -21
- package/dist/code.esm.js +72 -43
- package/dist/format-painter.cjs.js +1 -0
- package/dist/format-painter.esm.js +666 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +105 -103
- package/index.d.ts +35 -0
- package/package.json +11 -4
package/dist/index.esm.js
CHANGED
|
@@ -2,7 +2,7 @@ import { HeadingPlugin as e } from "./heading.esm.js";
|
|
|
2
2
|
import { BoldPlugin as i } from "./bold.esm.js";
|
|
3
3
|
import { ItalicPlugin as l } from "./italic.esm.js";
|
|
4
4
|
import { UnderlinePlugin as m } from "./underline.esm.js";
|
|
5
|
-
import { StrikethroughPlugin as
|
|
5
|
+
import { StrikethroughPlugin as p } from "./strikethrough.esm.js";
|
|
6
6
|
import { ListPlugin as u } from "./list.esm.js";
|
|
7
7
|
import { ChecklistPlugin as x } from "./checklist.esm.js";
|
|
8
8
|
import { HistoryPlugin as C } from "./history.esm.js";
|
|
@@ -10,118 +10,120 @@ import { LinkPlugin as d } from "./link.esm.js";
|
|
|
10
10
|
import { BlockquotePlugin as h } from "./blockquote.esm.js";
|
|
11
11
|
import { ClearFormattingPlugin as k } from "./clear-formatting.esm.js";
|
|
12
12
|
import { CodePlugin as D } from "./code.esm.js";
|
|
13
|
-
import { TablePlugin as
|
|
14
|
-
import { FontSizePlugin as
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
13
|
+
import { TablePlugin as F } from "./table.esm.js";
|
|
14
|
+
import { FontSizePlugin as B } from "./font-size.esm.js";
|
|
15
|
+
import { FormatPainterPlugin as y } from "./format-painter.esm.js";
|
|
16
|
+
import { FontFamilyPlugin as L } from "./font-family.esm.js";
|
|
17
|
+
import { TextAlignmentPlugin as v } from "./text-alignment.esm.js";
|
|
18
|
+
import { TextColorPlugin as z } from "./text-color.esm.js";
|
|
19
|
+
import { BackgroundColorPlugin as R } from "./background-color.esm.js";
|
|
20
|
+
import { LineHeightPlugin as W } from "./line-height.esm.js";
|
|
21
|
+
import { IndentPlugin as q } from "./indent.esm.js";
|
|
22
|
+
import { DirectionPlugin as V } from "./direction.esm.js";
|
|
23
|
+
import { CapitalizationPlugin as J } from "./capitalization.esm.js";
|
|
24
|
+
import { MathPlugin as O } from "./math.esm.js";
|
|
25
|
+
import { SpecialCharactersPlugin as X } from "./special-characters.esm.js";
|
|
26
|
+
import { EmojisPlugin as Z } from "./emojis.esm.js";
|
|
27
|
+
import { EmbedIframePlugin as oo } from "./embed-iframe.esm.js";
|
|
28
|
+
import { AnchorPlugin as eo } from "./anchor.esm.js";
|
|
29
|
+
import { MentionPlugin as io } from "./mentions.esm.js";
|
|
30
|
+
import { TrackChangesPlugin as lo } from "./track-changes.esm.js";
|
|
31
|
+
import { VersionDiffPlugin as mo } from "./version-diff.esm.js";
|
|
32
|
+
import { ConditionalContentPlugin as po } from "./conditional-content.esm.js";
|
|
33
|
+
import { DataBindingPlugin as uo } from "./data-binding.esm.js";
|
|
34
|
+
import { ContentRulesPlugin as xo } from "./content-rules.esm.js";
|
|
35
|
+
import { CitationsPlugin as Co } from "./citations.esm.js";
|
|
36
|
+
import { ApprovalWorkflowPlugin as To } from "./approval-workflow.esm.js";
|
|
37
|
+
import { PIIRedactionPlugin as Mo } from "./pii-redaction.esm.js";
|
|
38
|
+
import { SmartPastePlugin as Ao } from "./smart-paste.esm.js";
|
|
39
|
+
import { BlocksLibraryPlugin as So } from "./blocks-library.esm.js";
|
|
40
|
+
import { DocSchemaPlugin as bo } from "./doc-schema.esm.js";
|
|
41
|
+
import { TranslationWorkflowPlugin as Eo } from "./translation-workflow.esm.js";
|
|
42
|
+
import { SlashCommandsPlugin as Io } from "./slash-commands.esm.js";
|
|
43
|
+
import { MediaManagerPlugin as Ho, getMediaManagerConfig as vo, setMediaManagerConfig as wo } from "./media-manager.esm.js";
|
|
44
|
+
import { D as Go, g as Ro, s as Uo } from "./index-BFsKNTTj.mjs";
|
|
45
|
+
import { PreviewPlugin as jo } from "./preview.esm.js";
|
|
46
|
+
import { FullscreenPlugin as No } from "./fullscreen.esm.js";
|
|
47
|
+
import { PrintPlugin as _o } from "./print.esm.js";
|
|
48
|
+
import { PageBreakPlugin as Ko } from "./page-break.esm.js";
|
|
49
|
+
import { FootnotePlugin as Qo } from "./footnote.esm.js";
|
|
50
|
+
import { CodeSamplePlugin as Yo } from "./code-sample.esm.js";
|
|
51
|
+
import { MergeTagPlugin as $o } from "./merge-tag.esm.js";
|
|
52
|
+
import { PREDEFINED_TEMPLATES as rr, TemplatePlugin as er, addCustomTemplate as tr, getAllTemplates as ir, getTemplateCategories as nr, getTemplatesByCategory as lr, sanitizeTemplate as gr, searchTemplates as mr, validateTemplate as ar } from "./template.esm.js";
|
|
53
|
+
import { CommentsPlugin as fr } from "./comments.esm.js";
|
|
54
|
+
import { SpellCheckPlugin as Pr } from "./spell-check.esm.js";
|
|
55
|
+
import { A11yCheckerPlugin as sr } from "./a11y-checker.esm.js";
|
|
56
|
+
import { buildApiUrl as cr, getGlobalApiConfig as dr, getGlobalApiHeaders as Tr, setGlobalApiConfig as hr } from "./shared-config.esm.js";
|
|
56
57
|
export {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
58
|
+
sr as A11yCheckerPlugin,
|
|
59
|
+
eo as AnchorPlugin,
|
|
60
|
+
To as ApprovalWorkflowPlugin,
|
|
61
|
+
R as BackgroundColorPlugin,
|
|
61
62
|
h as BlockquotePlugin,
|
|
62
|
-
|
|
63
|
+
So as BlocksLibraryPlugin,
|
|
63
64
|
i as BoldPlugin,
|
|
64
|
-
|
|
65
|
+
J as CapitalizationPlugin,
|
|
65
66
|
x as ChecklistPlugin,
|
|
66
|
-
|
|
67
|
+
Co as CitationsPlugin,
|
|
67
68
|
k as ClearFormattingPlugin,
|
|
68
69
|
D as CodePlugin,
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
70
|
+
Yo as CodeSamplePlugin,
|
|
71
|
+
fr as CommentsPlugin,
|
|
72
|
+
po as ConditionalContentPlugin,
|
|
73
|
+
xo as ContentRulesPlugin,
|
|
74
|
+
uo as DataBindingPlugin,
|
|
75
|
+
V as DirectionPlugin,
|
|
76
|
+
bo as DocSchemaPlugin,
|
|
77
|
+
Go as DocumentManagerPlugin,
|
|
78
|
+
oo as EmbedIframePlugin,
|
|
79
|
+
Z as EmojisPlugin,
|
|
80
|
+
L as FontFamilyPlugin,
|
|
81
|
+
B as FontSizePlugin,
|
|
82
|
+
Qo as FootnotePlugin,
|
|
83
|
+
y as FormatPainterPlugin,
|
|
84
|
+
No as FullscreenPlugin,
|
|
83
85
|
e as HeadingPlugin,
|
|
84
86
|
C as HistoryPlugin,
|
|
85
|
-
|
|
87
|
+
q as IndentPlugin,
|
|
86
88
|
l as ItalicPlugin,
|
|
87
|
-
|
|
89
|
+
W as LineHeightPlugin,
|
|
88
90
|
d as LinkPlugin,
|
|
89
91
|
u as ListPlugin,
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
92
|
+
O as MathPlugin,
|
|
93
|
+
Ho as MediaManagerPlugin,
|
|
94
|
+
io as MentionPlugin,
|
|
95
|
+
$o as MergeTagPlugin,
|
|
96
|
+
Mo as PIIRedactionPlugin,
|
|
97
|
+
rr as PREDEFINED_TEMPLATES,
|
|
98
|
+
Ko as PageBreakPlugin,
|
|
99
|
+
jo as PreviewPlugin,
|
|
100
|
+
_o as PrintPlugin,
|
|
101
|
+
Io as SlashCommandsPlugin,
|
|
102
|
+
Ao as SmartPastePlugin,
|
|
103
|
+
X as SpecialCharactersPlugin,
|
|
104
|
+
Pr as SpellCheckPlugin,
|
|
105
|
+
p as StrikethroughPlugin,
|
|
106
|
+
F as TablePlugin,
|
|
107
|
+
er as TemplatePlugin,
|
|
108
|
+
v as TextAlignmentPlugin,
|
|
109
|
+
z as TextColorPlugin,
|
|
110
|
+
lo as TrackChangesPlugin,
|
|
111
|
+
Eo as TranslationWorkflowPlugin,
|
|
110
112
|
m as UnderlinePlugin,
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
113
|
+
mo as VersionDiffPlugin,
|
|
114
|
+
tr as addCustomTemplate,
|
|
115
|
+
cr as buildApiUrl,
|
|
116
|
+
ir as getAllTemplates,
|
|
117
|
+
Ro as getDocumentManagerConfig,
|
|
118
|
+
dr as getGlobalApiConfig,
|
|
119
|
+
Tr as getGlobalApiHeaders,
|
|
120
|
+
vo as getMediaManagerConfig,
|
|
121
|
+
nr as getTemplateCategories,
|
|
122
|
+
lr as getTemplatesByCategory,
|
|
123
|
+
gr as sanitizeTemplate,
|
|
124
|
+
mr as searchTemplates,
|
|
125
|
+
Uo as setDocumentManagerConfig,
|
|
126
|
+
hr as setGlobalApiConfig,
|
|
127
|
+
wo as setMediaManagerConfig,
|
|
128
|
+
ar as validateTemplate
|
|
127
129
|
};
|
package/index.d.ts
CHANGED
|
@@ -834,6 +834,40 @@ export interface Template {
|
|
|
834
834
|
tags?: string[];
|
|
835
835
|
}
|
|
836
836
|
|
|
837
|
+
export interface FormatPainterPluginOptions {
|
|
838
|
+
ignoredFormats?: string[];
|
|
839
|
+
keepActiveAfterMouseApply?: boolean;
|
|
840
|
+
}
|
|
841
|
+
|
|
842
|
+
export interface FormatPainterSnapshot {
|
|
843
|
+
inline: {
|
|
844
|
+
marks: Partial<Record<"bold" | "italic" | "underline" | "strikethrough", boolean>>;
|
|
845
|
+
styles: Record<string, string>;
|
|
846
|
+
};
|
|
847
|
+
block: {
|
|
848
|
+
tagName: string;
|
|
849
|
+
styles: Record<string, string>;
|
|
850
|
+
attrs: Record<string, string>;
|
|
851
|
+
} | null;
|
|
852
|
+
list: {
|
|
853
|
+
tagName: "ul" | "ol";
|
|
854
|
+
styles: Record<string, string>;
|
|
855
|
+
attrs: Record<string, string>;
|
|
856
|
+
itemAttrs: Record<string, string>;
|
|
857
|
+
} | null;
|
|
858
|
+
table: {
|
|
859
|
+
table: {
|
|
860
|
+
styles: Record<string, string>;
|
|
861
|
+
attrs: Record<string, string>;
|
|
862
|
+
} | null;
|
|
863
|
+
cell: {
|
|
864
|
+
styles: Record<string, string>;
|
|
865
|
+
attrs: Record<string, string>;
|
|
866
|
+
} | null;
|
|
867
|
+
} | null;
|
|
868
|
+
ignoredFormats: string[];
|
|
869
|
+
}
|
|
870
|
+
|
|
837
871
|
export function HeadingPlugin(): Plugin;
|
|
838
872
|
export function BoldPlugin(): Plugin;
|
|
839
873
|
export function ItalicPlugin(): Plugin;
|
|
@@ -849,6 +883,7 @@ export function CodePlugin(): Plugin;
|
|
|
849
883
|
export function TablePlugin(): Plugin;
|
|
850
884
|
export function FontSizePlugin(): Plugin;
|
|
851
885
|
export function FontFamilyPlugin(): Plugin;
|
|
886
|
+
export function FormatPainterPlugin(options?: FormatPainterPluginOptions): Plugin;
|
|
852
887
|
export function TextAlignmentPlugin(): Plugin;
|
|
853
888
|
export function TextColorPlugin(): Plugin;
|
|
854
889
|
export function BackgroundColorPlugin(): Plugin;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@editora/plugins",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.15",
|
|
4
4
|
"description": "Enterprise plugin suite for Editora rich text editor in React and web apps, including tables, media, workflow, and compliance tooling.",
|
|
5
5
|
"author": "Ajay Kumar <ajaykr089@gmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -234,6 +234,12 @@
|
|
|
234
234
|
"require": "./dist/font-size.cjs.js",
|
|
235
235
|
"default": "./dist/font-size.esm.js"
|
|
236
236
|
},
|
|
237
|
+
"./format-painter": {
|
|
238
|
+
"types": "./index.d.ts",
|
|
239
|
+
"import": "./dist/format-painter.esm.js",
|
|
240
|
+
"require": "./dist/format-painter.cjs.js",
|
|
241
|
+
"default": "./dist/format-painter.esm.js"
|
|
242
|
+
},
|
|
237
243
|
"./footnote": {
|
|
238
244
|
"types": "./index.d.ts",
|
|
239
245
|
"import": "./dist/footnote.esm.js",
|
|
@@ -419,17 +425,18 @@
|
|
|
419
425
|
"test:blocks-library": "node ../../node_modules/jest/bin/jest.js -c ./jest.config.cjs --watchman=false --runTestsByPath ./blocks-library/src/BlocksLibraryPlugin.native.test.js",
|
|
420
426
|
"test:doc-schema": "node ../../node_modules/jest/bin/jest.js -c ./jest.config.cjs --watchman=false --runTestsByPath ./doc-schema/src/DocSchemaPlugin.native.test.js",
|
|
421
427
|
"test:translation-workflow": "node ../../node_modules/jest/bin/jest.js -c ./jest.config.cjs --watchman=false --runTestsByPath ./translation-workflow/src/TranslationWorkflowPlugin.native.test.js",
|
|
422
|
-
"
|
|
428
|
+
"test:format-painter": "node -r ../../node_modules/ts-node/register ./format-painter/src/FormatPainterPlugin.native.test.js",
|
|
429
|
+
"verify:citations": "npm run typecheck:build && npm run test:citations && npm run test:content-rules && npm run test:approval-workflow && npm run test:pii-redaction && npm run test:smart-paste && npm run test:blocks-library && npm run test:doc-schema && npm run test:translation-workflow && npm run test:format-painter && npm run build"
|
|
423
430
|
},
|
|
424
431
|
"peerDependencies": {
|
|
425
|
-
"@editora/core": "^1.0.
|
|
432
|
+
"@editora/core": "^1.0.12"
|
|
426
433
|
},
|
|
427
434
|
"dependencies": {
|
|
428
435
|
"katex": "^0.16.27",
|
|
429
436
|
"mathjax": "^3.2.2"
|
|
430
437
|
},
|
|
431
438
|
"devDependencies": {
|
|
432
|
-
"@editora/core": "^1.0.
|
|
439
|
+
"@editora/core": "^1.0.12",
|
|
433
440
|
"@types/katex": "^0.16.8",
|
|
434
441
|
"typescript": "^5.0.0",
|
|
435
442
|
"vite": "^4.5.14"
|