@novaprose/core 0.1.0 → 0.3.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/advlist-DEJUHLI6.js +107 -0
- package/dist/advlist-DEJUHLI6.js.map +1 -0
- package/dist/autolink-ZVHNOOS7.js +89 -0
- package/dist/autolink-ZVHNOOS7.js.map +1 -0
- package/dist/autoresize-WT4ONZKK.js +26 -0
- package/dist/autoresize-WT4ONZKK.js.map +1 -0
- package/dist/autosave-2KI5WGV5.js +99 -0
- package/dist/autosave-2KI5WGV5.js.map +1 -0
- package/dist/charmap-3LM5LZCC.js +197 -0
- package/dist/charmap-3LM5LZCC.js.map +1 -0
- package/dist/chunk-6RJENZXT.js +104 -0
- package/dist/chunk-6RJENZXT.js.map +1 -0
- package/dist/chunk-BGG3UVGZ.js +5044 -0
- package/dist/chunk-BGG3UVGZ.js.map +1 -0
- package/dist/{chunk-ZF2JR3JH.js → chunk-F6TSOU5U.js} +1 -1
- package/dist/chunk-F6TSOU5U.js.map +1 -0
- package/dist/chunk-GHEFKKRC.js +268 -0
- package/dist/chunk-GHEFKKRC.js.map +1 -0
- package/dist/chunk-HZRIBOPW.js +52 -0
- package/dist/chunk-HZRIBOPW.js.map +1 -0
- package/dist/{chunk-TKR3C5IJ.js → chunk-PHRON5PL.js} +300 -681
- package/dist/chunk-PHRON5PL.js.map +1 -0
- package/dist/chunk-YZPJQB3I.js +490 -0
- package/dist/chunk-YZPJQB3I.js.map +1 -0
- package/dist/chunk-Z3ELZ77W.js +102 -0
- package/dist/chunk-Z3ELZ77W.js.map +1 -0
- package/dist/comments-panel-FYJE3U64.js +464 -0
- package/dist/comments-panel-FYJE3U64.js.map +1 -0
- package/dist/directionality-MTLAIFIQ.js +70 -0
- package/dist/directionality-MTLAIFIQ.js.map +1 -0
- package/dist/emoticons-YVGVA76P.js +216 -0
- package/dist/emoticons-YVGVA76P.js.map +1 -0
- package/dist/index.cjs +7545 -3199
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +470 -14
- package/dist/index.d.ts +470 -14
- package/dist/index.js +853 -4052
- package/dist/index.js.map +1 -1
- package/dist/{insertdatetime-C4MAC5L7.js → insertdatetime-QYWZUYO4.js} +2 -2
- package/dist/nonbreaking-SIACL5V6.js +46 -0
- package/dist/nonbreaking-SIACL5V6.js.map +1 -0
- package/dist/{quickbars-XK4QCQ6F.js → quickbars-TYJG6WTF.js} +7 -5
- package/dist/quickbars-TYJG6WTF.js.map +1 -0
- package/dist/revisionhistory-ZCRBPP33.js +457 -0
- package/dist/revisionhistory-ZCRBPP33.js.map +1 -0
- package/dist/visualblocks-WB6NAEGB.js +43 -0
- package/dist/visualblocks-WB6NAEGB.js.map +1 -0
- package/package.json +5 -2
- package/src/style.css +645 -0
- package/dist/chunk-TKR3C5IJ.js.map +0 -1
- package/dist/chunk-ZF2JR3JH.js.map +0 -1
- package/dist/quickbars-XK4QCQ6F.js.map +0 -1
- /package/dist/{insertdatetime-C4MAC5L7.js.map → insertdatetime-QYWZUYO4.js.map} +0 -0
package/dist/index.d.cts
CHANGED
|
@@ -1,10 +1,280 @@
|
|
|
1
|
+
import * as prosemirror_model from 'prosemirror-model';
|
|
2
|
+
import { Node, Schema, NodeSpec, DOMOutputSpec, MarkSpec, MarkType, NodeType, Fragment, DOMParser } from 'prosemirror-model';
|
|
1
3
|
import { Command, EditorState, Plugin } from 'prosemirror-state';
|
|
2
4
|
import { EditorView } from 'prosemirror-view';
|
|
3
|
-
import * as prosemirror_model from 'prosemirror-model';
|
|
4
|
-
import { DOMOutputSpec, NodeSpec, Schema, MarkType, NodeType, Node, Fragment } from 'prosemirror-model';
|
|
5
5
|
import { addRowBefore, addRowAfter, deleteRow, addColumnBefore, addColumnAfter, deleteColumn, mergeCells, splitCell, deleteTable } from 'prosemirror-tables';
|
|
6
6
|
export { isInTable } from 'prosemirror-tables';
|
|
7
7
|
|
|
8
|
+
/**
|
|
9
|
+
* Плагин autosave: черновик в localStorage браузера, чтобы текст не пропал при закрытой вкладке,
|
|
10
|
+
* перезагрузке или сбое. Если при открытии найден черновик, отличный от текущего содержимого,
|
|
11
|
+
* появляется уведомление, а кнопка «Восстановить черновик» (restoredraft) становится активной.
|
|
12
|
+
*
|
|
13
|
+
* `plugins: ['autosave']`, настройки — `pluginOptions.autosave`:
|
|
14
|
+
* - key — ключ хранилища (по умолчанию адрес страницы + id элемента);
|
|
15
|
+
* - delay — задержка сохранения после изменения, мс (1000);
|
|
16
|
+
* - retention — сколько хранить черновик, минут (7 дней).
|
|
17
|
+
*/
|
|
18
|
+
interface AutosaveOptions {
|
|
19
|
+
key?: string;
|
|
20
|
+
delay?: number;
|
|
21
|
+
retention?: number;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Комментарии к тексту: модель данных и хранилище.
|
|
26
|
+
*
|
|
27
|
+
* Текст документа хранит только якорь — марку `<span data-comment="id">` вокруг обсуждаемого фрагмента.
|
|
28
|
+
* Сами обсуждения (ветки) лежат в хранилище: по умолчанию в памяти (сохраняйте их через `onChange`
|
|
29
|
+
* рядом с HTML), при совместном редактировании — в общем Y.Doc (`collabSession.commentStore()`),
|
|
30
|
+
* или в вашем собственном хранилище с тем же интерфейсом.
|
|
31
|
+
*/
|
|
32
|
+
interface CommentAuthor {
|
|
33
|
+
id: string;
|
|
34
|
+
name: string;
|
|
35
|
+
}
|
|
36
|
+
interface Comment {
|
|
37
|
+
id: string;
|
|
38
|
+
author: CommentAuthor;
|
|
39
|
+
text: string;
|
|
40
|
+
/** Время создания, мс с 1970 (Date.now()). */
|
|
41
|
+
createdAt: number;
|
|
42
|
+
editedAt?: number;
|
|
43
|
+
/** Упомянутые через «@» (в тексте — «@Имя»): кого уведомить. */
|
|
44
|
+
mentions?: CommentAuthor[];
|
|
45
|
+
}
|
|
46
|
+
interface CommentThread {
|
|
47
|
+
/** Совпадает с data-comment у фрагмента текста. */
|
|
48
|
+
id: string;
|
|
49
|
+
createdAt: number;
|
|
50
|
+
/** Первый комментарий — суть обсуждения, остальные — ответы. */
|
|
51
|
+
comments: Comment[];
|
|
52
|
+
/** Ветка решена: подсветка в тексте скрывается, обсуждение остаётся в истории. */
|
|
53
|
+
resolved?: {
|
|
54
|
+
by: CommentAuthor;
|
|
55
|
+
at: number;
|
|
56
|
+
} | null;
|
|
57
|
+
}
|
|
58
|
+
/** Хранилище веток. Методы синхронные: интерфейс обновляется сразу, сохранение — на вашей стороне. */
|
|
59
|
+
interface CommentStore {
|
|
60
|
+
/** Снимок всех веток (новый массив после каждого изменения). */
|
|
61
|
+
threads(): readonly CommentThread[];
|
|
62
|
+
/** Подписка на любые изменения (в том числе пришедшие от других участников). Возвращает отписку. */
|
|
63
|
+
subscribe(listener: () => void): () => void;
|
|
64
|
+
createThread(thread: CommentThread): void;
|
|
65
|
+
reply(threadId: string, comment: Comment): void;
|
|
66
|
+
editComment(threadId: string, commentId: string, text: string): void;
|
|
67
|
+
deleteComment(threadId: string, commentId: string): void;
|
|
68
|
+
setResolved(threadId: string, resolved: CommentThread['resolved']): void;
|
|
69
|
+
deleteThread(threadId: string): void;
|
|
70
|
+
}
|
|
71
|
+
declare function newCommentId(prefix?: string): string;
|
|
72
|
+
/** Привести данные из внешнего источника (JSON, сеть) к безопасному виду; негодное — отбросить. */
|
|
73
|
+
declare function sanitizeThread(value: unknown): CommentThread | null;
|
|
74
|
+
/**
|
|
75
|
+
* Хранилище в памяти. `initial` — ветки, сохранённые раньше (из вашего бэкенда), `onChange` — сохранить.
|
|
76
|
+
*
|
|
77
|
+
* ```ts
|
|
78
|
+
* const store = createCommentStore(saved.threads, (threads) => api.saveComments(postId, threads));
|
|
79
|
+
* ```
|
|
80
|
+
*/
|
|
81
|
+
declare function createCommentStore(initial?: readonly unknown[], onChange?: (threads: readonly CommentThread[]) => void): CommentStore;
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Плагин mentions: «@» в тексте → список людей → упоминание `<span data-mention="id">@Имя</span>`.
|
|
85
|
+
* `plugins: ['mentions']`, список людей — `pluginOptions.mentions.fetch` (обычно поиск в вашем API).
|
|
86
|
+
* Тот же источник используют комментарии: «@» в поле комментария.
|
|
87
|
+
*/
|
|
88
|
+
interface MentionUser {
|
|
89
|
+
id: string;
|
|
90
|
+
name: string;
|
|
91
|
+
/** Вторая строка в списке: должность, e-mail. */
|
|
92
|
+
description?: string;
|
|
93
|
+
}
|
|
94
|
+
interface MentionsOptions {
|
|
95
|
+
/** Поиск людей по началу имени (запрос без «@»). Может вернуть Promise. */
|
|
96
|
+
fetch: (query: string) => MentionUser[] | Promise<MentionUser[]>;
|
|
97
|
+
/** Человека упомянули в тексте (для уведомлений — или соберите их при сохранении: getMentions). */
|
|
98
|
+
onMention?: (user: MentionUser, editor: Editor) => void;
|
|
99
|
+
/** Сколько показывать в списке (по умолчанию 8). */
|
|
100
|
+
maxResults?: number;
|
|
101
|
+
}
|
|
102
|
+
/** id пользователя: UUID, числа, e-mail, логины — без пробелов, кавычек и угловых скобок. */
|
|
103
|
+
declare const MENTION_ID_RE: RegExp;
|
|
104
|
+
/** Кто упомянут в документе (без повторов, в порядке появления) — например, чтобы уведомить. */
|
|
105
|
+
declare function getMentions(editorOrDoc: Editor | Node): MentionUser[];
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Плагин comments: обсуждения фрагментов текста (как комментарии в Google Docs / Word).
|
|
109
|
+
* `plugins: ['comments']`, настройки — `pluginOptions.comments` ({@link CommentsOptions}).
|
|
110
|
+
* Кнопки (имена TinyMCE): `addcomment`, `showcomments`. Ctrl+Alt+M — комментировать выделение.
|
|
111
|
+
*
|
|
112
|
+
* Марка в схеме — поэтому плагин подключается сразу; панель обсуждений грузится лениво при открытии.
|
|
113
|
+
*/
|
|
114
|
+
interface CommentsOptions {
|
|
115
|
+
/** Кто комментирует. По умолчанию — «Гость». */
|
|
116
|
+
author?: CommentAuthor;
|
|
117
|
+
/** Хранилище веток. По умолчанию — в памяти, с `threads` и `onChange`. */
|
|
118
|
+
store?: CommentStore;
|
|
119
|
+
/** Сохранённые ранее ветки (для хранилища по умолчанию). */
|
|
120
|
+
threads?: readonly CommentThread[];
|
|
121
|
+
/** Ветки изменились — сохраните их (для хранилища по умолчанию). */
|
|
122
|
+
onChange?: (threads: readonly CommentThread[]) => void;
|
|
123
|
+
/** Можно ли менять и удалять комментарий. По умолчанию — только автору. */
|
|
124
|
+
canEdit?: (comment: Comment, author: CommentAuthor) => boolean;
|
|
125
|
+
/**
|
|
126
|
+
* Поиск людей для «@» в комментариях. По умолчанию — `pluginOptions.mentions.fetch` (плагин mentions).
|
|
127
|
+
*/
|
|
128
|
+
mentions?: MentionsOptions['fetch'];
|
|
129
|
+
/** В новом комментарии кого-то упомянули — отправьте уведомление. */
|
|
130
|
+
onMention?: (event: {
|
|
131
|
+
threadId: string;
|
|
132
|
+
comment: Comment;
|
|
133
|
+
users: CommentAuthor[];
|
|
134
|
+
}) => void;
|
|
135
|
+
}
|
|
136
|
+
declare const LABELS: {
|
|
137
|
+
en: {
|
|
138
|
+
add: string;
|
|
139
|
+
show: string;
|
|
140
|
+
panel: string;
|
|
141
|
+
guest: string;
|
|
142
|
+
newComment: string;
|
|
143
|
+
placeholder: string;
|
|
144
|
+
replyPlaceholder: string;
|
|
145
|
+
comment: string;
|
|
146
|
+
reply: string;
|
|
147
|
+
cancel: string;
|
|
148
|
+
save: string;
|
|
149
|
+
edit: string;
|
|
150
|
+
remove: string;
|
|
151
|
+
resolve: string;
|
|
152
|
+
reopen: string;
|
|
153
|
+
deleteThread: string;
|
|
154
|
+
close: string;
|
|
155
|
+
showResolved: string;
|
|
156
|
+
resolvedBy: string;
|
|
157
|
+
orphan: string;
|
|
158
|
+
empty: string;
|
|
159
|
+
people: string;
|
|
160
|
+
noPeople: string;
|
|
161
|
+
edited: string;
|
|
162
|
+
you: string;
|
|
163
|
+
count: string;
|
|
164
|
+
};
|
|
165
|
+
ru: {
|
|
166
|
+
add: string;
|
|
167
|
+
show: string;
|
|
168
|
+
panel: string;
|
|
169
|
+
guest: string;
|
|
170
|
+
newComment: string;
|
|
171
|
+
placeholder: string;
|
|
172
|
+
replyPlaceholder: string;
|
|
173
|
+
comment: string;
|
|
174
|
+
reply: string;
|
|
175
|
+
cancel: string;
|
|
176
|
+
save: string;
|
|
177
|
+
edit: string;
|
|
178
|
+
remove: string;
|
|
179
|
+
resolve: string;
|
|
180
|
+
reopen: string;
|
|
181
|
+
deleteThread: string;
|
|
182
|
+
close: string;
|
|
183
|
+
showResolved: string;
|
|
184
|
+
resolvedBy: string;
|
|
185
|
+
orphan: string;
|
|
186
|
+
empty: string;
|
|
187
|
+
people: string;
|
|
188
|
+
noPeople: string;
|
|
189
|
+
edited: string;
|
|
190
|
+
you: string;
|
|
191
|
+
count: string;
|
|
192
|
+
};
|
|
193
|
+
};
|
|
194
|
+
type CommentsLabels = typeof LABELS.en;
|
|
195
|
+
interface PluginState {
|
|
196
|
+
/** Выделение, к которому пишется новый комментарий (ещё не сохранён — без марки в тексте). */
|
|
197
|
+
pending: {
|
|
198
|
+
from: number;
|
|
199
|
+
to: number;
|
|
200
|
+
} | null;
|
|
201
|
+
active: string | null;
|
|
202
|
+
}
|
|
203
|
+
/** Управление комментариями редактора — общий объект для плагина и ленивой панели. */
|
|
204
|
+
interface CommentsController {
|
|
205
|
+
readonly editor: Editor;
|
|
206
|
+
readonly store: CommentStore;
|
|
207
|
+
readonly author: CommentAuthor;
|
|
208
|
+
readonly labels: CommentsLabels;
|
|
209
|
+
readonly shortcut: string;
|
|
210
|
+
pending(): PluginState['pending'];
|
|
211
|
+
active(): string | null;
|
|
212
|
+
setActive(id: string | null, scroll?: boolean): void;
|
|
213
|
+
/** Начать комментарий к выделению: подсветить его и открыть панель с полем ввода. */
|
|
214
|
+
startComment(): boolean;
|
|
215
|
+
cancelPending(): void;
|
|
216
|
+
/** Сохранить новый комментарий к отложенному выделению. Возвращает id ветки. */
|
|
217
|
+
submitPending(text: string, mentions?: CommentAuthor[]): string | null;
|
|
218
|
+
reply(threadId: string, text: string, mentions?: CommentAuthor[]): void;
|
|
219
|
+
/** Поиск людей для «@» (null — источник не настроен, упоминания в комментариях выключены). */
|
|
220
|
+
findUsers: ((query: string) => Promise<MentionUser[]>) | null;
|
|
221
|
+
/** Фрагменты текста ветки (пусто — текст удалён). */
|
|
222
|
+
ranges(id: string): {
|
|
223
|
+
from: number;
|
|
224
|
+
to: number;
|
|
225
|
+
}[];
|
|
226
|
+
quote(id: string): string;
|
|
227
|
+
/** Порядок веток по месту в документе. */
|
|
228
|
+
positionOf(id: string): number;
|
|
229
|
+
deleteThread(id: string): void;
|
|
230
|
+
setResolved(id: string, resolved: boolean): void;
|
|
231
|
+
canEdit(comment: Comment): boolean;
|
|
232
|
+
isPanelOpen(): boolean;
|
|
233
|
+
openPanel(): Promise<void>;
|
|
234
|
+
closePanel(): void;
|
|
235
|
+
}
|
|
236
|
+
/** Контроллер комментариев редактора (если подключён плагин comments). */
|
|
237
|
+
declare function getComments(editor: Editor): CommentsController | undefined;
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* Quickbars: панели «по месту», как одноимённый плагин TinyMCE.
|
|
241
|
+
* - над выделенным текстом — быстрое форматирование;
|
|
242
|
+
* - на пустой строке — быстрая вставка (картинка, таблица).
|
|
243
|
+
*
|
|
244
|
+
* Настройки (pluginOptions.quickbars), false — выключить панель:
|
|
245
|
+
* { selection: 'bold italic | quicklink h2 h3 blockquote', insert: 'quickimage quicktable' }
|
|
246
|
+
*/
|
|
247
|
+
interface QuickbarsOptions {
|
|
248
|
+
selection?: string | false;
|
|
249
|
+
insert?: string | false;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* Плагин revisionhistory (имя как у TinyMCE): история версий документа.
|
|
254
|
+
* Список версий, просмотр версии с подсветкой отличий от текущего текста, восстановление
|
|
255
|
+
* (обычная правка — отменяется Ctrl+Z). Откуда версии — решает приложение: `pluginOptions.revisionhistory`
|
|
256
|
+
* ({@link RevisionHistoryOptions}); при совместном редактировании — `sync.versions()` из @novaprose/collab.
|
|
257
|
+
*/
|
|
258
|
+
interface Revision {
|
|
259
|
+
id: string;
|
|
260
|
+
/** Время версии, мс с 1970. */
|
|
261
|
+
createdAt: number;
|
|
262
|
+
/** Кто менял документ в этой версии. */
|
|
263
|
+
authors?: string[];
|
|
264
|
+
/** Имя версии («Отправлено юристам»), если её сохранили вручную. */
|
|
265
|
+
label?: string | null;
|
|
266
|
+
}
|
|
267
|
+
interface RevisionHistoryOptions {
|
|
268
|
+
/** Список версий (порядок не важен — показываем новые сверху). */
|
|
269
|
+
list: () => Promise<Revision[]>;
|
|
270
|
+
/** Содержимое версии: HTML или JSON документа. */
|
|
271
|
+
load: (revision: Revision, editor: Editor) => Promise<string | Record<string, unknown>>;
|
|
272
|
+
/** «Сохранить версию» (кнопка появляется, если задано). */
|
|
273
|
+
save?: (label?: string) => Promise<void>;
|
|
274
|
+
/** Версию восстановили (уже после замены содержимого). */
|
|
275
|
+
onRestore?: (revision: Revision) => void;
|
|
276
|
+
}
|
|
277
|
+
|
|
8
278
|
/**
|
|
9
279
|
* Базовая схема документа NovaProse (P0 из PRD §4.1–4.2).
|
|
10
280
|
* Каждый узел и марка описывают и парсинг HTML (parseDOM), и сериализацию (toDOM),
|
|
@@ -18,9 +288,11 @@ declare const cssValue: {
|
|
|
18
288
|
lineHeight: (v: unknown) => string | null;
|
|
19
289
|
fontFamily: (v: unknown) => string | null;
|
|
20
290
|
};
|
|
291
|
+
type TextDirection = 'ltr' | 'rtl';
|
|
21
292
|
interface BlockStyle {
|
|
22
293
|
align: TextAlign | null;
|
|
23
294
|
lineHeight: string | null;
|
|
295
|
+
dir: TextDirection | null;
|
|
24
296
|
}
|
|
25
297
|
type ImageAlign = 'left' | 'center' | 'right';
|
|
26
298
|
/** Размер картинки в px: целое 1…10000, иначе null ('300', '300px', 300). */
|
|
@@ -43,6 +315,9 @@ declare const nodes: {
|
|
|
43
315
|
lineHeight: {
|
|
44
316
|
default: null;
|
|
45
317
|
};
|
|
318
|
+
dir: {
|
|
319
|
+
default: null;
|
|
320
|
+
};
|
|
46
321
|
};
|
|
47
322
|
parseDOM: {
|
|
48
323
|
tag: string;
|
|
@@ -61,6 +336,9 @@ declare const nodes: {
|
|
|
61
336
|
lineHeight: {
|
|
62
337
|
default: null;
|
|
63
338
|
};
|
|
339
|
+
dir: {
|
|
340
|
+
default: null;
|
|
341
|
+
};
|
|
64
342
|
level: {
|
|
65
343
|
default: number;
|
|
66
344
|
};
|
|
@@ -70,6 +348,7 @@ declare const nodes: {
|
|
|
70
348
|
getAttrs: (dom: HTMLElement) => {
|
|
71
349
|
align: TextAlign | null;
|
|
72
350
|
lineHeight: string | null;
|
|
351
|
+
dir: TextDirection | null;
|
|
73
352
|
level: number;
|
|
74
353
|
};
|
|
75
354
|
}[];
|
|
@@ -114,10 +393,18 @@ declare const nodes: {
|
|
|
114
393
|
bullet_list: {
|
|
115
394
|
group: string;
|
|
116
395
|
content: string;
|
|
396
|
+
attrs: {
|
|
397
|
+
listStyle: {
|
|
398
|
+
default: null;
|
|
399
|
+
};
|
|
400
|
+
};
|
|
117
401
|
parseDOM: {
|
|
118
402
|
tag: string;
|
|
403
|
+
getAttrs: (dom: HTMLElement) => {
|
|
404
|
+
listStyle: string | null;
|
|
405
|
+
};
|
|
119
406
|
}[];
|
|
120
|
-
toDOM: () => DOMOutputSpec;
|
|
407
|
+
toDOM: (node: prosemirror_model.Node) => DOMOutputSpec;
|
|
121
408
|
};
|
|
122
409
|
ordered_list: {
|
|
123
410
|
group: string;
|
|
@@ -126,11 +413,15 @@ declare const nodes: {
|
|
|
126
413
|
start: {
|
|
127
414
|
default: number;
|
|
128
415
|
};
|
|
416
|
+
listStyle: {
|
|
417
|
+
default: null;
|
|
418
|
+
};
|
|
129
419
|
};
|
|
130
420
|
parseDOM: {
|
|
131
421
|
tag: string;
|
|
132
422
|
getAttrs: (dom: HTMLElement) => {
|
|
133
423
|
start: number;
|
|
424
|
+
listStyle: string | null;
|
|
134
425
|
};
|
|
135
426
|
}[];
|
|
136
427
|
toDOM: (node: prosemirror_model.Node) => DOMOutputSpec;
|
|
@@ -267,16 +558,24 @@ declare const marks: {
|
|
|
267
558
|
};
|
|
268
559
|
subscript: {
|
|
269
560
|
excludes: string;
|
|
270
|
-
parseDOM: {
|
|
561
|
+
parseDOM: ({
|
|
271
562
|
tag: string;
|
|
272
|
-
|
|
563
|
+
style?: undefined;
|
|
564
|
+
} | {
|
|
565
|
+
style: string;
|
|
566
|
+
tag?: undefined;
|
|
567
|
+
})[];
|
|
273
568
|
toDOM: () => DOMOutputSpec;
|
|
274
569
|
};
|
|
275
570
|
superscript: {
|
|
276
571
|
excludes: string;
|
|
277
|
-
parseDOM: {
|
|
572
|
+
parseDOM: ({
|
|
278
573
|
tag: string;
|
|
279
|
-
|
|
574
|
+
style?: undefined;
|
|
575
|
+
} | {
|
|
576
|
+
style: string;
|
|
577
|
+
tag?: undefined;
|
|
578
|
+
})[];
|
|
280
579
|
toDOM: () => DOMOutputSpec;
|
|
281
580
|
};
|
|
282
581
|
color: {
|
|
@@ -344,10 +643,66 @@ declare const marks: {
|
|
|
344
643
|
};
|
|
345
644
|
type NodeName = keyof typeof nodes;
|
|
346
645
|
type MarkName = keyof typeof marks;
|
|
347
|
-
|
|
646
|
+
/**
|
|
647
|
+
* Схема редактора: базовые узлы и марки + расширения плагинов. Тип оставляем «базовым»: встроенный
|
|
648
|
+
* код обращается только к своим узлам (`schema.nodes.paragraph`), а узлы плагинов доступны по имени.
|
|
649
|
+
*/
|
|
650
|
+
type NovaSchema = Schema<NodeName, MarkName>;
|
|
651
|
+
/** Базовая схема без расширений — у редакторов без плагинов-узлов она общая. */
|
|
652
|
+
declare const schema: NovaSchema;
|
|
653
|
+
interface SchemaExtensions {
|
|
654
|
+
nodes?: Record<string, NodeSpec>;
|
|
655
|
+
marks?: Record<string, MarkSpec>;
|
|
656
|
+
}
|
|
657
|
+
/**
|
|
658
|
+
* Схема с узлами и марками плагинов. Без расширений возвращает общую базовую схему.
|
|
659
|
+
* Новые узлы и марки добавляются в конец: базовые правила разбора HTML остаются в приоритете,
|
|
660
|
+
* если плагин не задал свой `priority` в parseDOM.
|
|
661
|
+
*/
|
|
662
|
+
declare function createSchema(extensions?: SchemaExtensions): NovaSchema;
|
|
348
663
|
|
|
349
664
|
/** Именованные команды редактора. Имена — часть публичного API (см. Editor.exec). */
|
|
350
665
|
type CommandName = 'bold' | 'italic' | 'underline' | 'strike' | 'code' | 'subscript' | 'superscript' | 'paragraph' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'blockquote' | 'codeBlock' | 'bulletList' | 'orderedList' | 'indent' | 'outdent' | 'alignLeft' | 'alignCenter' | 'alignRight' | 'alignJustify' | 'horizontalRule' | 'unlink' | 'clearFormatting' | 'undo' | 'redo';
|
|
666
|
+
/**
|
|
667
|
+
* Типы узлов и марок берём из схемы конкретного редактора (state.schema): у редакторов с плагинами
|
|
668
|
+
* она своя, и сравнение с типами общей базовой схемы дало бы ложь.
|
|
669
|
+
*/
|
|
670
|
+
declare const nodesOf: (state: EditorState) => {
|
|
671
|
+
readonly table: NodeType;
|
|
672
|
+
readonly table_row: NodeType;
|
|
673
|
+
readonly table_cell: NodeType;
|
|
674
|
+
readonly table_header: NodeType;
|
|
675
|
+
readonly doc: NodeType;
|
|
676
|
+
readonly paragraph: NodeType;
|
|
677
|
+
readonly heading: NodeType;
|
|
678
|
+
readonly blockquote: NodeType;
|
|
679
|
+
readonly horizontal_rule: NodeType;
|
|
680
|
+
readonly code_block: NodeType;
|
|
681
|
+
readonly bullet_list: NodeType;
|
|
682
|
+
readonly ordered_list: NodeType;
|
|
683
|
+
readonly list_item: NodeType;
|
|
684
|
+
readonly text: NodeType;
|
|
685
|
+
readonly image: NodeType;
|
|
686
|
+
readonly hard_break: NodeType;
|
|
687
|
+
} & {
|
|
688
|
+
readonly [key: string]: NodeType;
|
|
689
|
+
};
|
|
690
|
+
declare const marksOf: (state: EditorState) => {
|
|
691
|
+
readonly background: MarkType;
|
|
692
|
+
readonly code: MarkType;
|
|
693
|
+
readonly link: MarkType;
|
|
694
|
+
readonly bold: MarkType;
|
|
695
|
+
readonly italic: MarkType;
|
|
696
|
+
readonly underline: MarkType;
|
|
697
|
+
readonly strike: MarkType;
|
|
698
|
+
readonly subscript: MarkType;
|
|
699
|
+
readonly superscript: MarkType;
|
|
700
|
+
readonly color: MarkType;
|
|
701
|
+
readonly font_family: MarkType;
|
|
702
|
+
readonly font_size: MarkType;
|
|
703
|
+
} & {
|
|
704
|
+
readonly [key: string]: MarkType;
|
|
705
|
+
};
|
|
351
706
|
declare const commands: Record<CommandName, Command>;
|
|
352
707
|
/** Вставить или обновить ссылку на выделении. */
|
|
353
708
|
declare function setLink(href: string, attrs?: {
|
|
@@ -373,6 +728,7 @@ declare function getLinkAt(state: EditorState): {
|
|
|
373
728
|
/** Английские строки UI — язык по умолчанию и эталон набора ключей для остальных языков. */
|
|
374
729
|
declare const en: {
|
|
375
730
|
readonly 'toolbar.label': "Formatting";
|
|
731
|
+
readonly 'toolbar.options': "options";
|
|
376
732
|
readonly 'editor.label': "Rich text editor";
|
|
377
733
|
readonly 'editor.required': "Please fill in this field.";
|
|
378
734
|
readonly undo: "Undo";
|
|
@@ -513,6 +869,28 @@ declare const en: {
|
|
|
513
869
|
readonly 'table.colHeader': "Header column";
|
|
514
870
|
readonly 'table.cellBackground': "Cell background";
|
|
515
871
|
readonly 'table.delete': "Delete table";
|
|
872
|
+
readonly 'table.sort': "Sort";
|
|
873
|
+
readonly 'table.sortAsc': "Sort A → Z, 1 → 9";
|
|
874
|
+
readonly 'table.sortDesc': "Sort Z → A, 9 → 1";
|
|
875
|
+
readonly 'table.props': "Table properties";
|
|
876
|
+
readonly 'table.width': "Width";
|
|
877
|
+
readonly 'table.widthHint': "For example 100% or 600px. Leave empty to fit the content.";
|
|
878
|
+
readonly 'table.invalidWidth': "Enter a width such as 100% or 600px";
|
|
879
|
+
readonly 'table.align': "Alignment on the page";
|
|
880
|
+
readonly 'table.alignDefault': "Default";
|
|
881
|
+
readonly 'table.alignCenter': "Center";
|
|
882
|
+
readonly 'table.alignRight': "Right";
|
|
883
|
+
readonly 'table.cellProps': "Cell properties";
|
|
884
|
+
readonly 'table.valign': "Vertical alignment";
|
|
885
|
+
readonly 'table.valignTop': "Top";
|
|
886
|
+
readonly 'table.valignMiddle': "Middle";
|
|
887
|
+
readonly 'table.valignBottom': "Bottom";
|
|
888
|
+
readonly 'table.cellType': "Cell type";
|
|
889
|
+
readonly 'table.cellData': "Data cell";
|
|
890
|
+
readonly 'table.cellHeader': "Header cell";
|
|
891
|
+
readonly 'table.colWidth': "Column width, px";
|
|
892
|
+
readonly 'table.colWidthHint': "Leave empty to fit the content.";
|
|
893
|
+
readonly 'table.invalidColWidth': "Enter a number from 24 to 4000";
|
|
516
894
|
readonly 'slash.label': "Commands";
|
|
517
895
|
readonly 'slash.empty': "No matching commands";
|
|
518
896
|
};
|
|
@@ -554,6 +932,9 @@ declare function setImageWidthFraction(editor: Editor, fraction: number | null):
|
|
|
554
932
|
/** Диалог альтернативного текста — главный пункт доступности картинки. */
|
|
555
933
|
declare function openImageAltDialog(editor: Editor): void;
|
|
556
934
|
|
|
935
|
+
/** 'clean' (по умолчанию) — без шрифтов, кегля, интервалов и цветов «по умолчанию»; 'keep' — как есть. */
|
|
936
|
+
type PasteStyles = 'clean' | 'keep';
|
|
937
|
+
|
|
557
938
|
/**
|
|
558
939
|
* Обработка вставки:
|
|
559
940
|
* - режим «Вставить как текст» (переключатель pastetext) — любое содержимое вставляется без форматирования;
|
|
@@ -568,6 +949,12 @@ interface PasteOptions {
|
|
|
568
949
|
pastePostprocess?: (fragment: HTMLElement, editor: Editor) => void;
|
|
569
950
|
/** Включить режим «вставить как текст» сразу. */
|
|
570
951
|
pasteAsText?: boolean;
|
|
952
|
+
/**
|
|
953
|
+
* Оформление при вставке из Word, Google Docs, Excel и веб-страниц.
|
|
954
|
+
* 'clean' (по умолчанию) — сохраняются жирный, курсив, цвета, списки, таблицы, ссылки, но не шрифт,
|
|
955
|
+
* кегль и интервалы документа-источника; 'keep' — переносить и их.
|
|
956
|
+
*/
|
|
957
|
+
pasteStyles?: PasteStyles;
|
|
571
958
|
}
|
|
572
959
|
/** Превращает HTML в простой текст с сохранением абзацев (для режима «как текст»). */
|
|
573
960
|
declare function htmlToPlainText(html: string): string;
|
|
@@ -645,6 +1032,20 @@ interface NovaPlugin {
|
|
|
645
1032
|
toolbar?: string;
|
|
646
1033
|
/** ProseMirror-плагины (ввод, декорации, клавиши). */
|
|
647
1034
|
prosemirrorPlugins?: (editor: Editor) => Plugin[];
|
|
1035
|
+
/**
|
|
1036
|
+
* Новые узлы документа (с parseDOM и toDOM). Расширяют схему конкретного редактора.
|
|
1037
|
+
* Плагин с узлами или марками передаётся объектом, не ленивым загрузчиком: схема создаётся сразу.
|
|
1038
|
+
*/
|
|
1039
|
+
nodes?: Record<string, NodeSpec>;
|
|
1040
|
+
/** Новые марки (инлайн-форматирование) с parseDOM и toDOM. */
|
|
1041
|
+
marks?: Record<string, MarkSpec>;
|
|
1042
|
+
/**
|
|
1043
|
+
* Переопределение именованных команд (кнопки, меню, горячие клавиши и editor.exec берут их отсюда).
|
|
1044
|
+
* Например, совместное редактирование заменяет undo/redo своими — «отменить только свои правки».
|
|
1045
|
+
*/
|
|
1046
|
+
commands?: Partial<Record<CommandName, Command>>;
|
|
1047
|
+
/** Плагин ведёт свою историю изменений — встроенная (prosemirror-history) не подключается. */
|
|
1048
|
+
replaceHistory?: boolean;
|
|
648
1049
|
}
|
|
649
1050
|
type Loader = () => Promise<NovaPlugin | {
|
|
650
1051
|
default: NovaPlugin;
|
|
@@ -752,8 +1153,10 @@ interface AutocompleterItem {
|
|
|
752
1153
|
value: string;
|
|
753
1154
|
label: string;
|
|
754
1155
|
icon?: string;
|
|
755
|
-
/**
|
|
1156
|
+
/** Подсказка справа — горячая клавиша в формате 'Mod-b'. */
|
|
756
1157
|
shortcut?: string;
|
|
1158
|
+
/** Подсказка справа обычным текстом (должность, e-mail). */
|
|
1159
|
+
detail?: string;
|
|
757
1160
|
}
|
|
758
1161
|
interface AutocompleterSpec {
|
|
759
1162
|
/** Символ-триггер: '/', '@', ':'. */
|
|
@@ -827,7 +1230,17 @@ interface PanelButtonSpec extends ControlBase {
|
|
|
827
1230
|
indicator?: (editor: Editor) => string | null;
|
|
828
1231
|
isActive?: (editor: Editor) => boolean;
|
|
829
1232
|
}
|
|
830
|
-
|
|
1233
|
+
/**
|
|
1234
|
+
* Составная кнопка: основная часть выполняет действие (переключить список), стрелка открывает
|
|
1235
|
+
* меню вариантов (стиль маркеров). Как bullist/numlist с плагином advlist.
|
|
1236
|
+
*/
|
|
1237
|
+
interface SplitButtonSpec extends ControlBase {
|
|
1238
|
+
type: 'split';
|
|
1239
|
+
onAction: (editor: Editor) => void;
|
|
1240
|
+
items: (editor: Editor) => MenuEntry[];
|
|
1241
|
+
isActive?: (editor: Editor) => boolean;
|
|
1242
|
+
}
|
|
1243
|
+
type ControlSpec = ButtonSpec | MenuButtonSpec | PanelButtonSpec | SplitButtonSpec;
|
|
831
1244
|
/** Пункт меню менюбара. */
|
|
832
1245
|
interface MenuItemSpec {
|
|
833
1246
|
text: string;
|
|
@@ -867,6 +1280,7 @@ declare class Registry {
|
|
|
867
1280
|
addToggleButton(name: string, spec: WithoutType<ButtonSpec>): void;
|
|
868
1281
|
addMenuButton(name: string, spec: WithoutType<MenuButtonSpec>): void;
|
|
869
1282
|
addPanelButton(name: string, spec: WithoutType<PanelButtonSpec>): void;
|
|
1283
|
+
addSplitButton(name: string, spec: WithoutType<SplitButtonSpec>): void;
|
|
870
1284
|
private readonly menuItems;
|
|
871
1285
|
/** Пункт меню менюбара (аналог addMenuItem). */
|
|
872
1286
|
addMenuItem(name: string, spec: MenuItemSpec): void;
|
|
@@ -931,6 +1345,17 @@ declare class UiManager {
|
|
|
931
1345
|
openPopover(options: Omit<PopoverOptions, 'host'>): Popover;
|
|
932
1346
|
closePopover(): void;
|
|
933
1347
|
get activePopover(): Popover | null;
|
|
1348
|
+
private readonly dialogListeners;
|
|
1349
|
+
/**
|
|
1350
|
+
* Подписаться на открытие диалога (вернёт отписку). Тулбар так закрывает панель «⋯»: иначе на узком
|
|
1351
|
+
* экране она оставалась открытой поверх текста после закрытия диалога, открытого из неё.
|
|
1352
|
+
*/
|
|
1353
|
+
onDialogOpen(listener: () => void): () => void;
|
|
1354
|
+
/**
|
|
1355
|
+
* Закрыть всплывающие панели и «⋯» тулбара — перед тем как плагин открывает свою панель или вид
|
|
1356
|
+
* (история версий, комментарии), чтобы они не остались поверх.
|
|
1357
|
+
*/
|
|
1358
|
+
closeOverlays(): void;
|
|
934
1359
|
openDialog(options: Omit<DialogOptions, 'host' | 'cancelLabel' | 'closeLabel' | 'returnFocus'> & {
|
|
935
1360
|
cancelLabel?: string;
|
|
936
1361
|
}): DialogHandle;
|
|
@@ -951,6 +1376,18 @@ declare function parseToolbar(config: ToolbarConfig): string[][];
|
|
|
951
1376
|
|
|
952
1377
|
type EditorMode = 'classic' | 'inline' | 'distraction-free';
|
|
953
1378
|
type EditorEvent = 'change' | 'selectionChange' | 'focus' | 'blur' | 'editableChange' | 'destroy';
|
|
1379
|
+
/**
|
|
1380
|
+
* Настройки встроенных плагинов (типизированы — подсказки в редакторе кода) и любых сторонних по имени.
|
|
1381
|
+
* Только типы: модули плагинов не попадают в ядро.
|
|
1382
|
+
*/
|
|
1383
|
+
interface PluginOptions {
|
|
1384
|
+
comments?: CommentsOptions;
|
|
1385
|
+
mentions?: MentionsOptions;
|
|
1386
|
+
revisionhistory?: RevisionHistoryOptions;
|
|
1387
|
+
autosave?: AutosaveOptions;
|
|
1388
|
+
quickbars?: QuickbarsOptions;
|
|
1389
|
+
[plugin: string]: unknown;
|
|
1390
|
+
}
|
|
954
1391
|
interface EditorOptions extends PasteOptions, ContentRulesOptions {
|
|
955
1392
|
/** Элемент, внутрь которого монтируется редактор. */
|
|
956
1393
|
element: HTMLElement;
|
|
@@ -994,8 +1431,8 @@ interface EditorOptions extends PasteOptions, ContentRulesOptions {
|
|
|
994
1431
|
* Ленивые грузятся после создания редактора; дождаться — `await editor.ready`.
|
|
995
1432
|
*/
|
|
996
1433
|
plugins?: PluginEntry[];
|
|
997
|
-
/** Настройки плагинов по имени: {
|
|
998
|
-
pluginOptions?:
|
|
1434
|
+
/** Настройки плагинов по имени: { comments: {...}, mentions: {...} }. Встроенные — с типами. */
|
|
1435
|
+
pluginOptions?: PluginOptions;
|
|
999
1436
|
/** Сырые ProseMirror-плагины (для низкоуровневых расширений). */
|
|
1000
1437
|
prosemirrorPlugins?: Plugin[];
|
|
1001
1438
|
/** Вызывается до отрисовки тулбара — место для editor.ui.registry.addButton(...). */
|
|
@@ -1020,9 +1457,12 @@ declare class Editor {
|
|
|
1020
1457
|
private readonly menubar;
|
|
1021
1458
|
readonly mode: EditorMode;
|
|
1022
1459
|
private readonly pluginsByName;
|
|
1460
|
+
private readonly commandOverrides;
|
|
1023
1461
|
private readonly cleanups;
|
|
1024
1462
|
/** Ограничения контента (validElements/invalidElements/validStyles) или null — без ограничений. */
|
|
1025
1463
|
readonly contentRules: ContentRules | null;
|
|
1464
|
+
/** Схема документа этого редактора: базовая + узлы и марки синхронных плагинов. */
|
|
1465
|
+
readonly schema: NovaSchema;
|
|
1026
1466
|
private readonly statusbar;
|
|
1027
1467
|
private readonly searchBar;
|
|
1028
1468
|
private destroyed;
|
|
@@ -1032,10 +1472,20 @@ declare class Editor {
|
|
|
1032
1472
|
/** Разрешён ли контрол/команда/тег по ограничениям контента (без ограничений — всегда да). */
|
|
1033
1473
|
isAllowed(name: string): boolean;
|
|
1034
1474
|
hasPlugin(name: string): boolean;
|
|
1475
|
+
/**
|
|
1476
|
+
* Схема с узлами и марками плагинов. Конфликт имён — ошибка конфигурации: сообщаем и работаем
|
|
1477
|
+
* на базовой схеме, чтобы редактор всё равно открылся.
|
|
1478
|
+
*/
|
|
1479
|
+
private buildSchema;
|
|
1035
1480
|
private collectPmPlugins;
|
|
1036
1481
|
/** setup с изоляцией ошибок: упавший плагин не ломает редактор. */
|
|
1037
1482
|
private setupPlugin;
|
|
1038
1483
|
private loadLazyPlugins;
|
|
1484
|
+
/**
|
|
1485
|
+
* Обновить состояние кнопок (нажата / доступна) без изменения документа — например, после того как
|
|
1486
|
+
* плагин переключил режим отображения. Изменения документа обновляют UI сами.
|
|
1487
|
+
*/
|
|
1488
|
+
updateUI(): void;
|
|
1039
1489
|
/** Перестроить тулбар (после регистрации новых кнопок плагинами). */
|
|
1040
1490
|
rebuildToolbar(): void;
|
|
1041
1491
|
/** Конфиг тулбара: пользовательский как есть; по умолчанию — плюс кнопки подключённых плагинов. */
|
|
@@ -1052,6 +1502,9 @@ declare class Editor {
|
|
|
1052
1502
|
}): void;
|
|
1053
1503
|
isEmpty(): boolean;
|
|
1054
1504
|
/** Выполнить именованную команду или произвольную ProseMirror-команду. */
|
|
1505
|
+
/** Команда по имени: переопределение плагина или встроенная. */
|
|
1506
|
+
resolveCommand(name: CommandName): Command;
|
|
1507
|
+
private registerCommands;
|
|
1055
1508
|
exec(command: CommandName | Command): boolean;
|
|
1056
1509
|
/** Можно ли выполнить команду в текущем состоянии (для disabled-кнопок). */
|
|
1057
1510
|
can(command: CommandName | Command): boolean;
|
|
@@ -1076,6 +1529,9 @@ declare function createEditor(options: EditorOptions): Editor;
|
|
|
1076
1529
|
/** Печать содержимого через скрытый iframe (HTML уже очищен схемой). */
|
|
1077
1530
|
declare function printContent(editor: Editor): void;
|
|
1078
1531
|
|
|
1532
|
+
/** Парсер для схемы конкретного редактора (создаётся один раз на схему). */
|
|
1533
|
+
declare function parserFor(target: Schema): DOMParser;
|
|
1534
|
+
|
|
1079
1535
|
/** Марки-стили со значением: цвет, фон, шрифт, размер. */
|
|
1080
1536
|
type StyleMark = 'color' | 'background' | 'font_family' | 'font_size';
|
|
1081
1537
|
/**
|
|
@@ -1163,7 +1619,7 @@ declare function openSourceCode(editor: Editor): void;
|
|
|
1163
1619
|
declare function openHelp(editor: Editor): void;
|
|
1164
1620
|
|
|
1165
1621
|
/** Создать таблицу rows×cols; первая строка — заголовки, если withHeader. */
|
|
1166
|
-
declare function createTable(rows: number, cols: number, withHeader?: boolean): Node;
|
|
1622
|
+
declare function createTable(rows: number, cols: number, withHeader?: boolean, schema?: NovaSchema): Node;
|
|
1167
1623
|
/** Вставить таблицу на место выделения и поставить курсор в первую ячейку. */
|
|
1168
1624
|
declare function insertTable(rows: number, cols: number, withHeader?: boolean): Command;
|
|
1169
1625
|
declare const tableCommands: {
|
|
@@ -1187,4 +1643,4 @@ declare function hasHeaderRow(state: EditorState): boolean;
|
|
|
1187
1643
|
/** Есть ли столбец-заголовок (первая ячейка каждой строки — th). */
|
|
1188
1644
|
declare function hasHeaderColumn(state: EditorState): boolean;
|
|
1189
1645
|
|
|
1190
|
-
export { type AutocompleterItem, type AutocompleterSpec, type ButtonSpec, type CommandName, ContentRules, type ContentRulesOptions, type ContextToolbarSpec, type ControlSpec, DEFAULT_MENUBAR, DEFAULT_MENUS, Editor, type EditorEvent, type EditorMode, type EditorOptions, type FontOption, type ImageAlign, KNOWN_STYLES, KNOWN_TAGS, type LinkAttrs, type MarkName, type MenuButtonSpec, type MenuDefinition, type MenuEntry, type MenuItem, type MenuItemSpec, type MessageKey, type Messages, type NodeName, type NovaPlugin, type PanelButtonSpec, type PasteOptions, type PluginEntry, Registry, type SearchMatch, type SearchOptions, type SearchState, type SlashCommand, type StyleMark, type TextAlign, type ToolbarConfig, type ToolbarMode, type Translator, UiManager, type UploadImageHandler, applyLink, clearSearch, commands, countWords, createEditor, createTable, createTranslator, cssValue, defaultColors, defaultFontFamilies, defaultFontSizes, defaultLineHeights, defaultSlashCommands, defaultToolbar, definePlugin, en, findMatches, findNext, formatHTML, getActiveAlign, getLineHeight, getLinkAt, getSearchState, getSelectedImage, getStyle, hasHeaderColumn, hasHeaderRow, htmlToPlainText, imageSize, insertImage, insertTable, isCommandActive, isFullscreen, isMarkActive, isNodeActive, isPluginRegistered, isSafeImageUrl, isSafeLinkUrl, normalizeUrl, openHelp, openImageAltDialog, openImageDialog, openLinkDialog, openPreview, openSourceCode, parseToolbar, printContent, rankSlashCommands, registerLanguage, registerPlugin, removeLink, replaceAll, replaceCurrent, ru, schema, setCellBackground, setImageAttrs, setImageWidthFraction, setLineHeight, setLink, setSearch, setStyle, tableCommands, toggleFullscreen, uploadImages };
|
|
1646
|
+
export { type AutocompleterItem, type AutocompleterSpec, type AutosaveOptions, type ButtonSpec, type CommandName, type Comment, type CommentAuthor, type CommentStore, type CommentThread, type CommentsController, type CommentsOptions, ContentRules, type ContentRulesOptions, type ContextToolbarSpec, type ControlSpec, DEFAULT_MENUBAR, DEFAULT_MENUS, Editor, type EditorEvent, type EditorMode, type EditorOptions, type FontOption, type ImageAlign, KNOWN_STYLES, KNOWN_TAGS, type LinkAttrs, MENTION_ID_RE, type MarkName, type MentionUser, type MentionsOptions, type MenuButtonSpec, type MenuDefinition, type MenuEntry, type MenuItem, type MenuItemSpec, type MessageKey, type Messages, type NodeName, type NovaPlugin, type NovaSchema, type PanelButtonSpec, type PasteOptions, type PluginEntry, type PluginOptions, type QuickbarsOptions, Registry, type Revision, type RevisionHistoryOptions, type SchemaExtensions, type SearchMatch, type SearchOptions, type SearchState, type SlashCommand, type StyleMark, type TextAlign, type ToolbarConfig, type ToolbarMode, type Translator, UiManager, type UploadImageHandler, applyLink, clearSearch, commands, countWords, createCommentStore, createEditor, createSchema, createTable, createTranslator, cssValue, defaultColors, defaultFontFamilies, defaultFontSizes, defaultLineHeights, defaultSlashCommands, defaultToolbar, definePlugin, en, findMatches, findNext, formatHTML, getActiveAlign, getComments, getLineHeight, getLinkAt, getMentions, getSearchState, getSelectedImage, getStyle, hasHeaderColumn, hasHeaderRow, htmlToPlainText, imageSize, insertImage, insertTable, isCommandActive, isFullscreen, isMarkActive, isNodeActive, isPluginRegistered, isSafeImageUrl, isSafeLinkUrl, marksOf, newCommentId, nodesOf, normalizeUrl, openHelp, openImageAltDialog, openImageDialog, openLinkDialog, openPreview, openSourceCode, parseToolbar, parserFor, printContent, rankSlashCommands, registerLanguage, registerPlugin, removeLink, replaceAll, replaceCurrent, ru, sanitizeThread, schema, setCellBackground, setImageAttrs, setImageWidthFraction, setLineHeight, setLink, setSearch, setStyle, tableCommands, toggleFullscreen, uploadImages };
|