@licium/editor 3.2.3
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 +176 -0
- package/dist/esm/i18n/__test__/integration/ui/layout.spec.d.ts +1 -0
- package/dist/esm/i18n/__test__/integration/ui/toolbar.spec.d.ts +1 -0
- package/dist/esm/i18n/__test__/integration/vdom/render.spec.d.ts +1 -0
- package/dist/esm/i18n/__test__/integration/widget/widgetNode.spec.d.ts +1 -0
- package/dist/esm/i18n/__test__/unit/convertor.spec.d.ts +1 -0
- package/dist/esm/i18n/__test__/unit/dom.spec.d.ts +1 -0
- package/dist/esm/i18n/__test__/unit/editor.spec.d.ts +1 -0
- package/dist/esm/i18n/__test__/unit/eventEmitter.spec.d.ts +1 -0
- package/dist/esm/i18n/__test__/unit/helper/common.spec.d.ts +1 -0
- package/dist/esm/i18n/__test__/unit/helper/image.spec.d.ts +1 -0
- package/dist/esm/i18n/__test__/unit/linkXss.spec.d.ts +1 -0
- package/dist/esm/i18n/__test__/unit/markdown/keymap.spec.d.ts +1 -0
- package/dist/esm/i18n/__test__/unit/markdown/mdCommand.spec.d.ts +1 -0
- package/dist/esm/i18n/__test__/unit/markdown/mdEditor.spec.d.ts +1 -0
- package/dist/esm/i18n/__test__/unit/markdown/mdPreview.spec.d.ts +1 -0
- package/dist/esm/i18n/__test__/unit/markdown/smartTask.spec.d.ts +1 -0
- package/dist/esm/i18n/__test__/unit/markdown/syntaxHighlight.spec.d.ts +1 -0
- package/dist/esm/i18n/__test__/unit/markdown/util.d.ts +7 -0
- package/dist/esm/i18n/__test__/unit/repro_3296.spec.d.ts +1 -0
- package/dist/esm/i18n/__test__/unit/sanitizer.spec.d.ts +1 -0
- package/dist/esm/i18n/__test__/unit/utils/escape.spec.d.ts +1 -0
- package/dist/esm/i18n/__test__/unit/utils/pollution.spec.d.ts +1 -0
- package/dist/esm/i18n/__test__/unit/vdom/template.spec.d.ts +1 -0
- package/dist/esm/i18n/__test__/unit/viewer.spec.d.ts +1 -0
- package/dist/esm/i18n/__test__/unit/wysiwyg/customBlock.spec.d.ts +1 -0
- package/dist/esm/i18n/__test__/unit/wysiwyg/helper/pasteMsoList.spec.d.ts +1 -0
- package/dist/esm/i18n/__test__/unit/wysiwyg/imageInsertion.spec.d.ts +1 -0
- package/dist/esm/i18n/__test__/unit/wysiwyg/keymap.spec.d.ts +1 -0
- package/dist/esm/i18n/__test__/unit/wysiwyg/wwCommand.spec.d.ts +1 -0
- package/dist/esm/i18n/__test__/unit/wysiwyg/wwEditor.spec.d.ts +1 -0
- package/dist/esm/i18n/__test__/unit/wysiwyg/wwTableCommand.spec.d.ts +1 -0
- package/dist/esm/i18n/__test__/unit/wysiwyg/wwToDOMAdaptor.spec.d.ts +1 -0
- package/dist/esm/i18n/__test__/unit/xssSanitizer.spec.d.ts +1 -0
- package/dist/esm/i18n/ar.d.ts +1 -0
- package/dist/esm/i18n/ar.js +63 -0
- package/dist/esm/i18n/base.d.ts +60 -0
- package/dist/esm/i18n/commands/commandManager.d.ts +16 -0
- package/dist/esm/i18n/commands/defaultCommands.d.ts +2 -0
- package/dist/esm/i18n/commands/wwCommands.d.ts +2 -0
- package/dist/esm/i18n/convertors/convertor.d.ts +19 -0
- package/dist/esm/i18n/convertors/toMarkdown/toMdConvertorState.d.ts +30 -0
- package/dist/esm/i18n/convertors/toMarkdown/toMdConvertors.d.ts +7 -0
- package/dist/esm/i18n/convertors/toMarkdown/toMdNodeTypeWriters.d.ts +8 -0
- package/dist/esm/i18n/convertors/toWysiwyg/htmlToWwConvertors.d.ts +7 -0
- package/dist/esm/i18n/convertors/toWysiwyg/toWwConvertorState.d.ts +23 -0
- package/dist/esm/i18n/convertors/toWysiwyg/toWwConvertors.d.ts +4 -0
- package/dist/esm/i18n/cs-cz.d.ts +1 -0
- package/dist/esm/i18n/cs-cz.js +63 -0
- package/dist/esm/i18n/de-de.d.ts +1 -0
- package/dist/esm/i18n/de-de.js +63 -0
- package/dist/esm/i18n/editor.d.ts +36 -0
- package/dist/esm/i18n/editorCore.d.ts +330 -0
- package/dist/esm/i18n/en-us.d.ts +1 -0
- package/dist/esm/i18n/en-us.js +63 -0
- package/dist/esm/i18n/es-es.d.ts +1 -0
- package/dist/esm/i18n/es-es.js +63 -0
- package/dist/esm/i18n/esm/index.d.ts +5 -0
- package/dist/esm/i18n/esm/indexViewer.d.ts +2 -0
- package/dist/esm/i18n/event/eventEmitter.d.ts +73 -0
- package/dist/esm/i18n/fi-fi.d.ts +1 -0
- package/dist/esm/i18n/fi-fi.js +63 -0
- package/dist/esm/i18n/fr-fr.d.ts +1 -0
- package/dist/esm/i18n/fr-fr.js +63 -0
- package/dist/esm/i18n/gl-es.d.ts +5 -0
- package/dist/esm/i18n/gl-es.js +63 -0
- package/dist/esm/i18n/helper/image.d.ts +4 -0
- package/dist/esm/i18n/helper/manipulation.d.ts +16 -0
- package/dist/esm/i18n/helper/plugin.d.ts +3 -0
- package/dist/esm/i18n/hr-hr.d.ts +1 -0
- package/dist/esm/i18n/hr-hr.js +63 -0
- package/dist/esm/i18n/i18n.d.ts +20 -0
- package/dist/esm/i18n/i18n.js +217 -0
- package/dist/esm/i18n/index.d.ts +10 -0
- package/dist/esm/i18n/indexEditorOnlyStyle.d.ts +3 -0
- package/dist/esm/i18n/indexViewer.d.ts +3 -0
- package/dist/esm/i18n/it-it.d.ts +1 -0
- package/dist/esm/i18n/it-it.js +63 -0
- package/dist/esm/i18n/ja-jp.d.ts +1 -0
- package/dist/esm/i18n/ja-jp.js +63 -0
- package/dist/esm/i18n/ko-kr.d.ts +1 -0
- package/dist/esm/i18n/ko-kr.js +63 -0
- package/dist/esm/i18n/markdown/helper/list.d.ts +55 -0
- package/dist/esm/i18n/markdown/helper/mdCommand.d.ts +5 -0
- package/dist/esm/i18n/markdown/helper/pos.d.ts +22 -0
- package/dist/esm/i18n/markdown/helper/query.d.ts +3 -0
- package/dist/esm/i18n/markdown/htmlRenderConvertors.d.ts +5 -0
- package/dist/esm/i18n/markdown/marks/blockQuote.d.ts +19 -0
- package/dist/esm/i18n/markdown/marks/code.d.ts +25 -0
- package/dist/esm/i18n/markdown/marks/codeBlock.d.ts +18 -0
- package/dist/esm/i18n/markdown/marks/customBlock.d.ts +10 -0
- package/dist/esm/i18n/markdown/marks/emph.d.ts +17 -0
- package/dist/esm/i18n/markdown/marks/heading.d.ts +23 -0
- package/dist/esm/i18n/markdown/marks/html.d.ts +8 -0
- package/dist/esm/i18n/markdown/marks/link.d.ts +29 -0
- package/dist/esm/i18n/markdown/marks/listItem.d.ts +42 -0
- package/dist/esm/i18n/markdown/marks/simpleMark.d.ts +32 -0
- package/dist/esm/i18n/markdown/marks/strike.d.ts +14 -0
- package/dist/esm/i18n/markdown/marks/strong.d.ts +18 -0
- package/dist/esm/i18n/markdown/marks/table.d.ts +27 -0
- package/dist/esm/i18n/markdown/marks/thematicBreak.d.ts +17 -0
- package/dist/esm/i18n/markdown/mdEditor.d.ts +48 -0
- package/dist/esm/i18n/markdown/mdPreview.d.ts +50 -0
- package/dist/esm/i18n/markdown/nodes/doc.d.ts +7 -0
- package/dist/esm/i18n/markdown/nodes/paragraph.d.ts +46 -0
- package/dist/esm/i18n/markdown/nodes/text.d.ts +7 -0
- package/dist/esm/i18n/markdown/plugins/helper/markInfo.d.ts +19 -0
- package/dist/esm/i18n/markdown/plugins/previewHighlight.d.ts +3 -0
- package/dist/esm/i18n/markdown/plugins/smartTask.d.ts +3 -0
- package/dist/esm/i18n/markdown/plugins/syntaxHighlight.d.ts +3 -0
- package/dist/esm/i18n/markdown/scroll/animation.d.ts +2 -0
- package/dist/esm/i18n/markdown/scroll/dom.d.ts +16 -0
- package/dist/esm/i18n/markdown/scroll/offset.d.ts +9 -0
- package/dist/esm/i18n/markdown/scroll/scrollSync.d.ts +30 -0
- package/dist/esm/i18n/nb-no.d.ts +1 -0
- package/dist/esm/i18n/nb-no.js +63 -0
- package/dist/esm/i18n/nl-nl.d.ts +1 -0
- package/dist/esm/i18n/nl-nl.js +63 -0
- package/dist/esm/i18n/pl-pl.d.ts +1 -0
- package/dist/esm/i18n/pl-pl.js +63 -0
- package/dist/esm/i18n/plugins/dropImage.d.ts +3 -0
- package/dist/esm/i18n/plugins/placeholder.d.ts +7 -0
- package/dist/esm/i18n/plugins/popupWidget.d.ts +3 -0
- package/dist/esm/i18n/pt-br.d.ts +1 -0
- package/dist/esm/i18n/pt-br.js +63 -0
- package/dist/esm/i18n/queries/queryManager.d.ts +2 -0
- package/dist/esm/i18n/ru-ru.d.ts +1 -0
- package/dist/esm/i18n/ru-ru.js +64 -0
- package/dist/esm/i18n/sanitizer/htmlSanitizer.d.ts +3 -0
- package/dist/esm/i18n/spec/mark.d.ts +12 -0
- package/dist/esm/i18n/spec/node.d.ts +12 -0
- package/dist/esm/i18n/spec/specManager.d.ts +16 -0
- package/dist/esm/i18n/sv-se.d.ts +1 -0
- package/dist/esm/i18n/sv-se.js +63 -0
- package/dist/esm/i18n/tr-tr.d.ts +1 -0
- package/dist/esm/i18n/tr-tr.js +63 -0
- package/dist/esm/i18n/ui/components/contextMenu.d.ts +21 -0
- package/dist/esm/i18n/ui/components/layout.d.ts +36 -0
- package/dist/esm/i18n/ui/components/popup.d.ts +21 -0
- package/dist/esm/i18n/ui/components/switch.d.ts +17 -0
- package/dist/esm/i18n/ui/components/tabs.d.ts +12 -0
- package/dist/esm/i18n/ui/components/toolbar/customPopupBody.d.ts +16 -0
- package/dist/esm/i18n/ui/components/toolbar/headingPopupBody.d.ts +12 -0
- package/dist/esm/i18n/ui/components/toolbar/imagePopupBody.d.ts +30 -0
- package/dist/esm/i18n/ui/components/toolbar/linkPopupBody.d.ts +18 -0
- package/dist/esm/i18n/ui/components/toolbar/tablePopupBody.d.ts +29 -0
- package/dist/esm/i18n/ui/components/toolbar/toolbar.d.ts +45 -0
- package/dist/esm/i18n/ui/components/toolbar/toolbarGroup.d.ts +21 -0
- package/dist/esm/i18n/ui/toolbarItemFactory.d.ts +13 -0
- package/dist/esm/i18n/ui/vdom/commit.d.ts +2 -0
- package/dist/esm/i18n/ui/vdom/component.d.ts +10 -0
- package/dist/esm/i18n/ui/vdom/dom.d.ts +6 -0
- package/dist/esm/i18n/ui/vdom/render.d.ts +4 -0
- package/dist/esm/i18n/ui/vdom/renderer.d.ts +4 -0
- package/dist/esm/i18n/ui/vdom/template.d.ts +3 -0
- package/dist/esm/i18n/ui/vdom/vnode.d.ts +30 -0
- package/dist/esm/i18n/uk-ua.d.ts +1 -0
- package/dist/esm/i18n/uk-ua.js +63 -0
- package/dist/esm/i18n/utils/common.d.ts +19 -0
- package/dist/esm/i18n/utils/constants.d.ts +8 -0
- package/dist/esm/i18n/utils/dom.d.ts +25 -0
- package/dist/esm/i18n/utils/map.d.ts +19 -0
- package/dist/esm/i18n/utils/markdown.d.ts +23 -0
- package/dist/esm/i18n/viewer.d.ts +77 -0
- package/dist/esm/i18n/widget/rules.d.ts +28 -0
- package/dist/esm/i18n/widget/widgetNode.d.ts +28 -0
- package/dist/esm/i18n/wysiwyg/adaptor/mdLikeNode.d.ts +5 -0
- package/dist/esm/i18n/wysiwyg/adaptor/wwToDOMAdaptor.d.ts +13 -0
- package/dist/esm/i18n/wysiwyg/clipboard/paste.d.ts +6 -0
- package/dist/esm/i18n/wysiwyg/clipboard/pasteMsoList.d.ts +2 -0
- package/dist/esm/i18n/wysiwyg/clipboard/pasteTextParser.d.ts +2 -0
- package/dist/esm/i18n/wysiwyg/clipboard/pasteToTable.d.ts +3 -0
- package/dist/esm/i18n/wysiwyg/command/list.d.ts +7 -0
- package/dist/esm/i18n/wysiwyg/command/table.d.ts +16 -0
- package/dist/esm/i18n/wysiwyg/helper/node.d.ts +37 -0
- package/dist/esm/i18n/wysiwyg/helper/table.d.ts +25 -0
- package/dist/esm/i18n/wysiwyg/helper/tableOffsetMap.d.ts +88 -0
- package/dist/esm/i18n/wysiwyg/markdownInputRules.d.ts +3 -0
- package/dist/esm/i18n/wysiwyg/marks/code.d.ts +31 -0
- package/dist/esm/i18n/wysiwyg/marks/emph.d.ts +34 -0
- package/dist/esm/i18n/wysiwyg/marks/link.d.ts +59 -0
- package/dist/esm/i18n/wysiwyg/marks/strike.d.ts +31 -0
- package/dist/esm/i18n/wysiwyg/marks/strong.d.ts +34 -0
- package/dist/esm/i18n/wysiwyg/nodes/blockQuote.d.ts +33 -0
- package/dist/esm/i18n/wysiwyg/nodes/bulletList.d.ts +43 -0
- package/dist/esm/i18n/wysiwyg/nodes/codeBlock.d.ts +45 -0
- package/dist/esm/i18n/wysiwyg/nodes/customBlock.d.ts +26 -0
- package/dist/esm/i18n/wysiwyg/nodes/doc.d.ts +7 -0
- package/dist/esm/i18n/wysiwyg/nodes/frontMatter.d.ts +21 -0
- package/dist/esm/i18n/wysiwyg/nodes/hardBreak.d.ts +14 -0
- package/dist/esm/i18n/wysiwyg/nodes/heading.d.ts +38 -0
- package/dist/esm/i18n/wysiwyg/nodes/html.d.ts +11 -0
- package/dist/esm/i18n/wysiwyg/nodes/htmlComment.d.ts +21 -0
- package/dist/esm/i18n/wysiwyg/nodes/image.d.ts +45 -0
- package/dist/esm/i18n/wysiwyg/nodes/listItem.d.ts +36 -0
- package/dist/esm/i18n/wysiwyg/nodes/orderedList.d.ts +39 -0
- package/dist/esm/i18n/wysiwyg/nodes/paragraph.d.ts +21 -0
- package/dist/esm/i18n/wysiwyg/nodes/table.d.ts +80 -0
- package/dist/esm/i18n/wysiwyg/nodes/tableBody.d.ts +26 -0
- package/dist/esm/i18n/wysiwyg/nodes/tableBodyCell.d.ts +36 -0
- package/dist/esm/i18n/wysiwyg/nodes/tableHead.d.ts +26 -0
- package/dist/esm/i18n/wysiwyg/nodes/tableHeadCell.d.ts +39 -0
- package/dist/esm/i18n/wysiwyg/nodes/tableRow.d.ts +26 -0
- package/dist/esm/i18n/wysiwyg/nodes/text.d.ts +14 -0
- package/dist/esm/i18n/wysiwyg/nodes/thematicBreak.d.ts +33 -0
- package/dist/esm/i18n/wysiwyg/nodeview/codeBlockView.d.ts +29 -0
- package/dist/esm/i18n/wysiwyg/nodeview/customBlockView.d.ts +29 -0
- package/dist/esm/i18n/wysiwyg/nodeview/imageView.d.ts +20 -0
- package/dist/esm/i18n/wysiwyg/plugins/selection/cellSelection.d.ts +14 -0
- package/dist/esm/i18n/wysiwyg/plugins/selection/tableSelection.d.ts +2 -0
- package/dist/esm/i18n/wysiwyg/plugins/selection/tableSelectionView.d.ts +19 -0
- package/dist/esm/i18n/wysiwyg/plugins/tableContextMenu.d.ts +3 -0
- package/dist/esm/i18n/wysiwyg/plugins/task.d.ts +2 -0
- package/dist/esm/i18n/wysiwyg/plugins/toolbarState.d.ts +3 -0
- package/dist/esm/i18n/wysiwyg/specCreator.d.ts +3 -0
- package/dist/esm/i18n/wysiwyg/wwEditor.d.ts +57 -0
- package/dist/esm/i18n/zh-cn.d.ts +1 -0
- package/dist/esm/i18n/zh-cn.js +63 -0
- package/dist/esm/i18n/zh-tw.d.ts +1 -0
- package/dist/esm/i18n/zh-tw.js +63 -0
- package/dist/esm/index.js +25133 -0
- package/dist/esm/indexViewer.js +12757 -0
- package/dist/i18n/ar.js +162 -0
- package/dist/i18n/cs-cz.js +162 -0
- package/dist/i18n/de-de.js +162 -0
- package/dist/i18n/es-es.js +162 -0
- package/dist/i18n/fi-fi.js +162 -0
- package/dist/i18n/fr-fr.js +162 -0
- package/dist/i18n/gl-es.js +162 -0
- package/dist/i18n/hr-hr.js +162 -0
- package/dist/i18n/it-it.js +162 -0
- package/dist/i18n/ja-jp.js +162 -0
- package/dist/i18n/ko-kr.js +162 -0
- package/dist/i18n/nb-no.js +162 -0
- package/dist/i18n/nl-nl.js +162 -0
- package/dist/i18n/pl-pl.js +162 -0
- package/dist/i18n/pt-br.js +162 -0
- package/dist/i18n/ru-ru.js +163 -0
- package/dist/i18n/sv-se.js +162 -0
- package/dist/i18n/tr-tr.js +162 -0
- package/dist/i18n/uk-ua.js +162 -0
- package/dist/i18n/zh-cn.js +162 -0
- package/dist/i18n/zh-tw.js +162 -0
- package/dist/theme/toastui-editor-dark.css +474 -0
- package/dist/toastui-editor-only.css +1068 -0
- package/dist/toastui-editor-viewer.css +492 -0
- package/dist/toastui-editor-viewer.js +14079 -0
- package/dist/toastui-editor.css +1606 -0
- package/dist/toastui-editor.js +26464 -0
- package/package.json +95 -0
- package/types/convertor.d.ts +143 -0
- package/types/editor.d.ts +383 -0
- package/types/event.d.ts +56 -0
- package/types/index.d.ts +70 -0
- package/types/map.d.ts +8 -0
- package/types/markdown.d.ts +60 -0
- package/types/plugin.d.ts +59 -0
- package/types/prosemirror-commands.d.ts +15 -0
- package/types/prosemirror-model.d.ts +15 -0
- package/types/prosemirror-transform.d.ts +35 -0
- package/types/spec.d.ts +42 -0
- package/types/toastmark.d.ts +357 -0
- package/types/toastui-editor-viewer.d.ts +39 -0
- package/types/ui.d.ts +165 -0
- package/types/wysiwyg.d.ts +36 -0
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { ViewerOptions } from '@t/editor';
|
|
2
|
+
import { Handler } from '@t/event';
|
|
3
|
+
/**
|
|
4
|
+
* Class ToastUIEditorViewer
|
|
5
|
+
* @param {object} options Option object
|
|
6
|
+
* @param {HTMLElement} options.el - container element
|
|
7
|
+
* @param {string} [options.initialValue] Editor's initial value
|
|
8
|
+
* @param {Object} [options.events] - Events
|
|
9
|
+
* @param {function} [options.events.load] - It would be emitted when editor fully load
|
|
10
|
+
* @param {function} [options.events.change] - It would be emitted when content changed
|
|
11
|
+
* @param {function} [options.events.caretChange] - It would be emitted when format change by cursor position
|
|
12
|
+
* @param {function} [options.events.focus] - It would be emitted when editor get focus
|
|
13
|
+
* @param {function} [options.events.blur] - It would be emitted when editor loose focus
|
|
14
|
+
* @param {Array.<function|Array>} [options.plugins] - Array of plugins. A plugin can be either a function or an array in the form of [function, options].
|
|
15
|
+
* @param {Object} [options.extendedAutolinks] - Using extended Autolinks specified in GFM spec
|
|
16
|
+
* @param {Object} [options.linkAttributes] - Attributes of anchor element that should be rel, target, hreflang, type
|
|
17
|
+
* @param {Object} [options.customHTMLRenderer=null] - Object containing custom renderer functions correspond to change markdown node to preview HTML or wysiwyg node
|
|
18
|
+
* @param {boolean} [options.referenceDefinition=false] - whether use the specification of link reference definition
|
|
19
|
+
* @param {function} [options.customHTMLSanitizer=null] - custom HTML sanitizer
|
|
20
|
+
* @param {boolean} [options.frontMatter=false] - whether use the front matter
|
|
21
|
+
* @param {string} [options.theme] - The theme to style the viewer with. The default is included in toastui-editor.css.
|
|
22
|
+
*/
|
|
23
|
+
declare class ToastUIEditorViewer {
|
|
24
|
+
private options;
|
|
25
|
+
private toastMark;
|
|
26
|
+
private eventEmitter;
|
|
27
|
+
private preview;
|
|
28
|
+
constructor(options: ViewerOptions);
|
|
29
|
+
/**
|
|
30
|
+
* Toggle task by detecting mousedown event.
|
|
31
|
+
* @param {MouseEvent} ev - event
|
|
32
|
+
* @private
|
|
33
|
+
*/
|
|
34
|
+
private toggleTask;
|
|
35
|
+
/**
|
|
36
|
+
* Set content for preview
|
|
37
|
+
* @param {string} markdown Markdown text
|
|
38
|
+
*/
|
|
39
|
+
setMarkdown(markdown: string): void;
|
|
40
|
+
/**
|
|
41
|
+
* Bind eventHandler to event type
|
|
42
|
+
* @param {string} type Event type
|
|
43
|
+
* @param {function} handler Event handler
|
|
44
|
+
*/
|
|
45
|
+
on(type: string, handler: Handler): void;
|
|
46
|
+
/**
|
|
47
|
+
* Unbind eventHandler from event type
|
|
48
|
+
* @param {string} type Event type
|
|
49
|
+
*/
|
|
50
|
+
off(type: string): void;
|
|
51
|
+
/**
|
|
52
|
+
* Add hook to TUIEditor event
|
|
53
|
+
* @param {string} type Event type
|
|
54
|
+
* @param {function} handler Event handler
|
|
55
|
+
*/
|
|
56
|
+
addHook(type: string, handler: Handler): void;
|
|
57
|
+
/**
|
|
58
|
+
* Remove Viewer preview from document
|
|
59
|
+
*/
|
|
60
|
+
destroy(): void;
|
|
61
|
+
/**
|
|
62
|
+
* Return true
|
|
63
|
+
* @returns {boolean}
|
|
64
|
+
*/
|
|
65
|
+
isViewer(): boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Return false
|
|
68
|
+
* @returns {boolean}
|
|
69
|
+
*/
|
|
70
|
+
isMarkdownMode(): boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Return false
|
|
73
|
+
* @returns {boolean}
|
|
74
|
+
*/
|
|
75
|
+
isWysiwygMode(): boolean;
|
|
76
|
+
}
|
|
77
|
+
export default ToastUIEditorViewer;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Schema } from 'prosemirror-model';
|
|
2
|
+
import { CustomInlineMdNode } from '@licium/toastmark';
|
|
3
|
+
import { WidgetRule } from '@t/editor';
|
|
4
|
+
export declare function unwrapWidgetSyntax(text: string): string;
|
|
5
|
+
export declare function createWidgetContent(info: string, text: string): string;
|
|
6
|
+
export declare function widgetToDOM(info: string, text: string): HTMLElement;
|
|
7
|
+
export declare function getWidgetRules(): WidgetRule[];
|
|
8
|
+
export declare function setWidgetRules(rules: WidgetRule[]): void;
|
|
9
|
+
/**
|
|
10
|
+
* create nodes with plain text and replace text matched to the widget rules with the widget node
|
|
11
|
+
* For example, in case the text and widget rules as below
|
|
12
|
+
*
|
|
13
|
+
* text: $test plain text #test
|
|
14
|
+
* widget rules: [{ rule: /$.+/ }, { rule: /#.+/ }]
|
|
15
|
+
*
|
|
16
|
+
* The creating node process is recursive and is as follows.
|
|
17
|
+
*
|
|
18
|
+
* in first widget rule(/$.+/)
|
|
19
|
+
* $test -> widget node
|
|
20
|
+
* plain text -> match with next widget rule
|
|
21
|
+
* #test -> match with next widget rule
|
|
22
|
+
*
|
|
23
|
+
* in second widget rule(/#.+/)
|
|
24
|
+
* plain text -> text node(no rule for matching)
|
|
25
|
+
* #test -> widget node
|
|
26
|
+
*/
|
|
27
|
+
export declare function createNodesWithWidget(text: string, schema: Schema, ruleIndex?: number): import("prosemirror-model").Node[];
|
|
28
|
+
export declare function getWidgetContent(widgetNode: CustomInlineMdNode): string;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { DOMOutputSpec, ProsemirrorNode } from 'prosemirror-model';
|
|
2
|
+
import SpecNode from '@/spec/node';
|
|
3
|
+
export declare function widgetNodeView(pmNode: ProsemirrorNode): {
|
|
4
|
+
dom: HTMLSpanElement;
|
|
5
|
+
};
|
|
6
|
+
export declare function isWidgetNode(pmNode: ProsemirrorNode): boolean;
|
|
7
|
+
export declare class Widget extends SpecNode {
|
|
8
|
+
get name(): string;
|
|
9
|
+
get schema(): {
|
|
10
|
+
attrs: {
|
|
11
|
+
info: {
|
|
12
|
+
default: null;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
group: string;
|
|
16
|
+
inline: boolean;
|
|
17
|
+
content: string;
|
|
18
|
+
selectable: boolean;
|
|
19
|
+
atom: boolean;
|
|
20
|
+
toDOM(): DOMOutputSpec;
|
|
21
|
+
parseDOM: {
|
|
22
|
+
tag: string;
|
|
23
|
+
getAttrs(dom: Node | string): {
|
|
24
|
+
info: string;
|
|
25
|
+
};
|
|
26
|
+
}[];
|
|
27
|
+
};
|
|
28
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Mark, Node as ProsemirrorNode } from 'prosemirror-model';
|
|
2
|
+
import { MdLikeNode } from '@t/markdown';
|
|
3
|
+
export declare function isPmNode(node: ProsemirrorNode | Mark): node is ProsemirrorNode;
|
|
4
|
+
export declare function isContainer(type: string): boolean;
|
|
5
|
+
export declare function createMdLikeNode(node: ProsemirrorNode | Mark): MdLikeNode;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { HTMLConvertorMap, Renderer } from '@licium/toastmark';
|
|
2
|
+
import { Mark } from 'prosemirror-model';
|
|
3
|
+
import { ToDOMAdaptor } from '@t/convertor';
|
|
4
|
+
import { CustomHTMLRenderer, LinkAttributes } from '@t/editor';
|
|
5
|
+
export declare class WwToDOMAdaptor implements ToDOMAdaptor {
|
|
6
|
+
private customConvertorKeys;
|
|
7
|
+
renderer: Renderer;
|
|
8
|
+
convertors: HTMLConvertorMap;
|
|
9
|
+
constructor(linkAttributes: LinkAttributes | null, customRenderer: CustomHTMLRenderer);
|
|
10
|
+
private generateTokens;
|
|
11
|
+
private toDOMNode;
|
|
12
|
+
getToDOMNode(name: string): ((node: import("prosemirror-model").Node | Mark) => HTMLElement) | null;
|
|
13
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Schema, Node, Slice, Fragment } from 'prosemirror-model';
|
|
2
|
+
export declare function changePastedHTML(html: string): string;
|
|
3
|
+
export declare function copyTableHeadRow(orgRow: Node, maxColumnCount: number, schema: Schema): Node;
|
|
4
|
+
export declare function copyTableBodyRow(orgRow: Node, maxColumnCount: number, schema: Schema): Node;
|
|
5
|
+
export declare function createRowsFromPastingTable(tableContent: Fragment): Node[];
|
|
6
|
+
export declare function changePastedSlice(slice: Slice, schema: Schema, isInTable: boolean): Slice;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { NodeType } from 'prosemirror-model';
|
|
2
|
+
import { Command } from 'prosemirror-state';
|
|
3
|
+
export declare function changeList(list: NodeType): Command;
|
|
4
|
+
export declare function toggleTask(): Command;
|
|
5
|
+
export declare function sinkListItem(listItem: NodeType): Command;
|
|
6
|
+
export declare function liftListItem(listItem: NodeType): Command;
|
|
7
|
+
export declare function splitListItem(listItem: NodeType): Command;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ProsemirrorNode, ResolvedPos, Schema } from 'prosemirror-model';
|
|
2
|
+
import { Transaction } from 'prosemirror-state';
|
|
3
|
+
import { TableOffsetMap } from '../helper/tableOffsetMap';
|
|
4
|
+
import { Direction } from '../nodes/table';
|
|
5
|
+
export declare type CellPosition = [rowIdx: number, colIdx: number];
|
|
6
|
+
export declare function canMoveBetweenCells(direction: Direction, [cellDepth, paraDepth]: number[], from: ResolvedPos, doc: ProsemirrorNode): boolean;
|
|
7
|
+
export declare function canBeOutOfTable(direction: Direction, map: TableOffsetMap, [rowIdx, colIdx]: CellPosition): boolean;
|
|
8
|
+
export declare function addParagraphBeforeTable(tr: Transaction, map: TableOffsetMap, schema: Schema): Transaction;
|
|
9
|
+
export declare function addParagraphAfterTable(tr: Transaction, map: TableOffsetMap, schema: Schema, forcedAddtion?: boolean): Transaction;
|
|
10
|
+
export declare function getRightCellOffset([rowIdx, colIdx]: CellPosition, map: TableOffsetMap): number | null;
|
|
11
|
+
export declare function getLeftCellOffset([rowIdx, colIdx]: CellPosition, map: TableOffsetMap): number | null;
|
|
12
|
+
export declare function getUpCellOffset([rowIdx, colIdx]: CellPosition, map: TableOffsetMap): number | null;
|
|
13
|
+
export declare function getDownCellOffset([rowIdx, colIdx]: CellPosition, map: TableOffsetMap): number | null;
|
|
14
|
+
export declare function moveToCell(direction: Direction, tr: Transaction, cellIndex: CellPosition, map: TableOffsetMap): Transaction | null;
|
|
15
|
+
export declare function canSelectTableNode(direction: Direction, map: TableOffsetMap, [rowIdx, colIdx]: CellPosition): boolean;
|
|
16
|
+
export declare function selectNode(tr: Transaction, pos: ResolvedPos, depth: number): Transaction;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { ProsemirrorNode, ResolvedPos } from 'prosemirror-model';
|
|
2
|
+
declare type NodeAttrs = Record<string, any>;
|
|
3
|
+
interface CustomAttrs {
|
|
4
|
+
htmlAttrs: {
|
|
5
|
+
default: any;
|
|
6
|
+
};
|
|
7
|
+
classNames: {
|
|
8
|
+
default: null | string[];
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
export declare function findNodeBy(pos: ResolvedPos, condition: (node: ProsemirrorNode, depth: number) => boolean): {
|
|
12
|
+
node: import("prosemirror-model").Node;
|
|
13
|
+
depth: number;
|
|
14
|
+
offset: number;
|
|
15
|
+
} | null;
|
|
16
|
+
export declare function isListNode({ type }: ProsemirrorNode): boolean;
|
|
17
|
+
export declare function isInListNode(pos: ResolvedPos): boolean;
|
|
18
|
+
export declare function isInTableNode(pos: ResolvedPos): boolean;
|
|
19
|
+
export declare function findListItem(pos: ResolvedPos): {
|
|
20
|
+
node: import("prosemirror-model").Node;
|
|
21
|
+
depth: number;
|
|
22
|
+
offset: number;
|
|
23
|
+
} | null;
|
|
24
|
+
export declare function createDOMInfoParsedRawHTML(tag: string): {
|
|
25
|
+
tag: string;
|
|
26
|
+
getAttrs(dom: Node | string): {
|
|
27
|
+
rawHTML?: string | undefined;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
export declare function createCellAttrs(attrs: NodeAttrs): NodeAttrs;
|
|
31
|
+
export declare function createParsedCellDOM(tag: string): {
|
|
32
|
+
tag: string;
|
|
33
|
+
getAttrs(dom: Node | string): NodeAttrs;
|
|
34
|
+
};
|
|
35
|
+
export declare function getDefaultCustomAttrs(): CustomAttrs;
|
|
36
|
+
export declare function getCustomAttrs(attrs: Record<string, any>): any;
|
|
37
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Node, Schema, ResolvedPos, Slice, ProsemirrorNode } from 'prosemirror-model';
|
|
2
|
+
import { Selection } from 'prosemirror-state';
|
|
3
|
+
import { CellSelection } from '@t/wysiwyg';
|
|
4
|
+
import type { SelectionInfo } from './tableOffsetMap';
|
|
5
|
+
export declare function createTableHeadRow(columnCount: number, schema: Schema, data?: string[]): Node[];
|
|
6
|
+
export declare function createTableBodyRows(rowCount: number, columnCount: number, schema: Schema, data?: string[]): Node[];
|
|
7
|
+
export declare function createDummyCells(columnCount: number, rowIdx: number, schema: Schema, attrs?: Record<string, any> | null): Node[];
|
|
8
|
+
export declare function findCellElement(node: HTMLElement, root: Element): HTMLElement | null;
|
|
9
|
+
export declare function findCell(pos: ResolvedPos): {
|
|
10
|
+
node: Node;
|
|
11
|
+
depth: number;
|
|
12
|
+
offset: number;
|
|
13
|
+
} | null;
|
|
14
|
+
export declare function getResolvedSelection(selection: Selection | CellSelection): {
|
|
15
|
+
anchor: ResolvedPos;
|
|
16
|
+
head: ResolvedPos;
|
|
17
|
+
};
|
|
18
|
+
export declare function getTableContentFromSlice(slice: Slice): import("prosemirror-model").Fragment | null;
|
|
19
|
+
export declare function getRowAndColumnCount({ startRowIdx, startColIdx, endRowIdx, endColIdx, }: SelectionInfo): {
|
|
20
|
+
rowCount: number;
|
|
21
|
+
columnCount: number;
|
|
22
|
+
};
|
|
23
|
+
export declare function setAttrs(cell: ProsemirrorNode, attrs: Record<string, any>): {
|
|
24
|
+
[x: string]: any;
|
|
25
|
+
};
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import type { Node, ResolvedPos } from 'prosemirror-model';
|
|
2
|
+
export interface CellInfo {
|
|
3
|
+
offset: number;
|
|
4
|
+
nodeSize: number;
|
|
5
|
+
extended?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface SelectionInfo {
|
|
8
|
+
startRowIdx: number;
|
|
9
|
+
startColIdx: number;
|
|
10
|
+
endRowIdx: number;
|
|
11
|
+
endColIdx: number;
|
|
12
|
+
}
|
|
13
|
+
interface SpanMap {
|
|
14
|
+
[key: number]: {
|
|
15
|
+
count: number;
|
|
16
|
+
startSpanIdx: number;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export interface RowInfo {
|
|
20
|
+
[key: number]: CellInfo;
|
|
21
|
+
length: number;
|
|
22
|
+
rowspanMap: SpanMap;
|
|
23
|
+
colspanMap: SpanMap;
|
|
24
|
+
}
|
|
25
|
+
interface SpanInfo {
|
|
26
|
+
node: Node;
|
|
27
|
+
pos: number;
|
|
28
|
+
count: number;
|
|
29
|
+
startSpanIdx: number;
|
|
30
|
+
}
|
|
31
|
+
interface OffsetMap {
|
|
32
|
+
rowInfo: RowInfo[];
|
|
33
|
+
table: Node;
|
|
34
|
+
totalRowCount: number;
|
|
35
|
+
totalColumnCount: number;
|
|
36
|
+
tableStartOffset: number;
|
|
37
|
+
tableEndOffset: number;
|
|
38
|
+
getCellInfo(rowIdx: number, colIdx: number): CellInfo;
|
|
39
|
+
posAt(rowIdx: number, colIdx: number): number;
|
|
40
|
+
getNodeAndPos(rowIdx: number, colIdx: number): {
|
|
41
|
+
node: Node;
|
|
42
|
+
pos: number;
|
|
43
|
+
};
|
|
44
|
+
extendedRowspan(rowIdx: number, colIdx: number): boolean;
|
|
45
|
+
extendedColspan(rowIdx: number, colIdx: number): boolean;
|
|
46
|
+
getRowspanCount(rowIdx: number, colIdx: number): number;
|
|
47
|
+
getColspanCount(rowIdx: number, colIdx: number): number;
|
|
48
|
+
decreaseColspanCount(rowIdx: number, colIdx: number): number;
|
|
49
|
+
decreaseRowspanCount(rowIdx: number, colIdx: number): number;
|
|
50
|
+
getColspanStartInfo(rowIdx: number, colIdx: number): SpanInfo | null;
|
|
51
|
+
getRowspanStartInfo(rowIdx: number, colIdx: number): SpanInfo | null;
|
|
52
|
+
getRectOffsets(startCellPos: ResolvedPos, endCellPos?: ResolvedPos): SelectionInfo;
|
|
53
|
+
getSpannedOffsets(selectionInfo: SelectionInfo): SelectionInfo;
|
|
54
|
+
}
|
|
55
|
+
declare type CreateOffsetMapMixin = (headOrBody: Node, startOffset: number, startFromBody?: boolean) => RowInfo[];
|
|
56
|
+
export declare class TableOffsetMap {
|
|
57
|
+
private table;
|
|
58
|
+
private tableRows;
|
|
59
|
+
private tableStartPos;
|
|
60
|
+
private rowInfo;
|
|
61
|
+
constructor(table: Node, tableRows: Node[], tableStartPos: number, rowInfo: RowInfo[]);
|
|
62
|
+
static create(cellPos: ResolvedPos): TableOffsetMap | null;
|
|
63
|
+
get totalRowCount(): number;
|
|
64
|
+
get totalColumnCount(): number;
|
|
65
|
+
get tableStartOffset(): number;
|
|
66
|
+
get tableEndOffset(): number;
|
|
67
|
+
getCellInfo(rowIdx: number, colIdx: number): CellInfo;
|
|
68
|
+
posAt(rowIdx: number, colIdx: number): number;
|
|
69
|
+
getNodeAndPos(rowIdx: number, colIdx: number): {
|
|
70
|
+
node: Node;
|
|
71
|
+
pos: number;
|
|
72
|
+
};
|
|
73
|
+
extendedRowspan(rowIdx: number, colIdx: number): boolean;
|
|
74
|
+
extendedColspan(rowIdx: number, colIdx: number): boolean;
|
|
75
|
+
getRowspanCount(rowIdx: number, colIdx: number): number;
|
|
76
|
+
getColspanCount(rowIdx: number, colIdx: number): number;
|
|
77
|
+
decreaseColspanCount(rowIdx: number, colIdx: number): number;
|
|
78
|
+
decreaseRowspanCount(rowIdx: number, colIdx: number): number;
|
|
79
|
+
getColspanStartInfo(rowIdx: number, colIdx: number): SpanInfo | null;
|
|
80
|
+
getRowspanStartInfo(rowIdx: number, colIdx: number): SpanInfo | null;
|
|
81
|
+
getCellStartOffset(rowIdx: number, colIdx: number): number;
|
|
82
|
+
getCellEndOffset(rowIdx: number, colIdx: number): number;
|
|
83
|
+
getCellIndex(cellPos: ResolvedPos): [rowIdx: number, colIdx: number];
|
|
84
|
+
getRectOffsets(startCellPos: ResolvedPos, endCellPos?: ResolvedPos): SelectionInfo;
|
|
85
|
+
getSpannedOffsets(selectionInfo: SelectionInfo): SelectionInfo;
|
|
86
|
+
}
|
|
87
|
+
export declare function mixinTableOffsetMapPrototype(offsetMapMixin: OffsetMap, createOffsetMapMixin: CreateOffsetMapMixin): typeof TableOffsetMap;
|
|
88
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Mark as ProsemirrorMark, DOMOutputSpec } from 'prosemirror-model';
|
|
2
|
+
import Mark from '@/spec/mark';
|
|
3
|
+
import { EditorCommand } from '@t/spec';
|
|
4
|
+
export declare class Code extends Mark {
|
|
5
|
+
get name(): string;
|
|
6
|
+
get schema(): {
|
|
7
|
+
attrs: {
|
|
8
|
+
htmlAttrs: {
|
|
9
|
+
default: any;
|
|
10
|
+
};
|
|
11
|
+
classNames: {
|
|
12
|
+
default: string[] | null;
|
|
13
|
+
};
|
|
14
|
+
rawHTML: {
|
|
15
|
+
default: null;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
parseDOM: {
|
|
19
|
+
tag: string;
|
|
20
|
+
getAttrs(dom: Node | string): {
|
|
21
|
+
rawHTML?: string | undefined;
|
|
22
|
+
};
|
|
23
|
+
}[];
|
|
24
|
+
toDOM({ attrs }: ProsemirrorMark): DOMOutputSpec;
|
|
25
|
+
};
|
|
26
|
+
commands(): EditorCommand;
|
|
27
|
+
keymaps(): {
|
|
28
|
+
'Shift-Mod-c': import("prosemirror-state").Command;
|
|
29
|
+
'Shift-Mod-C': import("prosemirror-state").Command;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Mark as ProsemirrorMark, DOMOutputSpec } from 'prosemirror-model';
|
|
2
|
+
import Mark from '@/spec/mark';
|
|
3
|
+
import { EditorCommand } from '@t/spec';
|
|
4
|
+
export declare class Emph extends Mark {
|
|
5
|
+
get name(): string;
|
|
6
|
+
get schema(): {
|
|
7
|
+
attrs: {
|
|
8
|
+
htmlAttrs: {
|
|
9
|
+
default: any;
|
|
10
|
+
};
|
|
11
|
+
classNames: {
|
|
12
|
+
default: string[] | null;
|
|
13
|
+
};
|
|
14
|
+
rawHTML: {
|
|
15
|
+
default: null;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
parseDOM: {
|
|
19
|
+
tag: string;
|
|
20
|
+
getAttrs(dom: Node | string): {
|
|
21
|
+
rawHTML?: string | undefined;
|
|
22
|
+
};
|
|
23
|
+
}[];
|
|
24
|
+
toDOM({ attrs }: ProsemirrorMark): DOMOutputSpec;
|
|
25
|
+
};
|
|
26
|
+
private italic;
|
|
27
|
+
commands(): {
|
|
28
|
+
italic: EditorCommand<import("@t/spec").DefaultPayload>;
|
|
29
|
+
};
|
|
30
|
+
keymaps(): {
|
|
31
|
+
'Mod-i': import("prosemirror-state").Command;
|
|
32
|
+
'Mod-I': import("prosemirror-state").Command;
|
|
33
|
+
};
|
|
34
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { Mark as ProsemirrorMark, DOMOutputSpec } from 'prosemirror-model';
|
|
2
|
+
import Mark from '@/spec/mark';
|
|
3
|
+
import { EditorCommand } from '@t/spec';
|
|
4
|
+
import { LinkAttributes } from '@t/editor';
|
|
5
|
+
export declare class Link extends Mark {
|
|
6
|
+
private linkAttributes;
|
|
7
|
+
constructor(linkAttributes: LinkAttributes);
|
|
8
|
+
get name(): string;
|
|
9
|
+
get schema(): {
|
|
10
|
+
attrs: {
|
|
11
|
+
htmlAttrs: {
|
|
12
|
+
default: any;
|
|
13
|
+
};
|
|
14
|
+
classNames: {
|
|
15
|
+
default: string[] | null;
|
|
16
|
+
};
|
|
17
|
+
linkUrl: {
|
|
18
|
+
default: string;
|
|
19
|
+
};
|
|
20
|
+
title: {
|
|
21
|
+
default: null;
|
|
22
|
+
};
|
|
23
|
+
rawHTML: {
|
|
24
|
+
default: null;
|
|
25
|
+
};
|
|
26
|
+
target: {
|
|
27
|
+
default: null;
|
|
28
|
+
};
|
|
29
|
+
rel: {
|
|
30
|
+
default: null;
|
|
31
|
+
};
|
|
32
|
+
class: {
|
|
33
|
+
default: null;
|
|
34
|
+
};
|
|
35
|
+
id: {
|
|
36
|
+
default: null;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
parseDOM: {
|
|
40
|
+
tag: string;
|
|
41
|
+
getAttrs(dom: Node | string): {
|
|
42
|
+
id?: string | undefined;
|
|
43
|
+
class?: string | undefined;
|
|
44
|
+
rel?: string | undefined;
|
|
45
|
+
target?: string | undefined;
|
|
46
|
+
rawHTML?: string | undefined;
|
|
47
|
+
linkUrl: string;
|
|
48
|
+
title: string;
|
|
49
|
+
};
|
|
50
|
+
}[];
|
|
51
|
+
toDOM: ({ attrs }: ProsemirrorMark) => DOMOutputSpec;
|
|
52
|
+
};
|
|
53
|
+
private addLink;
|
|
54
|
+
private toggleLink;
|
|
55
|
+
commands(): {
|
|
56
|
+
addLink: EditorCommand<import("@t/spec").DefaultPayload>;
|
|
57
|
+
toggleLink: EditorCommand<import("@t/spec").DefaultPayload>;
|
|
58
|
+
};
|
|
59
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Mark as ProsemirrorMark, DOMOutputSpec } from 'prosemirror-model';
|
|
2
|
+
import Mark from '@/spec/mark';
|
|
3
|
+
import { EditorCommand } from '@t/spec';
|
|
4
|
+
export declare class Strike extends Mark {
|
|
5
|
+
get name(): string;
|
|
6
|
+
get schema(): {
|
|
7
|
+
attrs: {
|
|
8
|
+
htmlAttrs: {
|
|
9
|
+
default: any;
|
|
10
|
+
};
|
|
11
|
+
classNames: {
|
|
12
|
+
default: string[] | null;
|
|
13
|
+
};
|
|
14
|
+
rawHTML: {
|
|
15
|
+
default: null;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
parseDOM: {
|
|
19
|
+
tag: string;
|
|
20
|
+
getAttrs(dom: Node | string): {
|
|
21
|
+
rawHTML?: string | undefined;
|
|
22
|
+
};
|
|
23
|
+
}[];
|
|
24
|
+
toDOM({ attrs }: ProsemirrorMark): DOMOutputSpec;
|
|
25
|
+
};
|
|
26
|
+
commands(): EditorCommand;
|
|
27
|
+
keymaps(): {
|
|
28
|
+
'Mod-s': import("prosemirror-state").Command;
|
|
29
|
+
'Mod-S': import("prosemirror-state").Command;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Mark as ProsemirrorMark, DOMOutputSpec } from 'prosemirror-model';
|
|
2
|
+
import Mark from '@/spec/mark';
|
|
3
|
+
import { EditorCommand } from '@t/spec';
|
|
4
|
+
export declare class Strong extends Mark {
|
|
5
|
+
get name(): string;
|
|
6
|
+
get schema(): {
|
|
7
|
+
attrs: {
|
|
8
|
+
htmlAttrs: {
|
|
9
|
+
default: any;
|
|
10
|
+
};
|
|
11
|
+
classNames: {
|
|
12
|
+
default: string[] | null;
|
|
13
|
+
};
|
|
14
|
+
rawHTML: {
|
|
15
|
+
default: null;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
parseDOM: {
|
|
19
|
+
tag: string;
|
|
20
|
+
getAttrs(dom: Node | string): {
|
|
21
|
+
rawHTML?: string | undefined;
|
|
22
|
+
};
|
|
23
|
+
}[];
|
|
24
|
+
toDOM({ attrs }: ProsemirrorMark): DOMOutputSpec;
|
|
25
|
+
};
|
|
26
|
+
private bold;
|
|
27
|
+
commands(): {
|
|
28
|
+
bold: EditorCommand<import("@t/spec").DefaultPayload>;
|
|
29
|
+
};
|
|
30
|
+
keymaps(): {
|
|
31
|
+
'Mod-b': import("prosemirror-state").Command;
|
|
32
|
+
'Mod-B': import("prosemirror-state").Command;
|
|
33
|
+
};
|
|
34
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { DOMOutputSpec, ProsemirrorNode } from 'prosemirror-model';
|
|
2
|
+
import NodeSchema from '@/spec/node';
|
|
3
|
+
import { EditorCommand } from '@t/spec';
|
|
4
|
+
export declare class BlockQuote extends NodeSchema {
|
|
5
|
+
get name(): string;
|
|
6
|
+
get schema(): {
|
|
7
|
+
attrs: {
|
|
8
|
+
htmlAttrs: {
|
|
9
|
+
default: any;
|
|
10
|
+
};
|
|
11
|
+
classNames: {
|
|
12
|
+
default: string[] | null;
|
|
13
|
+
};
|
|
14
|
+
rawHTML: {
|
|
15
|
+
default: null;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
content: string;
|
|
19
|
+
group: string;
|
|
20
|
+
parseDOM: {
|
|
21
|
+
tag: string;
|
|
22
|
+
getAttrs(dom: string | Node): {
|
|
23
|
+
rawHTML?: string | undefined;
|
|
24
|
+
};
|
|
25
|
+
}[];
|
|
26
|
+
toDOM({ attrs }: ProsemirrorNode): DOMOutputSpec;
|
|
27
|
+
};
|
|
28
|
+
commands(): EditorCommand;
|
|
29
|
+
keymaps(): {
|
|
30
|
+
'Alt-q': import("prosemirror-state").Command;
|
|
31
|
+
'Alt-Q': import("prosemirror-state").Command;
|
|
32
|
+
};
|
|
33
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { DOMOutputSpec, ProsemirrorNode } from 'prosemirror-model';
|
|
2
|
+
import NodeSchema from '@/spec/node';
|
|
3
|
+
import { toggleTask } from '@/wysiwyg/command/list';
|
|
4
|
+
import { Command } from 'prosemirror-state';
|
|
5
|
+
export declare class BulletList extends NodeSchema {
|
|
6
|
+
get name(): string;
|
|
7
|
+
get schema(): {
|
|
8
|
+
content: string;
|
|
9
|
+
group: string;
|
|
10
|
+
attrs: {
|
|
11
|
+
htmlAttrs: {
|
|
12
|
+
default: any;
|
|
13
|
+
};
|
|
14
|
+
classNames: {
|
|
15
|
+
default: string[] | null;
|
|
16
|
+
};
|
|
17
|
+
rawHTML: {
|
|
18
|
+
default: null;
|
|
19
|
+
};
|
|
20
|
+
bullet: {
|
|
21
|
+
default: null;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
parseDOM: {
|
|
25
|
+
tag: string;
|
|
26
|
+
getAttrs(dom: string | Node): {
|
|
27
|
+
rawHTML?: string | undefined;
|
|
28
|
+
};
|
|
29
|
+
}[];
|
|
30
|
+
toDOM({ attrs }: ProsemirrorNode): DOMOutputSpec;
|
|
31
|
+
};
|
|
32
|
+
private changeList;
|
|
33
|
+
commands(): {
|
|
34
|
+
bulletList: () => Command;
|
|
35
|
+
taskList: typeof toggleTask;
|
|
36
|
+
};
|
|
37
|
+
keymaps(): {
|
|
38
|
+
'Mod-u': Command;
|
|
39
|
+
'Mod-U': Command;
|
|
40
|
+
Tab: Command;
|
|
41
|
+
'Shift-Tab': Command;
|
|
42
|
+
};
|
|
43
|
+
}
|