@richscripts/richtexteditor 2.4.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/README.md +360 -0
- package/admin/index.d.ts +100 -0
- package/admin/index.js +94 -0
- package/angular/component.ts +284 -0
- package/angular/index.d.ts +80 -0
- package/angular/index.ts +24 -0
- package/headless/index.d.ts +65 -0
- package/headless/index.js +272 -0
- package/index.d.ts +1412 -0
- package/integrations/shared.d.ts +138 -0
- package/integrations/shared.js +5182 -0
- package/package.json +130 -0
- package/react/index.d.ts +104 -0
- package/react/index.js +310 -0
- package/richtexteditor/CHANGELOG.md +1876 -0
- package/richtexteditor/all_plugins.js +31125 -0
- package/richtexteditor/all_plugins.min.js +78 -0
- package/richtexteditor/lang/rte-lang-af.js +193 -0
- package/richtexteditor/lang/rte-lang-ar.js +193 -0
- package/richtexteditor/lang/rte-lang-bg.js +193 -0
- package/richtexteditor/lang/rte-lang-bn.js +193 -0
- package/richtexteditor/lang/rte-lang-bs.js +193 -0
- package/richtexteditor/lang/rte-lang-ca.js +193 -0
- package/richtexteditor/lang/rte-lang-cs.js +193 -0
- package/richtexteditor/lang/rte-lang-cy.js +193 -0
- package/richtexteditor/lang/rte-lang-da.js +193 -0
- package/richtexteditor/lang/rte-lang-de.js +193 -0
- package/richtexteditor/lang/rte-lang-el.js +193 -0
- package/richtexteditor/lang/rte-lang-en.js +6 -0
- package/richtexteditor/lang/rte-lang-es.js +193 -0
- package/richtexteditor/lang/rte-lang-et.js +193 -0
- package/richtexteditor/lang/rte-lang-fa.js +193 -0
- package/richtexteditor/lang/rte-lang-fi.js +193 -0
- package/richtexteditor/lang/rte-lang-fil.js +193 -0
- package/richtexteditor/lang/rte-lang-fj.js +193 -0
- package/richtexteditor/lang/rte-lang-fr.js +193 -0
- package/richtexteditor/lang/rte-lang-ga.js +193 -0
- package/richtexteditor/lang/rte-lang-gu.js +193 -0
- package/richtexteditor/lang/rte-lang-he.js +193 -0
- package/richtexteditor/lang/rte-lang-hi.js +193 -0
- package/richtexteditor/lang/rte-lang-hr.js +193 -0
- package/richtexteditor/lang/rte-lang-ht.js +193 -0
- package/richtexteditor/lang/rte-lang-hu.js +193 -0
- package/richtexteditor/lang/rte-lang-id.js +193 -0
- package/richtexteditor/lang/rte-lang-is.js +193 -0
- package/richtexteditor/lang/rte-lang-it.js +193 -0
- package/richtexteditor/lang/rte-lang-ja.js +193 -0
- package/richtexteditor/lang/rte-lang-kn.js +193 -0
- package/richtexteditor/lang/rte-lang-ko.js +193 -0
- package/richtexteditor/lang/rte-lang-lt.js +193 -0
- package/richtexteditor/lang/rte-lang-lv.js +193 -0
- package/richtexteditor/lang/rte-lang-mg.js +193 -0
- package/richtexteditor/lang/rte-lang-mi.js +193 -0
- package/richtexteditor/lang/rte-lang-ml.js +193 -0
- package/richtexteditor/lang/rte-lang-mr.js +193 -0
- package/richtexteditor/lang/rte-lang-ms.js +193 -0
- package/richtexteditor/lang/rte-lang-mt.js +193 -0
- package/richtexteditor/lang/rte-lang-mww.js +193 -0
- package/richtexteditor/lang/rte-lang-nb.js +193 -0
- package/richtexteditor/lang/rte-lang-nl.js +193 -0
- package/richtexteditor/lang/rte-lang-otq.js +193 -0
- package/richtexteditor/lang/rte-lang-pa.js +193 -0
- package/richtexteditor/lang/rte-lang-pl.js +193 -0
- package/richtexteditor/lang/rte-lang-pt-pt.js +193 -0
- package/richtexteditor/lang/rte-lang-pt.js +193 -0
- package/richtexteditor/lang/rte-lang-ro.js +193 -0
- package/richtexteditor/lang/rte-lang-ru.js +193 -0
- package/richtexteditor/lang/rte-lang-sk.js +193 -0
- package/richtexteditor/lang/rte-lang-sl.js +193 -0
- package/richtexteditor/lang/rte-lang-sm.js +193 -0
- package/richtexteditor/lang/rte-lang-sr-Cyrl.js +193 -0
- package/richtexteditor/lang/rte-lang-sr-Latn.js +193 -0
- package/richtexteditor/lang/rte-lang-sv.js +193 -0
- package/richtexteditor/lang/rte-lang-sw.js +193 -0
- package/richtexteditor/lang/rte-lang-ta.js +193 -0
- package/richtexteditor/lang/rte-lang-te.js +193 -0
- package/richtexteditor/lang/rte-lang-th.js +193 -0
- package/richtexteditor/lang/rte-lang-tlh-Latn.js +193 -0
- package/richtexteditor/lang/rte-lang-tlh-Piqd.js +193 -0
- package/richtexteditor/lang/rte-lang-to.js +193 -0
- package/richtexteditor/lang/rte-lang-tr.js +193 -0
- package/richtexteditor/lang/rte-lang-ty.js +193 -0
- package/richtexteditor/lang/rte-lang-uk.js +193 -0
- package/richtexteditor/lang/rte-lang-ur.js +193 -0
- package/richtexteditor/lang/rte-lang-vi.js +193 -0
- package/richtexteditor/lang/rte-lang-yua.js +193 -0
- package/richtexteditor/lang/rte-lang-zh-Hans.js +193 -0
- package/richtexteditor/lang/rte-lang-zh-Hant.js +193 -0
- package/richtexteditor/lang/rte-lang.js +1 -0
- package/richtexteditor/plugins/-combine-plugin.txt +2 -0
- package/richtexteditor/plugins/-combine-plugins.bat +20 -0
- package/richtexteditor/plugins/a11yenhance.js +90 -0
- package/richtexteditor/plugins/accessibilitychecker.js +579 -0
- package/richtexteditor/plugins/aitoolkit.css +15830 -0
- package/richtexteditor/plugins/aitoolkit.js +19171 -0
- package/richtexteditor/plugins/all_plugins.js +31125 -0
- package/richtexteditor/plugins/all_plugins.min.js +78 -0
- package/richtexteditor/plugins/autoembed.js +174 -0
- package/richtexteditor/plugins/blocktypes.js +175 -0
- package/richtexteditor/plugins/bookmarkcard.js +226 -0
- package/richtexteditor/plugins/charlimit.js +195 -0
- package/richtexteditor/plugins/comments.js +672 -0
- package/richtexteditor/plugins/contentminimap.js +369 -0
- package/richtexteditor/plugins/crdt-engine.js +8905 -0
- package/richtexteditor/plugins/crdt-engine.min.js +5 -0
- package/richtexteditor/plugins/dialoga11y.js +174 -0
- package/richtexteditor/plugins/dictation.js +268 -0
- package/richtexteditor/plugins/documentimport.js +369 -0
- package/richtexteditor/plugins/documentoutline.js +341 -0
- package/richtexteditor/plugins/emailtoolkit.js +165 -0
- package/richtexteditor/plugins/emojiautocomplete.js +241 -0
- package/richtexteditor/plugins/foldheadings.js +181 -0
- package/richtexteditor/plugins/ghostcomplete.js +297 -0
- package/richtexteditor/plugins/html2pdf.js +158 -0
- package/richtexteditor/plugins/imageeditor.js +159 -0
- package/richtexteditor/plugins/insertcode.js +319 -0
- package/richtexteditor/plugins/insertemoji.js +229 -0
- package/richtexteditor/plugins/insertgallery.js +362 -0
- package/richtexteditor/plugins/inserttemplate.js +261 -0
- package/richtexteditor/plugins/localdraft.js +213 -0
- package/richtexteditor/plugins/markdownexport.js +110 -0
- package/richtexteditor/plugins/mathdialog.js +153 -0
- package/richtexteditor/plugins/mentionplugin.js +534 -0
- package/richtexteditor/plugins/mermaiddiagram.js +294 -0
- package/richtexteditor/plugins/readabilitystats.js +148 -0
- package/richtexteditor/plugins/readaloud.js +243 -0
- package/richtexteditor/plugins/restrictedediting.js +208 -0
- package/richtexteditor/plugins/revisionhistory.js +670 -0
- package/richtexteditor/plugins/samples/insertcode_v1.js +76 -0
- package/richtexteditor/plugins/slashcommand.js +705 -0
- package/richtexteditor/plugins/smartchips.js +250 -0
- package/richtexteditor/plugins/spellcheck.js +181 -0
- package/richtexteditor/plugins/todolist.js +137 -0
- package/richtexteditor/plugins/trackedchanges.js +658 -0
- package/richtexteditor/plugins/tui.image-editor/fabric.min.js +8 -0
- package/richtexteditor/plugins/tui.image-editor/note.txt +5 -0
- package/richtexteditor/plugins/tui.image-editor/svg/icon-a.svg +235 -0
- package/richtexteditor/plugins/tui.image-editor/svg/icon-b.svg +224 -0
- package/richtexteditor/plugins/tui.image-editor/svg/icon-c.svg +224 -0
- package/richtexteditor/plugins/tui.image-editor/svg/icon-d.svg +224 -0
- package/richtexteditor/plugins/tui.image-editor/tui-code-snippet.min.js +7 -0
- package/richtexteditor/plugins/tui.image-editor/tui-color-picker.min.css +6 -0
- package/richtexteditor/plugins/tui.image-editor/tui-color-picker.min.js +7 -0
- package/richtexteditor/plugins/tui.image-editor/tui-image-editor.min.css +7 -0
- package/richtexteditor/plugins/tui.image-editor/tui-image-editor.min.js +15 -0
- package/richtexteditor/plugins/typewriter.js +203 -0
- package/richtexteditor/plugins/wordexport.js +0 -0
- package/richtexteditor/plugins/yjscollab.js +693 -0
- package/richtexteditor/plugins/zz_richtextbox_dialog_style.js +335 -0
- package/richtexteditor/rte-config.js +933 -0
- package/richtexteditor/rte.js +943 -0
- package/richtexteditor/rte_mobile.css +234 -0
- package/richtexteditor/rte_theme_default.css +4819 -0
- package/richtexteditor/runtime/colorpicker_more_ns.htm +2613 -0
- package/richtexteditor/runtime/help.htm +162 -0
- package/richtexteditor/runtime/images/1x1.gif +0 -0
- package/richtexteditor/runtime/images/cpie_Color.cur +0 -0
- package/richtexteditor/runtime/images/cpie_GradientPositionDark.gif +0 -0
- package/richtexteditor/runtime/images/cpie_GradientPositionLight.gif +0 -0
- package/richtexteditor/runtime/images/cpie_VerticalPosition.gif +0 -0
- package/richtexteditor/runtime/images/cpie_WebSafe.gif +0 -0
- package/richtexteditor/runtime/images/cpie_gradients.png +0 -0
- package/richtexteditor/runtime/images/cpns_Color.cur +0 -0
- package/richtexteditor/runtime/images/cpns_ColorSpace1.png +0 -0
- package/richtexteditor/runtime/images/cpns_ColorSpace2.png +0 -0
- package/richtexteditor/runtime/images/cpns_GradientPositionDark.gif +0 -0
- package/richtexteditor/runtime/images/cpns_GradientPositionLight.gif +0 -0
- package/richtexteditor/runtime/images/cpns_Vertical1.png +0 -0
- package/richtexteditor/runtime/images/cpns_Vertical2.png +0 -0
- package/richtexteditor/runtime/images/cpns_VerticalPosition.gif +0 -0
- package/richtexteditor/runtime/images/cpns_WebSafe.gif +0 -0
- package/richtexteditor/runtime/images/cpns_gradients.png +0 -0
- package/richtexteditor/runtime/images/cpns_hue2.png +0 -0
- package/richtexteditor/runtime/images/formbn.gif +0 -0
- package/richtexteditor/runtime/images/multiclavier.gif +0 -0
- package/richtexteditor/runtime/richtexteditor_content.css +362 -0
- package/richtexteditor/runtime/richtexteditor_preview.css +302 -0
- package/richtexteditor/runtime/richtexteditor_preview.js +1 -0
- package/server/index.d.ts +21 -0
- package/server/index.js +23 -0
- package/svelte/index.d.ts +19 -0
- package/svelte/index.js +59 -0
- package/vue/index.d.ts +94 -0
- package/vue/index.js +291 -0
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
|
|
2
|
+
/* TODO: use @import for your css */
|
|
3
|
+
|
|
4
|
+
body, table, p, div {
|
|
5
|
+
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
6
|
+
color: #414141;
|
|
7
|
+
font-size: 14px;
|
|
8
|
+
line-height: 1.6;
|
|
9
|
+
}
|
|
10
|
+
a {
|
|
11
|
+
color: #377dff;
|
|
12
|
+
text-decoration: none;
|
|
13
|
+
-webkit-transition: color 0.2s ease 0s, text-decoration 0.2s ease 0s;
|
|
14
|
+
-moz-transition: color 0.2s ease 0s, text-decoration 0.2s ease 0s;
|
|
15
|
+
-o-transition: color 0.2s ease 0s, text-decoration 0.2s ease 0s;
|
|
16
|
+
transition: color 0.2s ease 0s, text-decoration 0.2s ease 0s;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/*RTE_DefaultConfig.items_InlineClasses*/
|
|
20
|
+
.my-cls-mark {
|
|
21
|
+
background-color: yellow;
|
|
22
|
+
font-weight: bold;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.my-cls-warning {
|
|
26
|
+
background-color: orange;
|
|
27
|
+
color: white;
|
|
28
|
+
font-weight: bold;
|
|
29
|
+
}
|
|
30
|
+
/*RTE_DefaultConfig.items_ParagraphClasses*/
|
|
31
|
+
.my-cls-quote {
|
|
32
|
+
margin: 10px;
|
|
33
|
+
padding-left: 10px;
|
|
34
|
+
border-left: dashed 1px red;
|
|
35
|
+
font-style: italic;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.my-cls-largecenter {
|
|
39
|
+
font-size: 1.5em;
|
|
40
|
+
font-weight: bold;
|
|
41
|
+
text-align: center;
|
|
42
|
+
margin: 10px;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
* {
|
|
46
|
+
box-sizing: border-box;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
body {
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
a {
|
|
54
|
+
text-decoration: none;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
a:hover {
|
|
58
|
+
text-decoration: underline;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
table {
|
|
62
|
+
border-spacing: 0;
|
|
63
|
+
border-collapse: collapse;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
table:not([width]) {
|
|
67
|
+
width: 100%;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
table[border="0"] td, table:not([border]) td, table[border="0"] th, table:not([border]) th {
|
|
71
|
+
border: 1px solid #ddd;
|
|
72
|
+
}
|
|
73
|
+
thead {
|
|
74
|
+
background-color: #eee;
|
|
75
|
+
}
|
|
76
|
+
.table > tbody > tr > td, .table > tbody > tr > th, .table > tfoot > tr > td, .table > tfoot > tr > th, .table > thead > tr > td, .table > thead > tr > th {
|
|
77
|
+
padding: 8px;
|
|
78
|
+
line-height: 1.42857143;
|
|
79
|
+
vertical-align: top;
|
|
80
|
+
border-top: 1px solid #ddd;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
.dp-highlighter {
|
|
86
|
+
font-family: "Consolas", "Courier New", Courier, mono, serif;
|
|
87
|
+
font-size: 12px;
|
|
88
|
+
background-color: #E7E5DC;
|
|
89
|
+
width: 99%;
|
|
90
|
+
overflow: auto;
|
|
91
|
+
margin: 18px 0 18px 0 !important;
|
|
92
|
+
padding-top: 1px; /* adds a little border on top when controls are hidden */
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/* clear styles */
|
|
96
|
+
.dp-highlighter ol,
|
|
97
|
+
.dp-highlighter ol li,
|
|
98
|
+
.dp-highlighter ol li span {
|
|
99
|
+
margin: 0;
|
|
100
|
+
padding: 0;
|
|
101
|
+
border: none;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.dp-highlighter a,
|
|
105
|
+
.dp-highlighter a:hover {
|
|
106
|
+
background: none;
|
|
107
|
+
border: none;
|
|
108
|
+
padding: 0;
|
|
109
|
+
margin: 0;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.dp-highlighter .bar {
|
|
113
|
+
padding-left: 45px;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.dp-highlighter.collapsed .bar,
|
|
117
|
+
.dp-highlighter.nogutter .bar {
|
|
118
|
+
padding-left: 0px;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.dp-highlighter ol {
|
|
122
|
+
list-style: decimal; /* for ie */
|
|
123
|
+
background-color: #fff;
|
|
124
|
+
margin: 0px 0px 1px 45px !important; /* 1px bottom margin seems to fix occasional Firefox scrolling */
|
|
125
|
+
padding: 0px;
|
|
126
|
+
color: #5C5C5C;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.dp-highlighter.nogutter ol,
|
|
130
|
+
.dp-highlighter.nogutter ol li {
|
|
131
|
+
list-style: none !important;
|
|
132
|
+
margin-left: 0px !important;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.dp-highlighter ol li,
|
|
136
|
+
.dp-highlighter .columns div {
|
|
137
|
+
list-style: decimal-leading-zero; /* better look for others, override cascade from OL */
|
|
138
|
+
list-style-position: outside !important;
|
|
139
|
+
border-left: 3px solid #6CE26C;
|
|
140
|
+
background-color: #F8F8F8;
|
|
141
|
+
color: #5C5C5C;
|
|
142
|
+
padding: 0 3px 0 10px !important;
|
|
143
|
+
margin: 0 !important;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.dp-highlighter.nogutter ol li,
|
|
147
|
+
.dp-highlighter.nogutter .columns div {
|
|
148
|
+
border: 0;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.dp-highlighter .columns {
|
|
152
|
+
background-color: #F8F8F8;
|
|
153
|
+
color: gray;
|
|
154
|
+
overflow: hidden;
|
|
155
|
+
width: 100%;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.dp-highlighter .columns div {
|
|
159
|
+
padding-bottom: 5px;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.dp-highlighter ol li.alt {
|
|
163
|
+
background-color: #FFF;
|
|
164
|
+
color: inherit;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.dp-highlighter ol li span {
|
|
168
|
+
color: black;
|
|
169
|
+
background-color: inherit;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/* Adjust some properties when collapsed */
|
|
173
|
+
|
|
174
|
+
.dp-highlighter.collapsed ol {
|
|
175
|
+
margin: 0px;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.dp-highlighter.collapsed ol li {
|
|
179
|
+
display: none;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/* Additional modifications when in print-view */
|
|
183
|
+
|
|
184
|
+
.dp-highlighter.printing {
|
|
185
|
+
border: none;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.dp-highlighter.printing .tools {
|
|
189
|
+
display: none !important;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.dp-highlighter.printing li {
|
|
193
|
+
display: list-item !important;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
/* Styles for the tools */
|
|
197
|
+
|
|
198
|
+
.dp-highlighter .tools {
|
|
199
|
+
padding: 3px 8px 3px 10px;
|
|
200
|
+
font: 9px Verdana, Geneva, Arial, Helvetica, sans-serif;
|
|
201
|
+
color: silver;
|
|
202
|
+
background-color: #f8f8f8;
|
|
203
|
+
padding-bottom: 10px;
|
|
204
|
+
border-left: 3px solid #6CE26C;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.dp-highlighter.nogutter .tools {
|
|
208
|
+
border-left: 0;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.dp-highlighter.collapsed .tools {
|
|
212
|
+
border-bottom: 0;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.dp-highlighter .tools a {
|
|
216
|
+
font-size: 9px;
|
|
217
|
+
color: #a0a0a0;
|
|
218
|
+
background-color: inherit;
|
|
219
|
+
text-decoration: none;
|
|
220
|
+
margin-right: 10px;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.dp-highlighter .tools a:hover {
|
|
224
|
+
color: red;
|
|
225
|
+
background-color: inherit;
|
|
226
|
+
text-decoration: underline;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/* About dialog styles */
|
|
230
|
+
|
|
231
|
+
.dp-about {
|
|
232
|
+
background-color: #fff;
|
|
233
|
+
color: #333;
|
|
234
|
+
margin: 0px;
|
|
235
|
+
padding: 0px;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.dp-about table {
|
|
239
|
+
width: 100%;
|
|
240
|
+
height: 100%;
|
|
241
|
+
font-size: 11px;
|
|
242
|
+
font-family: Tahoma, Verdana, Arial, sans-serif !important;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
.dp-about td {
|
|
246
|
+
padding: 10px;
|
|
247
|
+
vertical-align: top;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.dp-about .copy {
|
|
251
|
+
border-bottom: 1px solid #ACA899;
|
|
252
|
+
height: 95%;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
.dp-about .title {
|
|
256
|
+
color: red;
|
|
257
|
+
background-color: inherit;
|
|
258
|
+
font-weight: bold;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
.dp-about .para {
|
|
262
|
+
margin: 0 0 4px 0;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.dp-about .footer {
|
|
266
|
+
background-color: #ECEADB;
|
|
267
|
+
color: #333;
|
|
268
|
+
border-top: 1px solid #fff;
|
|
269
|
+
text-align: right;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
.dp-about .close {
|
|
273
|
+
font-size: 11px;
|
|
274
|
+
font-family: Tahoma, Verdana, Arial, sans-serif !important;
|
|
275
|
+
background-color: #ECEADB;
|
|
276
|
+
color: #333;
|
|
277
|
+
width: 60px;
|
|
278
|
+
height: 22px;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
/* Language specific styles */
|
|
282
|
+
|
|
283
|
+
.dp-highlighter .comment, .dp-highlighter .comments {
|
|
284
|
+
color: #008200;
|
|
285
|
+
background-color: inherit;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
.dp-highlighter .string {
|
|
289
|
+
color: blue;
|
|
290
|
+
background-color: inherit;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
.dp-highlighter .keyword {
|
|
294
|
+
color: #069;
|
|
295
|
+
font-weight: bold;
|
|
296
|
+
background-color: inherit;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
.dp-highlighter .preprocessor {
|
|
300
|
+
color: gray;
|
|
301
|
+
background-color: inherit;
|
|
302
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export {
|
|
2
|
+
auditAccessibility,
|
|
3
|
+
auditLinks,
|
|
4
|
+
repairAccessibilityIssue,
|
|
5
|
+
createStructuredContent,
|
|
6
|
+
createStructuredDocument,
|
|
7
|
+
fromMarkdown,
|
|
8
|
+
getDocumentPageSetup,
|
|
9
|
+
getDocumentMetrics,
|
|
10
|
+
getDocumentOutline,
|
|
11
|
+
getFootnotes,
|
|
12
|
+
getTableOfContents,
|
|
13
|
+
getTextStatistics,
|
|
14
|
+
parseStructuredContentHtml,
|
|
15
|
+
renderHTML,
|
|
16
|
+
serializeStructuredContent,
|
|
17
|
+
setDocumentPageSetup,
|
|
18
|
+
syncTableOfContents,
|
|
19
|
+
toMarkdown,
|
|
20
|
+
validateStructuredContent
|
|
21
|
+
} from "../integrations/shared";
|
package/server/index.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
var shared = require("../integrations/shared");
|
|
2
|
+
|
|
3
|
+
module.exports = {
|
|
4
|
+
auditAccessibility: shared.auditAccessibility,
|
|
5
|
+
auditLinks: shared.auditLinks,
|
|
6
|
+
repairAccessibilityIssue: shared.repairAccessibilityIssue,
|
|
7
|
+
createStructuredDocument: shared.createStructuredDocument,
|
|
8
|
+
createStructuredContent: shared.createStructuredContent,
|
|
9
|
+
fromMarkdown: shared.fromMarkdown,
|
|
10
|
+
getDocumentPageSetup: shared.getDocumentPageSetup,
|
|
11
|
+
getDocumentMetrics: shared.getDocumentMetrics,
|
|
12
|
+
getDocumentOutline: shared.getDocumentOutline,
|
|
13
|
+
getFootnotes: shared.getFootnotes,
|
|
14
|
+
getTableOfContents: shared.getTableOfContents,
|
|
15
|
+
getTextStatistics: shared.getTextStatistics,
|
|
16
|
+
parseStructuredContentHtml: shared.parseStructuredContentHtml,
|
|
17
|
+
renderHTML: shared.renderHTML,
|
|
18
|
+
serializeStructuredContent: shared.serializeStructuredContent,
|
|
19
|
+
setDocumentPageSetup: shared.setDocumentPageSetup,
|
|
20
|
+
syncTableOfContents: shared.syncTableOfContents,
|
|
21
|
+
toMarkdown: shared.toMarkdown,
|
|
22
|
+
validateStructuredContent: shared.validateStructuredContent
|
|
23
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// Type definitions for richtexteditor/svelte
|
|
2
|
+
import type { HeadlessController, HeadlessEditorOptions, HeadlessState } from "../headless";
|
|
3
|
+
|
|
4
|
+
export interface SvelteEditorOptions extends HeadlessEditorOptions {
|
|
5
|
+
onReady?: (editor: HeadlessController) => void;
|
|
6
|
+
onUpdate?: (state: HeadlessState) => void;
|
|
7
|
+
onChange?: (...args: any[]) => void;
|
|
8
|
+
onError?: (error: unknown) => void;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface SvelteActionReturn {
|
|
12
|
+
update(options: SvelteEditorOptions): void;
|
|
13
|
+
destroy(): void;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/** Svelte action: <div use:richTextEditor={{ value, onReady, onUpdate }} /> */
|
|
17
|
+
export function richTextEditor(node: HTMLElement, options?: SvelteEditorOptions): SvelteActionReturn;
|
|
18
|
+
|
|
19
|
+
export { createHeadlessEditor } from "../headless";
|
package/svelte/index.js
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* richtexteditor/svelte
|
|
3
|
+
* ------------------------------------------------------------------
|
|
4
|
+
* A Svelte action that mounts a chrome-less (headless) editor on a node and
|
|
5
|
+
* hands you the controller. Works with Svelte 3 / 4 / 5 (it is a plain action,
|
|
6
|
+
* no compiler coupling).
|
|
7
|
+
*
|
|
8
|
+
* <script>
|
|
9
|
+
* import { richTextEditor } from "@richscripts/richtexteditor/svelte";
|
|
10
|
+
* let editor; // the controller, once ready
|
|
11
|
+
* let state = {};
|
|
12
|
+
* </script>
|
|
13
|
+
*
|
|
14
|
+
* <button on:mousedown|preventDefault={() => editor.run("bold")}
|
|
15
|
+
* class:is-active={state.bold}>B</button>
|
|
16
|
+
*
|
|
17
|
+
* <div use:richTextEditor={{
|
|
18
|
+
* value: "<p>Hello</p>",
|
|
19
|
+
* onReady: (e) => (editor = e),
|
|
20
|
+
* onUpdate: (s) => (state = s)
|
|
21
|
+
* }}></div>
|
|
22
|
+
*/
|
|
23
|
+
var headless = require("../headless");
|
|
24
|
+
|
|
25
|
+
function richTextEditor(node, options) {
|
|
26
|
+
options = options || {};
|
|
27
|
+
var controller = null;
|
|
28
|
+
var current = options;
|
|
29
|
+
|
|
30
|
+
headless.createHeadlessEditor(node, options)
|
|
31
|
+
.then(function (ctl) {
|
|
32
|
+
controller = ctl;
|
|
33
|
+
if (current.onUpdate) { ctl.on("update", current.onUpdate); }
|
|
34
|
+
if (current.onChange) { ctl.on("change", current.onChange); }
|
|
35
|
+
if (current.onReady) { current.onReady(ctl); }
|
|
36
|
+
})
|
|
37
|
+
.catch(function (error) {
|
|
38
|
+
if (current.onError) { current.onError(error); }
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
return {
|
|
42
|
+
update: function (next) {
|
|
43
|
+
current = next || {};
|
|
44
|
+
// keep content in sync if the bound value changes
|
|
45
|
+
if (controller && next && next.value != null && next.value !== controller.getHTML()) {
|
|
46
|
+
controller.setHTML(next.value);
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
destroy: function () {
|
|
50
|
+
if (controller) { controller.destroy(); }
|
|
51
|
+
controller = null;
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
module.exports = {
|
|
57
|
+
richTextEditor: richTextEditor,
|
|
58
|
+
createHeadlessEditor: headless.createHeadlessEditor
|
|
59
|
+
};
|
package/vue/index.d.ts
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import type { DefineComponent } from "vue";
|
|
2
|
+
import type {
|
|
3
|
+
RichTextEditorAccessibilityResult,
|
|
4
|
+
RichTextEditorAiToolkit,
|
|
5
|
+
RichTextEditorCollab,
|
|
6
|
+
RichTextEditorComments,
|
|
7
|
+
RichTextEditorDictation,
|
|
8
|
+
RichTextEditorDocumentMetrics,
|
|
9
|
+
RichTextEditorDocumentOutlineItem,
|
|
10
|
+
RichTextEditorFootnoteItem,
|
|
11
|
+
RichTextEditorInstance,
|
|
12
|
+
RichTextEditorLinkAuditOptions,
|
|
13
|
+
RichTextEditorLinkAuditResult,
|
|
14
|
+
RichTextEditorMentions,
|
|
15
|
+
RichTextEditorPageSetup,
|
|
16
|
+
RichTextEditorReviewLedger,
|
|
17
|
+
RichTextEditorRevisionHistory,
|
|
18
|
+
RichTextEditorSlashCommands,
|
|
19
|
+
RichTextEditorStructuredDocument,
|
|
20
|
+
RichTextEditorStructuredInput,
|
|
21
|
+
RichTextEditorTableOfContentsItem,
|
|
22
|
+
RichTextEditorTableOfContentsOptions,
|
|
23
|
+
RichTextEditorTextStatistics,
|
|
24
|
+
RichTextEditorValueFormat
|
|
25
|
+
} from "../index";
|
|
26
|
+
|
|
27
|
+
export interface RichTextEditorVueProps {
|
|
28
|
+
assetBasePath?: string;
|
|
29
|
+
autoload?: boolean;
|
|
30
|
+
config?: Record<string, unknown>;
|
|
31
|
+
defaultValue?: RichTextEditorStructuredInput;
|
|
32
|
+
modelValue?: RichTextEditorStructuredInput;
|
|
33
|
+
tagName?: string;
|
|
34
|
+
valueFormat?: RichTextEditorValueFormat;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface RichTextEditorVueExposed {
|
|
38
|
+
focus(): void;
|
|
39
|
+
getEditor(): RichTextEditorInstance | null;
|
|
40
|
+
getHTMLCode(): string;
|
|
41
|
+
getJSON(): RichTextEditorStructuredDocument | null;
|
|
42
|
+
setHTMLCode(value: string): void;
|
|
43
|
+
setJSON(value: RichTextEditorStructuredInput): void;
|
|
44
|
+
getTextStatistics(): RichTextEditorTextStatistics | null;
|
|
45
|
+
getSelectionStatistics(): RichTextEditorTextStatistics | null;
|
|
46
|
+
getDocumentMetrics(): RichTextEditorDocumentMetrics | null;
|
|
47
|
+
getDocumentPageSetup(): RichTextEditorPageSetup | null;
|
|
48
|
+
setDocumentPageSetup(pageSetup: RichTextEditorPageSetup | null): RichTextEditorInstance | null;
|
|
49
|
+
getDocumentOutline(): RichTextEditorDocumentOutlineItem[];
|
|
50
|
+
getFootnotes(): RichTextEditorFootnoteItem[];
|
|
51
|
+
getTableOfContents(options?: RichTextEditorTableOfContentsOptions): RichTextEditorTableOfContentsItem[];
|
|
52
|
+
syncTableOfContents(options?: RichTextEditorTableOfContentsOptions): RichTextEditorStructuredDocument | null;
|
|
53
|
+
auditAccessibility(): RichTextEditorAccessibilityResult | null;
|
|
54
|
+
auditLinks(options?: RichTextEditorLinkAuditOptions): RichTextEditorLinkAuditResult | null;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Convenience accessors that forward to the underlying RichTextEditor
|
|
58
|
+
* instance's v2.0 plugin namespaces. Each returns `null` when the editor
|
|
59
|
+
* is not yet initialised, and `undefined` when the corresponding plugin
|
|
60
|
+
* is not loaded for this build.
|
|
61
|
+
*/
|
|
62
|
+
getAiToolkit(): RichTextEditorAiToolkit | null | undefined;
|
|
63
|
+
getDictation(): RichTextEditorDictation | null | undefined;
|
|
64
|
+
getRevisionHistory(): RichTextEditorRevisionHistory | null | undefined;
|
|
65
|
+
getCollab(): RichTextEditorCollab | null | undefined;
|
|
66
|
+
getSlashCommands(): RichTextEditorSlashCommands | null | undefined;
|
|
67
|
+
getMentions(): RichTextEditorMentions | null | undefined;
|
|
68
|
+
getComments(): RichTextEditorComments | null | undefined;
|
|
69
|
+
getReviewLedger(): RichTextEditorReviewLedger | null | undefined;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export const RichTextEditorVue: DefineComponent<RichTextEditorVueProps, {}, unknown>;
|
|
73
|
+
|
|
74
|
+
export const RichTextEditor: typeof RichTextEditorVue;
|
|
75
|
+
|
|
76
|
+
export {
|
|
77
|
+
auditAccessibility,
|
|
78
|
+
auditLinks,
|
|
79
|
+
createStructuredContent,
|
|
80
|
+
createStructuredDocument,
|
|
81
|
+
fromMarkdown,
|
|
82
|
+
getDocumentPageSetup,
|
|
83
|
+
getDocumentMetrics,
|
|
84
|
+
getDocumentOutline,
|
|
85
|
+
getFootnotes,
|
|
86
|
+
getTableOfContents,
|
|
87
|
+
getTextStatistics,
|
|
88
|
+
loadRichTextEditorAssets,
|
|
89
|
+
renderHTML,
|
|
90
|
+
setDocumentPageSetup,
|
|
91
|
+
syncTableOfContents,
|
|
92
|
+
toMarkdown,
|
|
93
|
+
validateStructuredContent
|
|
94
|
+
} from "../integrations/shared";
|