vditor 3.8.7
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/CHANGELOG.md +1072 -0
- package/LICENSE +21 -0
- package/README.md +649 -0
- package/dist/css/content-theme/ant-design.css +210 -0
- package/dist/css/content-theme/dark.css +123 -0
- package/dist/css/content-theme/light.css +101 -0
- package/dist/css/content-theme/wechat.css +94 -0
- package/dist/images/.DS_Store +0 -0
- package/dist/images/emoji/b3log.png +0 -0
- package/dist/images/emoji/chainbook.png +0 -0
- package/dist/images/emoji/doge.png +0 -0
- package/dist/images/emoji/hacpai.png +0 -0
- package/dist/images/emoji/huaji.gif +0 -0
- package/dist/images/emoji/latke.png +0 -0
- package/dist/images/emoji/lute.png +0 -0
- package/dist/images/emoji/octocat.png +0 -0
- package/dist/images/emoji/pipe.png +0 -0
- package/dist/images/emoji/solo.png +0 -0
- package/dist/images/emoji/sym.png +0 -0
- package/dist/images/emoji/trollface.png +0 -0
- package/dist/images/emoji/vditor.png +0 -0
- package/dist/images/emoji/wide.png +0 -0
- package/dist/images/emoji/wulian.png +0 -0
- package/dist/images/img-loading.svg +1 -0
- package/dist/images/logo.png +0 -0
- package/dist/index.css +28 -0
- package/dist/index.d.ts +75 -0
- package/dist/index.min.js +15353 -0
- package/dist/js/.DS_Store +0 -0
- package/dist/js/abcjs/abcjs_basic.min.js +3 -0
- package/dist/js/echarts/echarts.min.js +23 -0
- package/dist/js/flowchart.js/flowchart.min.js +9 -0
- package/dist/js/graphviz/full.render.js +90 -0
- package/dist/js/graphviz/viz.js +333 -0
- package/dist/js/highlight.js/highlight.pack.js +1617 -0
- package/dist/js/highlight.js/styles/abap.css +155 -0
- package/dist/js/highlight.js/styles/algol.css +142 -0
- package/dist/js/highlight.js/styles/algol_nu.css +90 -0
- package/dist/js/highlight.js/styles/ant-design.css +469 -0
- package/dist/js/highlight.js/styles/arduino.css +155 -0
- package/dist/js/highlight.js/styles/autumn.css +136 -0
- package/dist/js/highlight.js/styles/borland.css +146 -0
- package/dist/js/highlight.js/styles/bw.css +149 -0
- package/dist/js/highlight.js/styles/colorful.css +156 -0
- package/dist/js/highlight.js/styles/dracula.css +139 -0
- package/dist/js/highlight.js/styles/emacs.css +166 -0
- package/dist/js/highlight.js/styles/friendly.css +182 -0
- package/dist/js/highlight.js/styles/fruity.css +121 -0
- package/dist/js/highlight.js/styles/github.css +173 -0
- package/dist/js/highlight.js/styles/igor.css +122 -0
- package/dist/js/highlight.js/styles/lovelace.css +145 -0
- package/dist/js/highlight.js/styles/manni.css +138 -0
- package/dist/js/highlight.js/styles/monokai.css +131 -0
- package/dist/js/highlight.js/styles/monokailight.css +179 -0
- package/dist/js/highlight.js/styles/murphy.css +144 -0
- package/dist/js/highlight.js/styles/native.css +163 -0
- package/dist/js/highlight.js/styles/paraiso-dark.css +136 -0
- package/dist/js/highlight.js/styles/paraiso-light.css +135 -0
- package/dist/js/highlight.js/styles/pastie.css +180 -0
- package/dist/js/highlight.js/styles/perldoc.css +140 -0
- package/dist/js/highlight.js/styles/pygments.css +158 -0
- package/dist/js/highlight.js/styles/rainbow_dash.css +163 -0
- package/dist/js/highlight.js/styles/rrt.css +158 -0
- package/dist/js/highlight.js/styles/solarized-dark.css +145 -0
- package/dist/js/highlight.js/styles/solarized-dark256.css +145 -0
- package/dist/js/highlight.js/styles/solarized-light.css +162 -0
- package/dist/js/highlight.js/styles/swapoff.css +144 -0
- package/dist/js/highlight.js/styles/tango.css +183 -0
- package/dist/js/highlight.js/styles/trac.css +166 -0
- package/dist/js/highlight.js/styles/vim.css +143 -0
- package/dist/js/highlight.js/styles/vs.css +112 -0
- package/dist/js/highlight.js/styles/xcode.css +173 -0
- package/dist/js/i18n/en_US.js +85 -0
- package/dist/js/i18n/ja_JP.js +85 -0
- package/dist/js/i18n/ko_KR.js +85 -0
- package/dist/js/i18n/ru_RU.js +85 -0
- package/dist/js/i18n/zh_CN.js +85 -0
- package/dist/js/i18n/zh_TW.js +85 -0
- package/dist/js/icons/ant.js +174 -0
- package/dist/js/icons/material.js +195 -0
- package/dist/js/katex/fonts/KaTeX_AMS-Regular.ttf +0 -0
- package/dist/js/katex/fonts/KaTeX_AMS-Regular.woff +0 -0
- package/dist/js/katex/fonts/KaTeX_AMS-Regular.woff2 +0 -0
- package/dist/js/katex/fonts/KaTeX_Caligraphic-Bold.ttf +0 -0
- package/dist/js/katex/fonts/KaTeX_Caligraphic-Bold.woff +0 -0
- package/dist/js/katex/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
- package/dist/js/katex/fonts/KaTeX_Caligraphic-Regular.ttf +0 -0
- package/dist/js/katex/fonts/KaTeX_Caligraphic-Regular.woff +0 -0
- package/dist/js/katex/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
- package/dist/js/katex/fonts/KaTeX_Fraktur-Bold.ttf +0 -0
- package/dist/js/katex/fonts/KaTeX_Fraktur-Bold.woff +0 -0
- package/dist/js/katex/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
- package/dist/js/katex/fonts/KaTeX_Fraktur-Regular.ttf +0 -0
- package/dist/js/katex/fonts/KaTeX_Fraktur-Regular.woff +0 -0
- package/dist/js/katex/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
- package/dist/js/katex/fonts/KaTeX_Main-Bold.ttf +0 -0
- package/dist/js/katex/fonts/KaTeX_Main-Bold.woff +0 -0
- package/dist/js/katex/fonts/KaTeX_Main-Bold.woff2 +0 -0
- package/dist/js/katex/fonts/KaTeX_Main-BoldItalic.ttf +0 -0
- package/dist/js/katex/fonts/KaTeX_Main-BoldItalic.woff +0 -0
- package/dist/js/katex/fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
- package/dist/js/katex/fonts/KaTeX_Main-Italic.ttf +0 -0
- package/dist/js/katex/fonts/KaTeX_Main-Italic.woff +0 -0
- package/dist/js/katex/fonts/KaTeX_Main-Italic.woff2 +0 -0
- package/dist/js/katex/fonts/KaTeX_Main-Regular.ttf +0 -0
- package/dist/js/katex/fonts/KaTeX_Main-Regular.woff +0 -0
- package/dist/js/katex/fonts/KaTeX_Main-Regular.woff2 +0 -0
- package/dist/js/katex/fonts/KaTeX_Math-BoldItalic.ttf +0 -0
- package/dist/js/katex/fonts/KaTeX_Math-BoldItalic.woff +0 -0
- package/dist/js/katex/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
- package/dist/js/katex/fonts/KaTeX_Math-Italic.ttf +0 -0
- package/dist/js/katex/fonts/KaTeX_Math-Italic.woff +0 -0
- package/dist/js/katex/fonts/KaTeX_Math-Italic.woff2 +0 -0
- package/dist/js/katex/fonts/KaTeX_SansSerif-Bold.ttf +0 -0
- package/dist/js/katex/fonts/KaTeX_SansSerif-Bold.woff +0 -0
- package/dist/js/katex/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
- package/dist/js/katex/fonts/KaTeX_SansSerif-Italic.ttf +0 -0
- package/dist/js/katex/fonts/KaTeX_SansSerif-Italic.woff +0 -0
- package/dist/js/katex/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
- package/dist/js/katex/fonts/KaTeX_SansSerif-Regular.ttf +0 -0
- package/dist/js/katex/fonts/KaTeX_SansSerif-Regular.woff +0 -0
- package/dist/js/katex/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
- package/dist/js/katex/fonts/KaTeX_Script-Regular.ttf +0 -0
- package/dist/js/katex/fonts/KaTeX_Script-Regular.woff +0 -0
- package/dist/js/katex/fonts/KaTeX_Script-Regular.woff2 +0 -0
- package/dist/js/katex/fonts/KaTeX_Size1-Regular.ttf +0 -0
- package/dist/js/katex/fonts/KaTeX_Size1-Regular.woff +0 -0
- package/dist/js/katex/fonts/KaTeX_Size1-Regular.woff2 +0 -0
- package/dist/js/katex/fonts/KaTeX_Size2-Regular.ttf +0 -0
- package/dist/js/katex/fonts/KaTeX_Size2-Regular.woff +0 -0
- package/dist/js/katex/fonts/KaTeX_Size2-Regular.woff2 +0 -0
- package/dist/js/katex/fonts/KaTeX_Size3-Regular.ttf +0 -0
- package/dist/js/katex/fonts/KaTeX_Size3-Regular.woff +0 -0
- package/dist/js/katex/fonts/KaTeX_Size3-Regular.woff2 +0 -0
- package/dist/js/katex/fonts/KaTeX_Size4-Regular.ttf +0 -0
- package/dist/js/katex/fonts/KaTeX_Size4-Regular.woff +0 -0
- package/dist/js/katex/fonts/KaTeX_Size4-Regular.woff2 +0 -0
- package/dist/js/katex/fonts/KaTeX_Typewriter-Regular.ttf +0 -0
- package/dist/js/katex/fonts/KaTeX_Typewriter-Regular.woff +0 -0
- package/dist/js/katex/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
- package/dist/js/katex/katex.min.css +1 -0
- package/dist/js/katex/katex.min.js +2 -0
- package/dist/js/lute/.DS_Store +0 -0
- package/dist/js/lute/lute.min.js +46 -0
- package/dist/js/mathjax/.DS_Store +0 -0
- package/dist/js/mathjax/LICENSE +202 -0
- package/dist/js/mathjax/a11y/assistive-mml.js +1 -0
- package/dist/js/mathjax/a11y/complexity.js +1 -0
- package/dist/js/mathjax/a11y/explorer.js +1 -0
- package/dist/js/mathjax/a11y/semantic-enrich.js +1 -0
- package/dist/js/mathjax/input/asciimath.js +1 -0
- package/dist/js/mathjax/input/mml/entities.js +1 -0
- package/dist/js/mathjax/input/mml.js +1 -0
- package/dist/js/mathjax/input/tex/extensions/action.js +1 -0
- package/dist/js/mathjax/input/tex/extensions/all-packages.js +1 -0
- package/dist/js/mathjax/input/tex/extensions/ams.js +1 -0
- package/dist/js/mathjax/input/tex/extensions/amscd.js +1 -0
- package/dist/js/mathjax/input/tex/extensions/autoload.js +1 -0
- package/dist/js/mathjax/input/tex/extensions/bbox.js +1 -0
- package/dist/js/mathjax/input/tex/extensions/boldsymbol.js +1 -0
- package/dist/js/mathjax/input/tex/extensions/braket.js +1 -0
- package/dist/js/mathjax/input/tex/extensions/bussproofs.js +1 -0
- package/dist/js/mathjax/input/tex/extensions/cancel.js +1 -0
- package/dist/js/mathjax/input/tex/extensions/color.js +1 -0
- package/dist/js/mathjax/input/tex/extensions/colorV2.js +1 -0
- package/dist/js/mathjax/input/tex/extensions/configMacros.js +1 -0
- package/dist/js/mathjax/input/tex/extensions/enclose.js +1 -0
- package/dist/js/mathjax/input/tex/extensions/extpfeil.js +1 -0
- package/dist/js/mathjax/input/tex/extensions/html.js +1 -0
- package/dist/js/mathjax/input/tex/extensions/mhchem.js +1 -0
- package/dist/js/mathjax/input/tex/extensions/newcommand.js +1 -0
- package/dist/js/mathjax/input/tex/extensions/noerrors.js +1 -0
- package/dist/js/mathjax/input/tex/extensions/noundefined.js +1 -0
- package/dist/js/mathjax/input/tex/extensions/physics.js +1 -0
- package/dist/js/mathjax/input/tex/extensions/require.js +1 -0
- package/dist/js/mathjax/input/tex/extensions/tagFormat.js +1 -0
- package/dist/js/mathjax/input/tex/extensions/textmacros.js +1 -0
- package/dist/js/mathjax/input/tex/extensions/unicode.js +1 -0
- package/dist/js/mathjax/input/tex/extensions/verb.js +1 -0
- package/dist/js/mathjax/input/tex-base.js +1 -0
- package/dist/js/mathjax/input/tex-full.js +1 -0
- package/dist/js/mathjax/input/tex.js +1 -0
- package/dist/js/mathjax/sre/mathmaps/de.js +104 -0
- package/dist/js/mathjax/sre/mathmaps/en.js +110 -0
- package/dist/js/mathjax/sre/mathmaps/es.js +104 -0
- package/dist/js/mathjax/sre/mathmaps/fr.js +104 -0
- package/dist/js/mathjax/sre/mathmaps/mathmaps_ie.js +518 -0
- package/dist/js/mathjax/sre/mathmaps/nemeth.js +104 -0
- package/dist/js/mathjax/sre/sre-node.js +11 -0
- package/dist/js/mathjax/sre/sre_browser.js +1633 -0
- package/dist/js/mathjax/tex-svg-full.js +1 -0
- package/dist/js/mermaid/mermaid.min.js +32 -0
- package/dist/js/plantuml/plantuml-encoder.min.js +1 -0
- package/dist/method.d.ts +48 -0
- package/dist/method.min.js +2346 -0
- package/dist/ts/constants.d.ts +43 -0
- package/dist/ts/devtools/index.d.ts +7 -0
- package/dist/ts/export/index.d.ts +5 -0
- package/dist/ts/hint/index.d.ts +14 -0
- package/dist/ts/ir/expandMarker.d.ts +2 -0
- package/dist/ts/ir/highlightToolbarIR.d.ts +2 -0
- package/dist/ts/ir/index.d.ts +13 -0
- package/dist/ts/ir/input.d.ts +2 -0
- package/dist/ts/ir/process.d.ts +9 -0
- package/dist/ts/ir/processKeydown.d.ts +2 -0
- package/dist/ts/markdown/abcRender.d.ts +1 -0
- package/dist/ts/markdown/adapterRender.d.ts +33 -0
- package/dist/ts/markdown/anchorRender.d.ts +1 -0
- package/dist/ts/markdown/chartRender.d.ts +1 -0
- package/dist/ts/markdown/codeRender.d.ts +1 -0
- package/dist/ts/markdown/flowchartRender.d.ts +1 -0
- package/dist/ts/markdown/getHTML.d.ts +2 -0
- package/dist/ts/markdown/getMarkdown.d.ts +2 -0
- package/dist/ts/markdown/graphvizRender.d.ts +1 -0
- package/dist/ts/markdown/highlightRender.d.ts +2 -0
- package/dist/ts/markdown/lazyLoadImageRender.d.ts +6 -0
- package/dist/ts/markdown/mathRender.d.ts +10 -0
- package/dist/ts/markdown/mediaRender.d.ts +1 -0
- package/dist/ts/markdown/mermaidRender.d.ts +1 -0
- package/dist/ts/markdown/mindmapRender.d.ts +1 -0
- package/dist/ts/markdown/outlineRender.d.ts +2 -0
- package/dist/ts/markdown/plantumlRender.d.ts +1 -0
- package/dist/ts/markdown/previewRender.d.ts +3 -0
- package/dist/ts/markdown/setLute.d.ts +2 -0
- package/dist/ts/markdown/speechRender.d.ts +7 -0
- package/dist/ts/outline/index.d.ts +7 -0
- package/dist/ts/preview/image.d.ts +2 -0
- package/dist/ts/preview/index.d.ts +9 -0
- package/dist/ts/resize/index.d.ts +6 -0
- package/dist/ts/sv/index.d.ts +13 -0
- package/dist/ts/sv/inputEvent.d.ts +2 -0
- package/dist/ts/sv/process.d.ts +12 -0
- package/dist/ts/sv/processKeydown.d.ts +2 -0
- package/dist/ts/tip/index.d.ts +6 -0
- package/dist/ts/toolbar/Both.d.ts +5 -0
- package/dist/ts/toolbar/Br.d.ts +4 -0
- package/dist/ts/toolbar/CodeTheme.d.ts +6 -0
- package/dist/ts/toolbar/ContentTheme.d.ts +6 -0
- package/dist/ts/toolbar/Counter.d.ts +6 -0
- package/dist/ts/toolbar/Custom.d.ts +5 -0
- package/dist/ts/toolbar/Devtools.d.ts +5 -0
- package/dist/ts/toolbar/Divider.d.ts +4 -0
- package/dist/ts/toolbar/EditMode.d.ts +8 -0
- package/dist/ts/toolbar/Emoji.d.ts +7 -0
- package/dist/ts/toolbar/Export.d.ts +6 -0
- package/dist/ts/toolbar/Fullscreen.d.ts +6 -0
- package/dist/ts/toolbar/Headings.d.ts +7 -0
- package/dist/ts/toolbar/Help.d.ts +5 -0
- package/dist/ts/toolbar/Indent.d.ts +5 -0
- package/dist/ts/toolbar/Info.d.ts +5 -0
- package/dist/ts/toolbar/InsertAfter.d.ts +5 -0
- package/dist/ts/toolbar/InsertBefore.d.ts +5 -0
- package/dist/ts/toolbar/MenuItem.d.ts +5 -0
- package/dist/ts/toolbar/Outdent.d.ts +5 -0
- package/dist/ts/toolbar/Outline.d.ts +5 -0
- package/dist/ts/toolbar/Preview.d.ts +6 -0
- package/dist/ts/toolbar/Record.d.ts +6 -0
- package/dist/ts/toolbar/Redo.d.ts +5 -0
- package/dist/ts/toolbar/Undo.d.ts +5 -0
- package/dist/ts/toolbar/Upload.d.ts +6 -0
- package/dist/ts/toolbar/index.d.ts +9 -0
- package/dist/ts/toolbar/setToolbar.d.ts +21 -0
- package/dist/ts/ui/initUI.d.ts +9 -0
- package/dist/ts/ui/setCodeTheme.d.ts +1 -0
- package/dist/ts/ui/setContentTheme.d.ts +1 -0
- package/dist/ts/ui/setPreviewMode.d.ts +2 -0
- package/dist/ts/ui/setTheme.d.ts +2 -0
- package/dist/ts/undo/index.d.ts +19 -0
- package/dist/ts/upload/getElement.d.ts +2 -0
- package/dist/ts/upload/index.d.ts +9 -0
- package/dist/ts/upload/setHeaders.d.ts +2 -0
- package/dist/ts/util/Options.d.ts +8 -0
- package/dist/ts/util/RecordMedia.d.ts +18 -0
- package/dist/ts/util/addScript.d.ts +2 -0
- package/dist/ts/util/addStyle.d.ts +1 -0
- package/dist/ts/util/code160to32.d.ts +1 -0
- package/dist/ts/util/compatibility.d.ts +7 -0
- package/dist/ts/util/editorCommonEvent.d.ts +10 -0
- package/dist/ts/util/fixBrowserBehavior.d.ts +40 -0
- package/dist/ts/util/getSelectText.d.ts +1 -0
- package/dist/ts/util/hasClosest.d.ts +9 -0
- package/dist/ts/util/hasClosestByHeadings.d.ts +2 -0
- package/dist/ts/util/highlightToolbar.d.ts +2 -0
- package/dist/ts/util/hotKey.d.ts +1 -0
- package/dist/ts/util/log.d.ts +1 -0
- package/dist/ts/util/merge.d.ts +1 -0
- package/dist/ts/util/processCode.d.ts +3 -0
- package/dist/ts/util/selection.d.ts +15 -0
- package/dist/ts/util/toc.d.ts +6 -0
- package/dist/ts/wysiwyg/afterRenderEvent.d.ts +6 -0
- package/dist/ts/wysiwyg/highlightToolbarWYSIWYG.d.ts +5 -0
- package/dist/ts/wysiwyg/index.d.ts +20 -0
- package/dist/ts/wysiwyg/inlineTag.d.ts +11 -0
- package/dist/ts/wysiwyg/input.d.ts +2 -0
- package/dist/ts/wysiwyg/processKeydown.d.ts +3 -0
- package/dist/ts/wysiwyg/renderDomByMd.d.ts +6 -0
- package/dist/ts/wysiwyg/setHeading.d.ts +3 -0
- package/dist/ts/wysiwyg/showCode.d.ts +2 -0
- package/dist/ts/wysiwyg/toolbarEvent.d.ts +2 -0
- package/dist/types/index.d.ts +772 -0
- package/package.json +69 -0
- package/src/assets/.DS_Store +0 -0
- package/src/assets/scss/_content.scss +284 -0
- package/src/assets/scss/_hint.scss +67 -0
- package/src/assets/scss/_ir.scss +275 -0
- package/src/assets/scss/_panel.scss +110 -0
- package/src/assets/scss/_reset.scss +603 -0
- package/src/assets/scss/_sv.scss +133 -0
- package/src/assets/scss/_toolbar.scss +180 -0
- package/src/assets/scss/_tooltipped.scss +171 -0
- package/src/assets/scss/_wysiwyg.scss +195 -0
- package/src/assets/scss/index.scss +83 -0
- package/src/index.ts +502 -0
- package/src/method.ts +65 -0
- package/src/ts/.DS_Store +0 -0
- package/src/ts/constants.ts +64 -0
- package/src/ts/devtools/index.ts +83 -0
- package/src/ts/export/index.ts +81 -0
- package/src/ts/hint/index.ts +267 -0
- package/src/ts/ir/expandMarker.ts +79 -0
- package/src/ts/ir/highlightToolbarIR.ts +97 -0
- package/src/ts/ir/index.ts +251 -0
- package/src/ts/ir/input.ts +231 -0
- package/src/ts/ir/process.ts +220 -0
- package/src/ts/ir/processKeydown.ts +238 -0
- package/src/ts/markdown/abcRender.ts +27 -0
- package/src/ts/markdown/adapterRender.ts +33 -0
- package/src/ts/markdown/anchorRender.ts +19 -0
- package/src/ts/markdown/chartRender.ts +37 -0
- package/src/ts/markdown/codeRender.ts +50 -0
- package/src/ts/markdown/flowchartRender.ts +25 -0
- package/src/ts/markdown/getHTML.ts +11 -0
- package/src/ts/markdown/getMarkdown.ts +12 -0
- package/src/ts/markdown/graphvizRender.ts +49 -0
- package/src/ts/markdown/highlightRender.ts +82 -0
- package/src/ts/markdown/lazyLoadImageRender.ts +56 -0
- package/src/ts/markdown/mathRender.ts +142 -0
- package/src/ts/markdown/mediaRender.ts +78 -0
- package/src/ts/markdown/mermaidRender.ts +127 -0
- package/src/ts/markdown/mindmapRender.ts +74 -0
- package/src/ts/markdown/outlineRender.ts +106 -0
- package/src/ts/markdown/plantumlRender.ts +32 -0
- package/src/ts/markdown/previewRender.ts +143 -0
- package/src/ts/markdown/setLute.ts +23 -0
- package/src/ts/markdown/speechRender.ts +97 -0
- package/src/ts/outline/index.ts +47 -0
- package/src/ts/preview/image.ts +50 -0
- package/src/ts/preview/index.ts +266 -0
- package/src/ts/resize/index.ts +57 -0
- package/src/ts/sv/index.ts +119 -0
- package/src/ts/sv/inputEvent.ts +207 -0
- package/src/ts/sv/process.ts +210 -0
- package/src/ts/sv/processKeydown.ts +196 -0
- package/src/ts/tip/index.ts +31 -0
- package/src/ts/toolbar/Both.ts +28 -0
- package/src/ts/toolbar/Br.ts +8 -0
- package/src/ts/toolbar/CodeTheme.ts +36 -0
- package/src/ts/toolbar/ContentTheme.ts +35 -0
- package/src/ts/toolbar/Counter.ts +40 -0
- package/src/ts/toolbar/Custom.ts +17 -0
- package/src/ts/toolbar/Devtools.ts +28 -0
- package/src/ts/toolbar/Divider.ts +8 -0
- package/src/ts/toolbar/EditMode.ts +193 -0
- package/src/ts/toolbar/Emoji.ts +75 -0
- package/src/ts/toolbar/Export.ts +41 -0
- package/src/ts/toolbar/Fullscreen.ts +61 -0
- package/src/ts/toolbar/Headings.ts +69 -0
- package/src/ts/toolbar/Help.ts +30 -0
- package/src/ts/toolbar/Indent.ts +25 -0
- package/src/ts/toolbar/Info.ts +43 -0
- package/src/ts/toolbar/InsertAfter.ts +18 -0
- package/src/ts/toolbar/InsertBefore.ts +18 -0
- package/src/ts/toolbar/MenuItem.ts +54 -0
- package/src/ts/toolbar/Outdent.ts +24 -0
- package/src/ts/toolbar/Outline.ts +21 -0
- package/src/ts/toolbar/Preview.ts +55 -0
- package/src/ts/toolbar/Record.ts +60 -0
- package/src/ts/toolbar/Redo.ts +18 -0
- package/src/ts/toolbar/Undo.ts +18 -0
- package/src/ts/toolbar/Upload.ts +41 -0
- package/src/ts/toolbar/index.ts +175 -0
- package/src/ts/toolbar/setToolbar.ts +120 -0
- package/src/ts/ui/initUI.ts +164 -0
- package/src/ts/ui/setCodeTheme.ts +16 -0
- package/src/ts/ui/setContentTheme.ts +15 -0
- package/src/ts/ui/setPreviewMode.ts +31 -0
- package/src/ts/ui/setTheme.ts +7 -0
- package/src/ts/undo/index.ts +255 -0
- package/src/ts/upload/getElement.ts +10 -0
- package/src/ts/upload/index.ts +257 -0
- package/src/ts/upload/setHeaders.ts +10 -0
- package/src/ts/util/Options.ts +429 -0
- package/src/ts/util/RecordMedia.ts +170 -0
- package/src/ts/util/addScript.ts +40 -0
- package/src/ts/util/addStyle.ts +10 -0
- package/src/ts/util/code160to32.ts +4 -0
- package/src/ts/util/compatibility.ts +67 -0
- package/src/ts/util/editorCommonEvent.ts +254 -0
- package/src/ts/util/fixBrowserBehavior.ts +1459 -0
- package/src/ts/util/getSelectText.ts +8 -0
- package/src/ts/util/hasClosest.ts +154 -0
- package/src/ts/util/hasClosestByHeadings.ts +27 -0
- package/src/ts/util/highlightToolbar.ts +10 -0
- package/src/ts/util/hotKey.ts +54 -0
- package/src/ts/util/log.ts +6 -0
- package/src/ts/util/merge.ts +18 -0
- package/src/ts/util/processCode.ts +90 -0
- package/src/ts/util/selection.ts +275 -0
- package/src/ts/util/toc.ts +83 -0
- package/src/ts/wysiwyg/afterRenderEvent.ts +41 -0
- package/src/ts/wysiwyg/highlightToolbarWYSIWYG.ts +1105 -0
- package/src/ts/wysiwyg/index.ts +547 -0
- package/src/ts/wysiwyg/inlineTag.ts +129 -0
- package/src/ts/wysiwyg/input.ts +210 -0
- package/src/ts/wysiwyg/processKeydown.ts +363 -0
- package/src/ts/wysiwyg/renderDomByMd.ts +18 -0
- package/src/ts/wysiwyg/setHeading.ts +43 -0
- package/src/ts/wysiwyg/showCode.ts +32 -0
- package/src/ts/wysiwyg/toolbarEvent.ts +333 -0
package/package.json
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "vditor",
|
|
3
|
+
"version": "3.8.7",
|
|
4
|
+
"description": "♏ 易于使用的 Markdown 编辑器,为适配不同的应用场景而生",
|
|
5
|
+
"author": "Vanessa <v@b3log.org> (http://vanessa.b3log.org)",
|
|
6
|
+
"homepage": "https://b3log.org/vditor",
|
|
7
|
+
"jsdelivr": "dist/index.min.js",
|
|
8
|
+
"main": "dist/index.min.js",
|
|
9
|
+
"funding": "https://ld246.com/sponsor",
|
|
10
|
+
"files": [
|
|
11
|
+
"dist/*",
|
|
12
|
+
"src/index.ts",
|
|
13
|
+
"src/method.ts",
|
|
14
|
+
"src/ts/*",
|
|
15
|
+
"src/assets/*"
|
|
16
|
+
],
|
|
17
|
+
"dependencies": {
|
|
18
|
+
"diff-match-patch": "^1.0.5"
|
|
19
|
+
},
|
|
20
|
+
"types": "dist/index.d.ts",
|
|
21
|
+
"devDependencies": {
|
|
22
|
+
"@babel/core": "^7.14.2",
|
|
23
|
+
"@babel/preset-env": "^7.14.2",
|
|
24
|
+
"@types/diff-match-patch": "^1.0.32",
|
|
25
|
+
"@types/jest": "^26.0.23",
|
|
26
|
+
"@types/puppeteer": "^2.1.5",
|
|
27
|
+
"autoprefixer": "^9.8.6",
|
|
28
|
+
"babel-loader": "^8.2.2",
|
|
29
|
+
"clean-webpack-plugin": "^4.0.0-alpha.0",
|
|
30
|
+
"copy-webpack-plugin": "^6.4.1",
|
|
31
|
+
"css-loader": "^5.2.4",
|
|
32
|
+
"file-loader": "^4.3.0",
|
|
33
|
+
"html-webpack-plugin": "^5.3.1",
|
|
34
|
+
"identity-obj-proxy": "^3.0.0",
|
|
35
|
+
"jest": "^26.6.3",
|
|
36
|
+
"mini-css-extract-plugin": "^0.8.2",
|
|
37
|
+
"node-sass": "^6.0.1",
|
|
38
|
+
"postcss-loader": "^5.2.0",
|
|
39
|
+
"puppeteer": "^1.20.0",
|
|
40
|
+
"sass-loader": "^10.2.0",
|
|
41
|
+
"style-loader": "^1.3.0",
|
|
42
|
+
"terser-webpack-plugin": "^5.1.2",
|
|
43
|
+
"ts-jest": "^26.5.6",
|
|
44
|
+
"ts-loader": "^6.2.2",
|
|
45
|
+
"tslint": "^5.20.1",
|
|
46
|
+
"typescript": "^3.9.9",
|
|
47
|
+
"webpack": "^5.37.0",
|
|
48
|
+
"webpack-bundle-analyzer": "^3.9.0",
|
|
49
|
+
"webpack-cli": "^4.7.0",
|
|
50
|
+
"webpack-dev-server": "^4.1.0"
|
|
51
|
+
},
|
|
52
|
+
"license": "MIT",
|
|
53
|
+
"repository": "git://github.com/Vanessa219/vditor.git",
|
|
54
|
+
"bugs": {
|
|
55
|
+
"url": "https://github.com/Vanessa219/vditor/issues"
|
|
56
|
+
},
|
|
57
|
+
"scripts": {
|
|
58
|
+
"lint": "tslint --fix -c tslint.json '{src,types}/**/*.ts'",
|
|
59
|
+
"test:watch": "jest --watch",
|
|
60
|
+
"test": "jest --coverage",
|
|
61
|
+
"start": "webpack serve --config webpack.start.js",
|
|
62
|
+
"build": "webpack"
|
|
63
|
+
},
|
|
64
|
+
"keywords": [
|
|
65
|
+
"editor",
|
|
66
|
+
"markdown",
|
|
67
|
+
"b3log"
|
|
68
|
+
]
|
|
69
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
@keyframes slideInDown {
|
|
2
|
+
from {
|
|
3
|
+
transform: translate3d(0, -100%, 0);
|
|
4
|
+
visibility: visible;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
to {
|
|
8
|
+
transform: translate3d(0, 0, 0);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.vditor {
|
|
13
|
+
display: flex;
|
|
14
|
+
flex-direction: column;
|
|
15
|
+
border: 1px solid var(--border-color);
|
|
16
|
+
border-radius: 3px;
|
|
17
|
+
box-sizing: border-box;
|
|
18
|
+
font-family: $font-family-base;
|
|
19
|
+
|
|
20
|
+
.vditor-copy {
|
|
21
|
+
z-index: auto;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&--fullscreen {
|
|
25
|
+
position: fixed;
|
|
26
|
+
top: 0;
|
|
27
|
+
width: 100% !important;
|
|
28
|
+
left: 0;
|
|
29
|
+
height: 100vh !important;
|
|
30
|
+
z-index: 90;
|
|
31
|
+
border-radius: 0;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&-content {
|
|
35
|
+
display: flex;
|
|
36
|
+
min-height: 60px;
|
|
37
|
+
flex: 1;
|
|
38
|
+
min-width: 1px;
|
|
39
|
+
position: relative;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&-preview {
|
|
43
|
+
flex: 1;
|
|
44
|
+
min-width: 1px;
|
|
45
|
+
overflow: auto;
|
|
46
|
+
margin-left: -1px;
|
|
47
|
+
border-left: 1px solid var(--border-color);
|
|
48
|
+
box-sizing: border-box;
|
|
49
|
+
border-radius: 0 0 3px 0;
|
|
50
|
+
background-color: var(--textarea-background-color);
|
|
51
|
+
|
|
52
|
+
&::-webkit-scrollbar {
|
|
53
|
+
display: none;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
&__action {
|
|
57
|
+
text-align: center;
|
|
58
|
+
padding: 10px;
|
|
59
|
+
background-color: var(--toolbar-background-color);
|
|
60
|
+
|
|
61
|
+
button {
|
|
62
|
+
background-color: var(--toolbar-background-color);
|
|
63
|
+
color: var(--toolbar-icon-color);
|
|
64
|
+
line-height: 20px;
|
|
65
|
+
border: 0;
|
|
66
|
+
margin: 0 10px;
|
|
67
|
+
cursor: pointer;
|
|
68
|
+
padding: 0 7px;
|
|
69
|
+
font-size: 12px;
|
|
70
|
+
|
|
71
|
+
&.vditor-preview__action--current,
|
|
72
|
+
&:hover {
|
|
73
|
+
color: var(--toolbar-icon-hover-color);
|
|
74
|
+
background-color: var(--toolbar-background-color);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
&:focus {
|
|
78
|
+
outline: none;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
svg {
|
|
82
|
+
fill: currentColor;
|
|
83
|
+
height: 15px;
|
|
84
|
+
width: 15px;
|
|
85
|
+
vertical-align: middle;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
& > .vditor-reset {
|
|
91
|
+
padding: 10px;
|
|
92
|
+
margin: 0 auto;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
img:not(.emoji) {
|
|
96
|
+
cursor: pointer;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
&-devtools {
|
|
101
|
+
display: none;
|
|
102
|
+
background-color: var(--textarea-background-color);
|
|
103
|
+
overflow: auto;
|
|
104
|
+
flex: 1;
|
|
105
|
+
min-width: 1px;
|
|
106
|
+
box-shadow: inset 1px 0 var(--border-color);
|
|
107
|
+
box-sizing: border-box;
|
|
108
|
+
border-radius: 0 0 3px 0;
|
|
109
|
+
padding: 10px;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
&-counter {
|
|
113
|
+
padding: 3px;
|
|
114
|
+
color: var(--toolbar-icon-color);
|
|
115
|
+
background-color: var(--count-background-color);
|
|
116
|
+
border-radius: 3px;
|
|
117
|
+
font-size: 12px;
|
|
118
|
+
user-select: none;
|
|
119
|
+
float: right;
|
|
120
|
+
margin: 8px 3px 0 0;
|
|
121
|
+
|
|
122
|
+
&--error {
|
|
123
|
+
color: $errorColor;
|
|
124
|
+
background-color: rgba($errorColor, 0.1);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
&-resize {
|
|
129
|
+
padding: 3px 0;
|
|
130
|
+
cursor: row-resize;
|
|
131
|
+
user-select: none;
|
|
132
|
+
position: absolute;
|
|
133
|
+
width: 100%;
|
|
134
|
+
|
|
135
|
+
&--top {
|
|
136
|
+
top: -3px;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
&--bottom {
|
|
140
|
+
bottom: -3px;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
& > div {
|
|
144
|
+
height: 3px;
|
|
145
|
+
background-color: var(--resize-background-color);
|
|
146
|
+
transition: $transition;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
&:hover,
|
|
150
|
+
&--selected {
|
|
151
|
+
& > div {
|
|
152
|
+
background-color: var(--resize-hover-background-color);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
svg {
|
|
156
|
+
color: var(--resize-hover-icon-color);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
svg {
|
|
161
|
+
fill: currentColor;
|
|
162
|
+
stroke-width: 0;
|
|
163
|
+
stroke: currentColor;
|
|
164
|
+
width: 13px;
|
|
165
|
+
height: 3px;
|
|
166
|
+
display: block;
|
|
167
|
+
margin: 0 auto;
|
|
168
|
+
color: var(--resize-icon-color);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
&-upload {
|
|
173
|
+
position: absolute;
|
|
174
|
+
height: 3px;
|
|
175
|
+
left: 0;
|
|
176
|
+
top: -2px;
|
|
177
|
+
transition: $transition;
|
|
178
|
+
background-color: $blurColor;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
&-tip {
|
|
182
|
+
position: absolute;
|
|
183
|
+
font-size: 12px;
|
|
184
|
+
top: 10px;
|
|
185
|
+
animation-duration: .15s;
|
|
186
|
+
animation-fill-mode: both;
|
|
187
|
+
left: 50%;
|
|
188
|
+
z-index: 5;
|
|
189
|
+
|
|
190
|
+
&--show {
|
|
191
|
+
display: block;
|
|
192
|
+
animation-name: slideInDown;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
&__content {
|
|
196
|
+
text-align: left;
|
|
197
|
+
display: inline-block;
|
|
198
|
+
line-height: 16px;
|
|
199
|
+
padding: 3px 10px;
|
|
200
|
+
border-radius: 3px;
|
|
201
|
+
background: var(--toolbar-background-color);
|
|
202
|
+
position: relative;
|
|
203
|
+
margin-left: -50%;
|
|
204
|
+
color: var(--toolbar-icon-color);
|
|
205
|
+
max-width: 100%;
|
|
206
|
+
box-shadow: var(--panel-shadow);
|
|
207
|
+
|
|
208
|
+
ul {
|
|
209
|
+
margin: 2px 0;
|
|
210
|
+
padding: 0 0 0 18px;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
a {
|
|
214
|
+
color: $blurColor;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
&__close {
|
|
219
|
+
position: absolute;
|
|
220
|
+
color: var(--toolbar-icon-color);
|
|
221
|
+
top: -7px;
|
|
222
|
+
right: -15px;
|
|
223
|
+
font-weight: bold;
|
|
224
|
+
cursor: pointer;
|
|
225
|
+
|
|
226
|
+
&:hover {
|
|
227
|
+
color: var(--toolbar-icon-hover-color);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
&-img {
|
|
233
|
+
position: fixed;
|
|
234
|
+
top: 0;
|
|
235
|
+
left: 0;
|
|
236
|
+
right: 0;
|
|
237
|
+
bottom: 0;
|
|
238
|
+
display: flex;
|
|
239
|
+
flex-direction: column;
|
|
240
|
+
z-index: 3;
|
|
241
|
+
|
|
242
|
+
&__bar {
|
|
243
|
+
border-bottom: 1px solid var(--border-color);
|
|
244
|
+
background-color: var(--toolbar-background-color);
|
|
245
|
+
text-align: center;
|
|
246
|
+
height: 36px;
|
|
247
|
+
box-sizing: border-box;
|
|
248
|
+
display: flex;
|
|
249
|
+
align-items: center;
|
|
250
|
+
justify-content: center;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
&__btn {
|
|
254
|
+
display: flex;
|
|
255
|
+
align-items: center;
|
|
256
|
+
cursor: pointer;
|
|
257
|
+
margin-left: 24px;
|
|
258
|
+
user-select: none;
|
|
259
|
+
color: var(--toolbar-icon-color);
|
|
260
|
+
|
|
261
|
+
&:hover {
|
|
262
|
+
color: var(--toolbar-icon-hover-color);
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
svg {
|
|
266
|
+
height: 14px;
|
|
267
|
+
width: 14px;
|
|
268
|
+
margin-right: 8px;
|
|
269
|
+
fill: currentColor;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
&__img {
|
|
274
|
+
flex: 1;
|
|
275
|
+
background-color: var(--textarea-background-color);
|
|
276
|
+
overflow: auto;
|
|
277
|
+
cursor: zoom-out;
|
|
278
|
+
|
|
279
|
+
img {
|
|
280
|
+
max-width: none;
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
.vditor-hint {
|
|
2
|
+
background-color: var(--panel-background-color);
|
|
3
|
+
position: absolute;
|
|
4
|
+
box-shadow: var(--panel-shadow);
|
|
5
|
+
border-radius: 3px;
|
|
6
|
+
padding: 5px 0;
|
|
7
|
+
z-index: 4;
|
|
8
|
+
line-height: 20px;
|
|
9
|
+
list-style: none;
|
|
10
|
+
font-size: 12px;
|
|
11
|
+
margin: 0;
|
|
12
|
+
max-width: 250px;
|
|
13
|
+
min-width: 80px;
|
|
14
|
+
display: none;
|
|
15
|
+
|
|
16
|
+
.vditor-hint {
|
|
17
|
+
margin-top: -31px;
|
|
18
|
+
left: 100%;
|
|
19
|
+
right: auto;
|
|
20
|
+
|
|
21
|
+
&.vditor-panel--left {
|
|
22
|
+
right: 100%;
|
|
23
|
+
left: auto;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
button {
|
|
28
|
+
color: var(--toolbar-icon-color);
|
|
29
|
+
display: block;
|
|
30
|
+
padding: 3px 10px;
|
|
31
|
+
border: 0;
|
|
32
|
+
border-radius: 0;
|
|
33
|
+
line-height: 20px;
|
|
34
|
+
width: 100%;
|
|
35
|
+
box-sizing: border-box;
|
|
36
|
+
text-align: left;
|
|
37
|
+
margin: 0;
|
|
38
|
+
background-color: transparent;
|
|
39
|
+
cursor: pointer;
|
|
40
|
+
white-space: nowrap;
|
|
41
|
+
text-overflow: ellipsis;
|
|
42
|
+
overflow: hidden;
|
|
43
|
+
|
|
44
|
+
&:focus {
|
|
45
|
+
outline: none;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&--current,
|
|
50
|
+
button:not(.vditor-menu--disabled):hover {
|
|
51
|
+
background-color: var(--toolbar-background-color) !important;
|
|
52
|
+
color: var(--toolbar-icon-hover-color) !important;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&__emoji {
|
|
56
|
+
font-size: 16px;
|
|
57
|
+
float: left;
|
|
58
|
+
margin-right: 3px;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
img {
|
|
62
|
+
height: 20px;
|
|
63
|
+
width: 20px;
|
|
64
|
+
float: left;
|
|
65
|
+
margin-right: 3px;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
.vditor-ir {
|
|
2
|
+
box-sizing: border-box;
|
|
3
|
+
flex: 1;
|
|
4
|
+
min-width: 1px;
|
|
5
|
+
position: relative;
|
|
6
|
+
width: 100%;
|
|
7
|
+
|
|
8
|
+
&__node {
|
|
9
|
+
&[data-type="code-block"]:before,
|
|
10
|
+
&[data-type="code-block"]:after,
|
|
11
|
+
&[data-type="yaml-front-matter"]:before,
|
|
12
|
+
&[data-type="yaml-front-matter"]:after,
|
|
13
|
+
&[data-type="math-block"]:before,
|
|
14
|
+
&[data-type="math-block"]:after {
|
|
15
|
+
content: ' ';
|
|
16
|
+
color: var(--second-color);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&:not(.vditor-ir__node--expand) .vditor-ir__marker {
|
|
20
|
+
padding: 0 !important;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&:not(.vditor-ir__node--expand)[data-type="a"] {
|
|
24
|
+
cursor: pointer;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&[data-type="link-ref"],
|
|
28
|
+
&[data-type="footnotes-ref"] {
|
|
29
|
+
color: $blurColor;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&[data-type="html-block"] {
|
|
33
|
+
margin-bottom: 1em;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.vditor-ir__marker {
|
|
37
|
+
width: 0;
|
|
38
|
+
overflow: hidden;
|
|
39
|
+
display: inline-block;
|
|
40
|
+
height: 0;
|
|
41
|
+
transition: $transition;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&--hidden {
|
|
45
|
+
.vditor-ir__marker {
|
|
46
|
+
visibility: hidden;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&--expand {
|
|
51
|
+
.vditor-ir__marker {
|
|
52
|
+
color: var(--second-color);
|
|
53
|
+
display: inline;
|
|
54
|
+
height: auto;
|
|
55
|
+
width: auto;
|
|
56
|
+
|
|
57
|
+
&--hide {
|
|
58
|
+
display: none;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
&--heading {
|
|
62
|
+
color: var(--ir-heading-color);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
&--bi {
|
|
66
|
+
color: var(--ir-bi-color);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
&--link {
|
|
70
|
+
color: var(--ir-link-color);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
&--title {
|
|
74
|
+
color: var(--ir-title-color);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
&--bracket {
|
|
78
|
+
color: var(--ir-bracket-color);
|
|
79
|
+
text-decoration: underline;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
&--paren {
|
|
83
|
+
color: var(--ir-paren-color);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
&--info {
|
|
87
|
+
color: var(--ir-heading-color);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
&--pre code {
|
|
91
|
+
color: var(--textarea-text-color);
|
|
92
|
+
height: auto;
|
|
93
|
+
text-align: left;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
&[data-type="code-block"]:before,
|
|
98
|
+
&[data-type="code-block"]:after {
|
|
99
|
+
content: '```';
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
&[data-type="yaml-front-matter"]:before,
|
|
103
|
+
&[data-type="yaml-front-matter"]:after {
|
|
104
|
+
content: '---';
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
&[data-type="math-block"]:before,
|
|
108
|
+
&[data-type="math-block"]:after {
|
|
109
|
+
content: '$$';
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
span[data-type="code-block-open-marker"],
|
|
114
|
+
span[data-type="code-block-close-marker"],
|
|
115
|
+
span[data-type="yaml-front-matter-open-marker"],
|
|
116
|
+
span[data-type="yaml-front-matter-close-marker"],
|
|
117
|
+
span[data-type="math-block-open-marker"],
|
|
118
|
+
span[data-type="math-block-close-marker"] {
|
|
119
|
+
display: none;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
&__preview {
|
|
124
|
+
cursor: pointer;
|
|
125
|
+
white-space: initial;
|
|
126
|
+
min-height: 27px;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
&__link {
|
|
130
|
+
color: var(--ir-bracket-color);
|
|
131
|
+
text-decoration: underline;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
pre.vditor-reset {
|
|
135
|
+
background-color: var(--panel-background-color);
|
|
136
|
+
margin: 0;
|
|
137
|
+
white-space: pre-wrap;
|
|
138
|
+
height: 100%;
|
|
139
|
+
box-sizing: border-box;
|
|
140
|
+
|
|
141
|
+
&[contenteditable="false"] {
|
|
142
|
+
opacity: 0.3;
|
|
143
|
+
cursor: not-allowed;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
&:empty::before {
|
|
147
|
+
content: attr(placeholder);
|
|
148
|
+
color: var(--second-color);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
&:focus {
|
|
152
|
+
outline: none;
|
|
153
|
+
background-color: var(--textarea-background-color);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
&:after {
|
|
157
|
+
content: "";
|
|
158
|
+
height: var(--editor-bottom);
|
|
159
|
+
display: block;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
pre {
|
|
163
|
+
margin: 0;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
hr {
|
|
168
|
+
display: inline-block;
|
|
169
|
+
margin: 12px 0;
|
|
170
|
+
width: 100%;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
blockquote:empty::before,
|
|
174
|
+
pre > code:empty::before,
|
|
175
|
+
p:empty::before,
|
|
176
|
+
h1:empty::after,
|
|
177
|
+
h2:empty::after,
|
|
178
|
+
h3:empty::after,
|
|
179
|
+
h4:empty::after,
|
|
180
|
+
h5:empty::after,
|
|
181
|
+
h6:empty::after {
|
|
182
|
+
content: ' ';
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
// block title
|
|
186
|
+
& .vditor-reset > h1:before,
|
|
187
|
+
& .vditor-reset > h2:before,
|
|
188
|
+
& .vditor-reset > h3:before,
|
|
189
|
+
& .vditor-reset > h4:before,
|
|
190
|
+
& .vditor-reset > h5:before,
|
|
191
|
+
& .vditor-reset > h6:before,
|
|
192
|
+
div[data-type="link-ref-defs-block"]:before,
|
|
193
|
+
div[data-type="footnotes-block"]:before,
|
|
194
|
+
.vditor-toc:before {
|
|
195
|
+
float: left;
|
|
196
|
+
padding-right: 4px;
|
|
197
|
+
margin-left: -29px;
|
|
198
|
+
content: 'H1';
|
|
199
|
+
font-size: 0.85rem;
|
|
200
|
+
font-weight: normal;
|
|
201
|
+
color: var(--second-color);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
& .vditor-reset > h2:before {
|
|
205
|
+
content: 'H2';
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
& .vditor-reset > h3:before {
|
|
209
|
+
content: 'H3';
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
& .vditor-reset > h4:before {
|
|
213
|
+
content: 'H4';
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
& .vditor-reset > h5:before {
|
|
217
|
+
content: 'H5';
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
& .vditor-reset > h6:before {
|
|
221
|
+
content: 'H6';
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
div[data-type="link-ref-defs-block"] {
|
|
225
|
+
&:before {
|
|
226
|
+
content: '"A"';
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
color: var(--blockquote-color);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
div[data-type="footnotes-block"] {
|
|
233
|
+
&:before {
|
|
234
|
+
content: '^F';
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
border-top: 2px solid var(--heading-border-color);
|
|
238
|
+
padding-top: 24px;
|
|
239
|
+
margin-top: 24px;
|
|
240
|
+
|
|
241
|
+
& > div[data-type="footnotes-def"] {
|
|
242
|
+
& > ul, & > ol, & > p, & > blockquote, & > pre, & > table, & > hr {
|
|
243
|
+
margin-left: 8px;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
.vditor-toc {
|
|
250
|
+
&:before {
|
|
251
|
+
content: "ToC";
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
span[data-type="toc-h"] {
|
|
255
|
+
color: $blurColor;
|
|
256
|
+
text-decoration: underline;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
@media screen and (max-width: $max-width) {
|
|
262
|
+
.vditor-ir {
|
|
263
|
+
h1:before,
|
|
264
|
+
h2:before,
|
|
265
|
+
h3:before,
|
|
266
|
+
h4:before,
|
|
267
|
+
h5:before,
|
|
268
|
+
h6:before,
|
|
269
|
+
div[data-type="link-ref-defs-block"]:before,
|
|
270
|
+
div[data-type="footnotes-block"]:before,
|
|
271
|
+
.vditor-toc:before {
|
|
272
|
+
content: none;
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
}
|