eeed-editor 0.1.11 → 0.1.14
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 +7 -3
- package/dist/{_basePickBy-p0vsJuyl.mjs → _basePickBy-CEkd0XdC.mjs} +2 -2
- package/dist/{_baseUniq-DVo-Jre7.mjs → _baseUniq-BT9YRDH6.mjs} +1 -1
- package/dist/{arc-3t6gT8ez.mjs → arc-CrfAF6jV.mjs} +1 -1
- package/dist/{architecture-U656AL7Q-DrSgDgLG.mjs → architecture-U656AL7Q-BXDyIjTd.mjs} +1 -1
- package/dist/{architectureDiagram-VXUJARFQ-DpY2m03Y.mjs → architectureDiagram-VXUJARFQ-C0wRUEtM.mjs} +4 -4
- package/dist/{blockDiagram-VD42YOAC-BtGBjXau.mjs → blockDiagram-VD42YOAC-a8uU2YD1.mjs} +5 -5
- package/dist/{c4Diagram-YG6GDRKO-C807qJNg.mjs → c4Diagram-YG6GDRKO-B4jru1i1.mjs} +2 -2
- package/dist/{channel-C0g4FXMF.mjs → channel-Bf6TIAcE.mjs} +1 -1
- package/dist/{chunk-4BX2VUAB-DMGq2tW8.mjs → chunk-4BX2VUAB-CesipSEy.mjs} +1 -1
- package/dist/{chunk-55IACEB6-19qX95Ob.mjs → chunk-55IACEB6-BfkXgkW7.mjs} +1 -1
- package/dist/{chunk-B4BG7PRW-DA8V3Sgc.mjs → chunk-B4BG7PRW-rYl7scX0.mjs} +4 -4
- package/dist/{chunk-DI55MBZ5-CtIw2YNB.mjs → chunk-DI55MBZ5-KjxZkID3.mjs} +3 -3
- package/dist/{chunk-FMBD7UC4-C_N2VROg.mjs → chunk-FMBD7UC4-CdoeuytN.mjs} +1 -1
- package/dist/{chunk-QN33PNHL-C-9GgrQK.mjs → chunk-QN33PNHL-DFkMZx1g.mjs} +1 -1
- package/dist/{chunk-QZHKN3VN-BPrcgZTX.mjs → chunk-QZHKN3VN-BkCoRwfe.mjs} +1 -1
- package/dist/{chunk-TZMSLE5B-DmyKRsil.mjs → chunk-TZMSLE5B-aCc6iQoB.mjs} +1 -1
- package/dist/{classDiagram-v2-WZHVMYZB-CdqY-JhN.mjs → classDiagram-2ON5EDUG-DovnAJJ-.mjs} +2 -2
- package/dist/{classDiagram-2ON5EDUG-CdqY-JhN.mjs → classDiagram-v2-WZHVMYZB-DovnAJJ-.mjs} +2 -2
- package/dist/{clone-CySegGrs.mjs → clone-Bgn0kKfR.mjs} +1 -1
- package/dist/{cose-bilkent-S5V4N54A-CBSDnNom.mjs → cose-bilkent-S5V4N54A-BK8vsbSg.mjs} +2 -2
- package/dist/{dagre-6UL2VRFP-APnlff2F.mjs → dagre-6UL2VRFP-DTKvQpBz.mjs} +6 -6
- package/dist/{diagram-PSM6KHXK-DTWzijE7.mjs → diagram-PSM6KHXK-DbeZS0lZ.mjs} +4 -4
- package/dist/{diagram-QEK2KX5R-DqEwu07L.mjs → diagram-QEK2KX5R-B2wgkbJv.mjs} +3 -3
- package/dist/{diagram-S2PKOQOG-1te24omM.mjs → diagram-S2PKOQOG-9N97BhIm.mjs} +3 -3
- package/dist/eeed-editor.es.js +2 -2
- package/dist/eeed-editor.umd.js +363 -361
- package/dist/{erDiagram-Q2GNP2WA-PleedvaV.mjs → erDiagram-Q2GNP2WA-Be2naADX.mjs} +4 -4
- package/dist/{flowDiagram-NV44I4VS-xA7AFOuO.mjs → flowDiagram-NV44I4VS-BCekSJyr.mjs} +5 -5
- package/dist/{ganttDiagram-LVOFAZNH-Bcel3uuL.mjs → ganttDiagram-LVOFAZNH-DLE0G_aQ.mjs} +3 -3
- package/dist/{gitGraph-F6HP7TQM-DOOE2eCD.mjs → gitGraph-F6HP7TQM-D_INUXWz.mjs} +1 -1
- package/dist/{gitGraphDiagram-NY62KEGX-BkK6NF9r.mjs → gitGraphDiagram-NY62KEGX-CFP-tbN2.mjs} +4 -4
- package/dist/{graph-BYWUCY5Z.mjs → graph-DVnQzTDU.mjs} +2 -2
- package/dist/{index-D-A3-RwX.mjs → index-Bg_uVi12.mjs} +4710 -4504
- package/dist/index.css +1 -1
- package/dist/info-NVLQJR56-Bg8bOk4W.mjs +5 -0
- package/dist/{infoDiagram-ER5ION4S-C7xKOZhF.mjs → infoDiagram-ER5ION4S-s2Yp71ql.mjs} +2 -2
- package/dist/{journeyDiagram-XKPGCS4Q-DMuqhHQe.mjs → journeyDiagram-XKPGCS4Q-CBa5wdie.mjs} +4 -4
- package/dist/{kanban-definition-3W4ZIXB7-DjrBDeUH.mjs → kanban-definition-3W4ZIXB7-OcVTugCl.mjs} +2 -2
- package/dist/{layout-Bjc1FpmC.mjs → layout-mkZS9nxv.mjs} +4 -4
- package/dist/{linear-DN737mUR.mjs → linear-H2f9LXEG.mjs} +1 -1
- package/dist/{mermaid-parser.core-JkhZLspe.mjs → mermaid-parser.core-BOUdyKiu.mjs} +11 -11
- package/dist/{mermaid.core-DgqfIO2A.mjs → mermaid.core-Detd19yK.mjs} +30 -30
- package/dist/{mindmap-definition-VGOIOE7T-z8R1gfY2.mjs → mindmap-definition-VGOIOE7T-C0Jrl77c.mjs} +3 -3
- package/dist/{packet-BFZMPI3H-Bo07gIYB.mjs → packet-BFZMPI3H-XcF80dGc.mjs} +1 -1
- package/dist/pie-7BOR55EZ-BB0Yx1zG.mjs +5 -0
- package/dist/{pieDiagram-ADFJNKIX-MawIb4i_.mjs → pieDiagram-ADFJNKIX-BKJCTnqK.mjs} +4 -4
- package/dist/{quadrantDiagram-AYHSOK5B-DX3NDFeh.mjs → quadrantDiagram-AYHSOK5B-CNpXyKC_.mjs} +2 -2
- package/dist/{radar-NHE76QYJ-DvfGkI9_.mjs → radar-NHE76QYJ-LVAmdxN5.mjs} +1 -1
- package/dist/{requirementDiagram-UZGBJVZJ-z3zjcsS1.mjs → requirementDiagram-UZGBJVZJ-DKlo_g1y.mjs} +3 -3
- package/dist/{sankeyDiagram-TZEHDZUN-xXtU5XkI.mjs → sankeyDiagram-TZEHDZUN-BlcFWxGM.mjs} +1 -1
- package/dist/{sequenceDiagram-WL72ISMW-DdmYBYE0.mjs → sequenceDiagram-WL72ISMW-Br1vA5Su.mjs} +3 -3
- package/dist/src/index.vue.d.ts +1 -1
- package/dist/{stateDiagram-FKZM4ZOC-CYr7uXU3.mjs → stateDiagram-FKZM4ZOC-Dn8r5dJ1.mjs} +4 -4
- package/dist/{stateDiagram-v2-4FDKWEC3-BklSvBl6.mjs → stateDiagram-v2-4FDKWEC3-Dn7F_OIh.mjs} +2 -2
- package/dist/{timeline-definition-IT6M3QCI-DLNiqyKd.mjs → timeline-definition-IT6M3QCI-lEx0wVcX.mjs} +2 -2
- package/dist/{treemap-KMMF4GRG-DBjgehLU.mjs → treemap-KMMF4GRG-Jr6yIZsF.mjs} +1 -1
- package/dist/{xychartDiagram-PRI3JC2R-CfYYMu42.mjs → xychartDiagram-PRI3JC2R-DNJMbKy-.mjs} +2 -2
- package/package.json +92 -92
- package/dist/htmlToMarkdown-DdRci5k7.mjs +0 -184
- package/dist/info-NVLQJR56-Cj8e4vke.mjs +0 -5
- package/dist/pie-7BOR55EZ-Dgrn6vxT.mjs +0 -5
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a4 as S, a7 as F, aG as j, _ as p, g as q, s as H, a as Z, b as J, q as K, p as Q, l as z, c as X, D as Y, H as ee, N as te, e as ae, y as re, F as ne } from "./mermaid.core-
|
|
2
|
-
import { p as ie } from "./chunk-4BX2VUAB-
|
|
3
|
-
import { p as se } from "./mermaid-parser.core-
|
|
4
|
-
import { d as I } from "./arc-
|
|
1
|
+
import { a4 as S, a7 as F, aG as j, _ as p, g as q, s as H, a as Z, b as J, q as K, p as Q, l as z, c as X, D as Y, H as ee, N as te, e as ae, y as re, F as ne } from "./mermaid.core-Detd19yK.mjs";
|
|
2
|
+
import { p as ie } from "./chunk-4BX2VUAB-CesipSEy.mjs";
|
|
3
|
+
import { p as se } from "./mermaid-parser.core-BOUdyKiu.mjs";
|
|
4
|
+
import { d as I } from "./arc-CrfAF6jV.mjs";
|
|
5
5
|
import { o as le } from "./ordinal-C0oynhte.mjs";
|
|
6
6
|
function oe(e, a) {
|
|
7
7
|
return a < e ? -1 : a > e ? 1 : a >= e ? 0 : NaN;
|
package/dist/{quadrantDiagram-AYHSOK5B-DX3NDFeh.mjs → quadrantDiagram-AYHSOK5B-CNpXyKC_.mjs}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as o, s as _e, g as Ae, q as ie, p as ke, a as Fe, b as Pe, c as wt, l as At, d as zt, e as ve, y as Ce, F as D, K as Le, i as Ee } from "./mermaid.core-
|
|
2
|
-
import { l as ee } from "./linear-
|
|
1
|
+
import { _ as o, s as _e, g as Ae, q as ie, p as ke, a as Fe, b as Pe, c as wt, l as At, d as zt, e as ve, y as Ce, F as D, K as Le, i as Ee } from "./mermaid.core-Detd19yK.mjs";
|
|
2
|
+
import { l as ee } from "./linear-H2f9LXEG.mjs";
|
|
3
3
|
var Vt = function() {
|
|
4
4
|
var t = /* @__PURE__ */ o(function(j, r, l, g) {
|
|
5
5
|
for (l = l || {}, g = j.length; g--; l[j[g]] = r) ;
|
package/dist/{requirementDiagram-UZGBJVZJ-z3zjcsS1.mjs → requirementDiagram-UZGBJVZJ-DKlo_g1y.mjs}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { g as Ge } from "./chunk-55IACEB6-
|
|
2
|
-
import { s as ze } from "./chunk-QN33PNHL-
|
|
3
|
-
import { _ as f, b as Xe, a as Je, s as Ze, g as et, p as tt, q as st, c as Ne, l as qe, y as it, B as rt, o as nt, r as at, u as lt } from "./mermaid.core-
|
|
1
|
+
import { g as Ge } from "./chunk-55IACEB6-BfkXgkW7.mjs";
|
|
2
|
+
import { s as ze } from "./chunk-QN33PNHL-DFkMZx1g.mjs";
|
|
3
|
+
import { _ as f, b as Xe, a as Je, s as Ze, g as et, p as tt, q as st, c as Ne, l as qe, y as it, B as rt, o as nt, r as at, u as lt } from "./mermaid.core-Detd19yK.mjs";
|
|
4
4
|
var Ae = function() {
|
|
5
5
|
var e = /* @__PURE__ */ f(function(P, i, r, l) {
|
|
6
6
|
for (r = r || {}, l = P.length; l--; r[P[l]] = i) ;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as p, p as _t, q as xt, s as vt, g as bt, b as wt, a as St, c as lt, z as Lt, d as H, V as Et, y as At, k as Tt } from "./mermaid.core-
|
|
1
|
+
import { _ as p, p as _t, q as xt, s as vt, g as bt, b as wt, a as St, c as lt, z as Lt, d as H, V as Et, y as At, k as Tt } from "./mermaid.core-Detd19yK.mjs";
|
|
2
2
|
import { o as Mt } from "./ordinal-C0oynhte.mjs";
|
|
3
3
|
function Nt(t) {
|
|
4
4
|
for (var e = t.length / 6 | 0, i = new Array(e), a = 0; a < e; ) i[a] = "#" + t.slice(a * 6, ++a * 6);
|
package/dist/{sequenceDiagram-WL72ISMW-DdmYBYE0.mjs → sequenceDiagram-WL72ISMW-Br1vA5Su.mjs}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as we, b as Xt, g as ct, d as ve, c as Jt, e as Qt } from "./chunk-TZMSLE5B-
|
|
2
|
-
import { _ as f, n as Ie, c as st, d as St, l as Q, j as re, e as Le, f as _e, k as I, b as se, s as Ae, p as ke, a as Pe, g as Ne, q as Se, t as Me, J as Re, y as De, i as Mt, u as F, L as z, M as _t, N as ie, Z as Ce, O as Oe, P as ne, E as Ht } from "./mermaid.core-
|
|
3
|
-
import { I as Be } from "./chunk-QZHKN3VN-
|
|
1
|
+
import { a as we, b as Xt, g as ct, d as ve, c as Jt, e as Qt } from "./chunk-TZMSLE5B-aCc6iQoB.mjs";
|
|
2
|
+
import { _ as f, n as Ie, c as st, d as St, l as Q, j as re, e as Le, f as _e, k as I, b as se, s as Ae, p as ke, a as Pe, g as Ne, q as Se, t as Me, J as Re, y as De, i as Mt, u as F, L as z, M as _t, N as ie, Z as Ce, O as Oe, P as ne, E as Ht } from "./mermaid.core-Detd19yK.mjs";
|
|
3
|
+
import { I as Be } from "./chunk-QZHKN3VN-BkCoRwfe.mjs";
|
|
4
4
|
var Ut = function() {
|
|
5
5
|
var e = /* @__PURE__ */ f(function(pt, v, A, L) {
|
|
6
6
|
for (A = A || {}, L = pt.length; L--; A[pt[L]] = v) ;
|
package/dist/src/index.vue.d.ts
CHANGED
|
@@ -35,7 +35,7 @@ type __VLS_Props = {
|
|
|
35
35
|
};
|
|
36
36
|
onUploadFile?: (file: File) => Promise<string> | string;
|
|
37
37
|
onSave?: (title: string, html: string) => Promise<boolean> | boolean;
|
|
38
|
-
onChange?: (html: string, text: string) => void;
|
|
38
|
+
onChange?: (html: string, text: string, markdown: string) => void;
|
|
39
39
|
};
|
|
40
40
|
type ToolBarItem = "history" | "formatBrush" | "clearFormatting" | "fontFamily" | "heading" | "fontSize" | "fontColor" | "highlightColor" | "bold" | "italic" | "underline" | "strike" | "blockquote" | "horizontalRule" | "inlineCode" | "table" | "list" | "textAlign" | "indent" | "lineHeight" | "insert";
|
|
41
41
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { s as G, a as W, S as N } from "./chunk-DI55MBZ5-
|
|
2
|
-
import { _ as f, c as t, d as H, l as S, e as P, k as z, R as _, S as U, O as C, u as F } from "./mermaid.core-
|
|
3
|
-
import { G as O } from "./graph-
|
|
4
|
-
import { l as J } from "./layout-
|
|
1
|
+
import { s as G, a as W, S as N } from "./chunk-DI55MBZ5-KjxZkID3.mjs";
|
|
2
|
+
import { _ as f, c as t, d as H, l as S, e as P, k as z, R as _, S as U, O as C, u as F } from "./mermaid.core-Detd19yK.mjs";
|
|
3
|
+
import { G as O } from "./graph-DVnQzTDU.mjs";
|
|
4
|
+
import { l as J } from "./layout-mkZS9nxv.mjs";
|
|
5
5
|
var X = /* @__PURE__ */ f((e) => e.append("circle").attr("class", "start-state").attr("r", t().state.sizeUnit).attr("cx", t().state.padding + t().state.sizeUnit).attr("cy", t().state.padding + t().state.sizeUnit), "drawStartState"), D = /* @__PURE__ */ f((e) => e.append("line").style("stroke", "grey").style("stroke-dasharray", "3").attr("x1", t().state.textHeight).attr("class", "divider").attr("x2", t().state.textHeight * 2).attr("y1", 0).attr("y2", 0), "drawDivider"), Y = /* @__PURE__ */ f((e, i) => {
|
|
6
6
|
const d = e.append("text").attr("x", 2 * t().state.padding).attr("y", t().state.textHeight + 2 * t().state.padding).attr("font-size", t().state.fontSize).attr("class", "state-title").text(i.id), c = d.node().getBBox();
|
|
7
7
|
return e.insert("rect", ":first-child").attr("x", t().state.padding).attr("y", t().state.padding).attr("width", c.width + 2 * t().state.padding).attr("height", c.height + 2 * t().state.padding).attr("rx", t().state.radius), d;
|
package/dist/{stateDiagram-v2-4FDKWEC3-BklSvBl6.mjs → stateDiagram-v2-4FDKWEC3-Dn7F_OIh.mjs}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { s as a, b as t, a as r, S as s } from "./chunk-DI55MBZ5-
|
|
2
|
-
import { _ as i } from "./mermaid.core-
|
|
1
|
+
import { s as a, b as t, a as r, S as s } from "./chunk-DI55MBZ5-KjxZkID3.mjs";
|
|
2
|
+
import { _ as i } from "./mermaid.core-Detd19yK.mjs";
|
|
3
3
|
var _ = {
|
|
4
4
|
parser: r,
|
|
5
5
|
get db() {
|
package/dist/{timeline-definition-IT6M3QCI-DLNiqyKd.mjs → timeline-definition-IT6M3QCI-lEx0wVcX.mjs}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as s, c as xt, l as E, d as q, V as kt, W as vt, X as _t, Y as bt, B as wt, $ as St, y as Et } from "./mermaid.core-
|
|
2
|
-
import { d as nt } from "./arc-
|
|
1
|
+
import { _ as s, c as xt, l as E, d as q, V as kt, W as vt, X as _t, Y as bt, B as wt, $ as St, y as Et } from "./mermaid.core-Detd19yK.mjs";
|
|
2
|
+
import { d as nt } from "./arc-CrfAF6jV.mjs";
|
|
3
3
|
var X = function() {
|
|
4
4
|
var n = /* @__PURE__ */ s(function(f, r, a, h) {
|
|
5
5
|
for (a = a || {}, h = f.length; h--; a[f[h]] = r) ;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { _ as a, s as gi, g as xi, q as Xt, p as di, a as fi, b as pi, l as Nt, H as mi, e as yi, y as bi, E as St, D as Yt, F as Ai, K as wi, i as Ci, aF as Si, R as Wt } from "./mermaid.core-
|
|
1
|
+
import { _ as a, s as gi, g as xi, q as Xt, p as di, a as fi, b as pi, l as Nt, H as mi, e as yi, y as bi, E as St, D as Yt, F as Ai, K as wi, i as Ci, aF as Si, R as Wt } from "./mermaid.core-Detd19yK.mjs";
|
|
2
2
|
import { i as _i } from "./init-DjUOC4st.mjs";
|
|
3
3
|
import { o as ki } from "./ordinal-C0oynhte.mjs";
|
|
4
|
-
import { l as zt } from "./linear-
|
|
4
|
+
import { l as zt } from "./linear-H2f9LXEG.mjs";
|
|
5
5
|
function Ri(e, t, i) {
|
|
6
6
|
e = +e, t = +t, i = (n = arguments.length) < 2 ? (t = e, e = 0, 1) : n < 3 ? 1 : +i;
|
|
7
7
|
for (var s = -1, n = Math.max(0, Math.ceil((t - e) / i)) | 0, o = new Array(n); ++s < n; )
|
package/package.json
CHANGED
|
@@ -1,100 +1,100 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "eeed-editor",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "基于Vue3 + Tiptap的极简富文本编辑器",
|
|
5
|
-
"main": "dist/eeed-editor.umd.js",
|
|
6
|
-
"module": "dist/eeed-editor.es.js",
|
|
7
|
-
"types": "dist/index.d.ts",
|
|
8
|
-
"files": [
|
|
9
|
-
"dist",
|
|
10
|
-
"README.md"
|
|
11
|
-
],
|
|
12
|
-
"readme": "README.md",
|
|
13
|
-
"exports": {
|
|
14
|
-
".": {
|
|
15
|
-
"import": "./dist/eeed-editor.es.js",
|
|
16
|
-
"require": "./dist/eeed-editor.umd.js",
|
|
17
|
-
"types": "./dist/index.d.ts"
|
|
18
|
-
},
|
|
19
|
-
"./dist/index.css": "./dist/index.css"
|
|
20
|
-
},
|
|
21
|
-
"scripts": {
|
|
22
|
-
"dev": "vite",
|
|
23
|
-
"build": "vue-tsc --noEmit && vite build",
|
|
24
|
-
"build:lib": "vue-tsc --noEmit -p tsconfig.build.json && vite build --mode lib",
|
|
25
|
-
"preview": "vite preview",
|
|
26
|
-
"prepublishOnly": "npm run build:lib",
|
|
27
|
-
"type-check": "vue-tsc --noEmit"
|
|
28
|
-
},
|
|
29
|
-
"keywords": [
|
|
30
|
-
"vue3",
|
|
31
|
-
"editor",
|
|
32
|
-
"tiptap",
|
|
33
|
-
"rich-text",
|
|
34
|
-
"vue3-editor",
|
|
35
|
-
"富文本编辑器"
|
|
36
|
-
],
|
|
37
|
-
"author": "zhangmingxin <mnzmx_z@163.com>",
|
|
38
|
-
"license": "MIT",
|
|
1
|
+
{
|
|
2
|
+
"name": "eeed-editor",
|
|
3
|
+
"version": "0.1.14",
|
|
4
|
+
"description": "基于Vue3 + Tiptap的极简富文本编辑器",
|
|
5
|
+
"main": "dist/eeed-editor.umd.js",
|
|
6
|
+
"module": "dist/eeed-editor.es.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist",
|
|
10
|
+
"README.md"
|
|
11
|
+
],
|
|
12
|
+
"readme": "README.md",
|
|
13
|
+
"exports": {
|
|
14
|
+
".": {
|
|
15
|
+
"import": "./dist/eeed-editor.es.js",
|
|
16
|
+
"require": "./dist/eeed-editor.umd.js",
|
|
17
|
+
"types": "./dist/index.d.ts"
|
|
18
|
+
},
|
|
19
|
+
"./dist/index.css": "./dist/index.css"
|
|
20
|
+
},
|
|
21
|
+
"scripts": {
|
|
22
|
+
"dev": "vite",
|
|
23
|
+
"build": "vue-tsc --noEmit && vite build",
|
|
24
|
+
"build:lib": "vue-tsc --noEmit -p tsconfig.build.json && vite build --mode lib",
|
|
25
|
+
"preview": "vite preview",
|
|
26
|
+
"prepublishOnly": "npm run build:lib",
|
|
27
|
+
"type-check": "vue-tsc --noEmit"
|
|
28
|
+
},
|
|
29
|
+
"keywords": [
|
|
30
|
+
"vue3",
|
|
31
|
+
"editor",
|
|
32
|
+
"tiptap",
|
|
33
|
+
"rich-text",
|
|
34
|
+
"vue3-editor",
|
|
35
|
+
"富文本编辑器"
|
|
36
|
+
],
|
|
37
|
+
"author": "zhangmingxin <mnzmx_z@163.com>",
|
|
38
|
+
"license": "MIT",
|
|
39
39
|
"repository": {
|
|
40
40
|
"type": "git",
|
|
41
41
|
"url": "git+https://github.com/zhangmingxin0120/eeed-editor.git"
|
|
42
42
|
},
|
|
43
|
-
"bugs": {
|
|
44
|
-
"url": "https://github.com/zhangmingxin0120/eeed-editor/issues"
|
|
45
|
-
},
|
|
46
|
-
"homepage": "https://editor.eeed.cn",
|
|
47
|
-
"peerDependencies": {
|
|
48
|
-
"element-plus": "^2.11.1",
|
|
49
|
-
"vue": "^3.4.0"
|
|
50
|
-
},
|
|
51
|
-
"dependencies": {
|
|
52
|
-
"@tiptap/core": "^3.0.7",
|
|
53
|
-
"@tiptap/extension-blockquote": "^3.0.7",
|
|
54
|
-
"@tiptap/extension-bubble-menu": "^3.0.7",
|
|
55
|
-
"@tiptap/extension-code": "^3.0.7",
|
|
56
|
-
"@tiptap/extension-code-block": "^3.0.7",
|
|
57
|
-
"@tiptap/extension-code-block-lowlight": "^3.0.7",
|
|
58
|
-
"@tiptap/extension-color": "^3.0.7",
|
|
59
|
-
"@tiptap/extension-heading": "^3.0.1",
|
|
60
|
-
"@tiptap/extension-highlight": "^3.0.7",
|
|
61
|
-
"@tiptap/extension-horizontal-rule": "^3.0.7",
|
|
62
|
-
"@tiptap/extension-image": "^3.0.7",
|
|
63
|
-
"@tiptap/extension-paragraph": "^3.0.7",
|
|
64
|
-
"@tiptap/extension-placeholder": "^3.0.7",
|
|
65
|
-
"@tiptap/extension-table": "^3.0.7",
|
|
66
|
-
"@tiptap/extension-table-cell": "^3.0.7",
|
|
67
|
-
"@tiptap/extension-table-header": "^3.0.7",
|
|
68
|
-
"@tiptap/extension-table-row": "^3.0.7",
|
|
69
|
-
"@tiptap/extension-text-align": "^3.0.7",
|
|
43
|
+
"bugs": {
|
|
44
|
+
"url": "https://github.com/zhangmingxin0120/eeed-editor/issues"
|
|
45
|
+
},
|
|
46
|
+
"homepage": "https://editor.eeed.cn",
|
|
47
|
+
"peerDependencies": {
|
|
48
|
+
"element-plus": "^2.11.1",
|
|
49
|
+
"vue": "^3.4.0"
|
|
50
|
+
},
|
|
51
|
+
"dependencies": {
|
|
52
|
+
"@tiptap/core": "^3.0.7",
|
|
53
|
+
"@tiptap/extension-blockquote": "^3.0.7",
|
|
54
|
+
"@tiptap/extension-bubble-menu": "^3.0.7",
|
|
55
|
+
"@tiptap/extension-code": "^3.0.7",
|
|
56
|
+
"@tiptap/extension-code-block": "^3.0.7",
|
|
57
|
+
"@tiptap/extension-code-block-lowlight": "^3.0.7",
|
|
58
|
+
"@tiptap/extension-color": "^3.0.7",
|
|
59
|
+
"@tiptap/extension-heading": "^3.0.1",
|
|
60
|
+
"@tiptap/extension-highlight": "^3.0.7",
|
|
61
|
+
"@tiptap/extension-horizontal-rule": "^3.0.7",
|
|
62
|
+
"@tiptap/extension-image": "^3.0.7",
|
|
63
|
+
"@tiptap/extension-paragraph": "^3.0.7",
|
|
64
|
+
"@tiptap/extension-placeholder": "^3.0.7",
|
|
65
|
+
"@tiptap/extension-table": "^3.0.7",
|
|
66
|
+
"@tiptap/extension-table-cell": "^3.0.7",
|
|
67
|
+
"@tiptap/extension-table-header": "^3.0.7",
|
|
68
|
+
"@tiptap/extension-table-row": "^3.0.7",
|
|
69
|
+
"@tiptap/extension-text-align": "^3.0.7",
|
|
70
70
|
"@tiptap/extension-text-style": "^3.0.7",
|
|
71
|
-
"@tiptap/pm": "^3.0.7",
|
|
72
|
-
"@tiptap/starter-kit": "^3.2.0",
|
|
73
|
-
"@tiptap/vue-3": "^3.0.7",
|
|
74
|
-
"@vueuse/core": "^13.8.0",
|
|
75
|
-
"docx": "^9.5.1",
|
|
76
|
-
"highlight.js": "^11.11.1",
|
|
77
|
-
"html2canvas": "^1.4.1",
|
|
78
|
-
"jspdf": "^3.0.2",
|
|
79
|
-
"katex": "^0.16.22",
|
|
80
|
-
"lowlight": "2.9.0",
|
|
81
|
-
"markdown-it": "^14.1.0",
|
|
71
|
+
"@tiptap/pm": "^3.0.7",
|
|
72
|
+
"@tiptap/starter-kit": "^3.2.0",
|
|
73
|
+
"@tiptap/vue-3": "^3.0.7",
|
|
74
|
+
"@vueuse/core": "^13.8.0",
|
|
75
|
+
"docx": "^9.5.1",
|
|
76
|
+
"highlight.js": "^11.11.1",
|
|
77
|
+
"html2canvas": "^1.4.1",
|
|
78
|
+
"jspdf": "^3.0.2",
|
|
79
|
+
"katex": "^0.16.22",
|
|
80
|
+
"lowlight": "2.9.0",
|
|
81
|
+
"markdown-it": "^14.1.0",
|
|
82
82
|
"mathlive": "^0.107.0",
|
|
83
83
|
"mermaid": "^11.11.0"
|
|
84
84
|
},
|
|
85
|
-
"devDependencies": {
|
|
86
|
-
"@types/markdown-it": "^14.1.2",
|
|
87
|
-
"@vitejs/plugin-vue": "^5.2.4",
|
|
88
|
-
"@vue/runtime-dom": "^3.5.21",
|
|
89
|
-
"element-plus": "^2.11.1",
|
|
90
|
-
"sass": "^1.91.0",
|
|
91
|
-
"sass-loader": "^16.0.5",
|
|
92
|
-
"typescript": "^5.9.2",
|
|
93
|
-
"vite": "^5.4.20",
|
|
94
|
-
"vite-plugin-dts": "^4.5.4",
|
|
95
|
-
"vue": "^3.4.0",
|
|
96
|
-
"vue-loader": "^17.4.2",
|
|
97
|
-
"vue-router": "^4.5.1",
|
|
98
|
-
"vue-tsc": "^3.0.7"
|
|
99
|
-
}
|
|
100
|
-
}
|
|
85
|
+
"devDependencies": {
|
|
86
|
+
"@types/markdown-it": "^14.1.2",
|
|
87
|
+
"@vitejs/plugin-vue": "^5.2.4",
|
|
88
|
+
"@vue/runtime-dom": "^3.5.21",
|
|
89
|
+
"element-plus": "^2.11.1",
|
|
90
|
+
"sass": "^1.91.0",
|
|
91
|
+
"sass-loader": "^16.0.5",
|
|
92
|
+
"typescript": "^5.9.2",
|
|
93
|
+
"vite": "^5.4.20",
|
|
94
|
+
"vite-plugin-dts": "^4.5.4",
|
|
95
|
+
"vue": "^3.4.0",
|
|
96
|
+
"vue-loader": "^17.4.2",
|
|
97
|
+
"vue-router": "^4.5.1",
|
|
98
|
+
"vue-tsc": "^3.0.7"
|
|
99
|
+
}
|
|
100
|
+
}
|
|
@@ -1,184 +0,0 @@
|
|
|
1
|
-
const h = /* @__PURE__ */ new Set([
|
|
2
|
-
"address",
|
|
3
|
-
"article",
|
|
4
|
-
"aside",
|
|
5
|
-
"blockquote",
|
|
6
|
-
"div",
|
|
7
|
-
"dl",
|
|
8
|
-
"fieldset",
|
|
9
|
-
"figcaption",
|
|
10
|
-
"figure",
|
|
11
|
-
"footer",
|
|
12
|
-
"form",
|
|
13
|
-
"h1",
|
|
14
|
-
"h2",
|
|
15
|
-
"h3",
|
|
16
|
-
"h4",
|
|
17
|
-
"h5",
|
|
18
|
-
"h6",
|
|
19
|
-
"header",
|
|
20
|
-
"hr",
|
|
21
|
-
"li",
|
|
22
|
-
"main",
|
|
23
|
-
"nav",
|
|
24
|
-
"ol",
|
|
25
|
-
"p",
|
|
26
|
-
"pre",
|
|
27
|
-
"section",
|
|
28
|
-
"table",
|
|
29
|
-
"ul"
|
|
30
|
-
]), b = (r) => r.replace(/\\/g, "\\\\").replace(/\*/g, "\\*").replace(/_/g, "\\_").replace(/\[/g, "\\[").replace(/\]/g, "\\]").replace(/^([#>+-])/gm, "\\$1").replace(/^(\d+)\. /gm, "$1\\. "), p = (r) => r.replace(/^\n+|\n+$/g, ""), A = (r) => r.replace(/\u00a0/g, " ").replace(/[ \t]+\n/g, `
|
|
31
|
-
`).replace(/\n{3,}/g, `
|
|
32
|
-
|
|
33
|
-
`).trim(), m = (r, e) => Array.from(r.childNodes).map((t) => w(t, e)).join(""), c = (r, e) => m(r, { ...e, inline: !0 }).trim(), $ = (r, e) => p(m(r, { ...e, inline: !1 })), y = (r) => {
|
|
34
|
-
var o;
|
|
35
|
-
const e = r.getAttribute("data-language");
|
|
36
|
-
if (e) return e;
|
|
37
|
-
const t = r.matches("code") ? r : r.querySelector("code");
|
|
38
|
-
return ((o = ((t == null ? void 0 : t.getAttribute("class")) || r.getAttribute("class") || "").match(/(?:^|\s)language-([^\s]+)/)) == null ? void 0 : o[1]) || "";
|
|
39
|
-
}, k = (r) => {
|
|
40
|
-
const e = r.matches("code") ? r : r.querySelector("code");
|
|
41
|
-
return ((e == null ? void 0 : e.textContent) || r.textContent || "").replace(/\n$/, "");
|
|
42
|
-
}, T = (r) => {
|
|
43
|
-
const e = y(r), t = k(r);
|
|
44
|
-
return `\`\`\`${e}
|
|
45
|
-
${t}
|
|
46
|
-
\`\`\``;
|
|
47
|
-
}, L = (r) => {
|
|
48
|
-
const e = r.getAttribute("formula") || r.getAttribute("data-formula") || "";
|
|
49
|
-
return r.getAttribute("display") === "true" || r.getAttribute("data-display") === "true" ? `
|
|
50
|
-
$$
|
|
51
|
-
${e}
|
|
52
|
-
$$
|
|
53
|
-
` : `$${e}$`;
|
|
54
|
-
}, N = (r) => `\`\`\`mermaid
|
|
55
|
-
${(r.getAttribute("code") || r.textContent || "").trim()}
|
|
56
|
-
\`\`\``, C = (r, e) => {
|
|
57
|
-
const t = Array.from(r.querySelectorAll("tr")).map(
|
|
58
|
-
(i) => Array.from(i.children).filter((l) => ["TD", "TH"].includes(l.tagName)).map((l) => c(l, e).replace(/\|/g, "\\|").replace(/\s+/g, " ").trim())
|
|
59
|
-
).filter((i) => i.length > 0);
|
|
60
|
-
if (!t.length) return "";
|
|
61
|
-
const n = Math.max(...t.map((i) => i.length)), o = (i) => Array.from({ length: n }, (l, g) => i[g] || ""), a = o(t[0]), s = Array.from({ length: n }, () => "---"), d = t.slice(1).map(o);
|
|
62
|
-
return [a, s, ...d].map((i) => `| ${i.join(" | ")} |`).join(`
|
|
63
|
-
`);
|
|
64
|
-
}, u = (r, e, t, n) => {
|
|
65
|
-
const o = Math.max(1, n || Number(r.getAttribute("data-level")) || e.listDepth + 1), a = " ".repeat(Math.max(0, o - 1)), s = r.querySelector(":scope > .content") || r, i = $(s, { ...e, listDepth: o }).split(`
|
|
66
|
-
`), l = i.shift() || "", g = i.map((f) => f ? `${a} ${f}` : "").join(`
|
|
67
|
-
`);
|
|
68
|
-
return `${a}${t} ${l}${g ? `
|
|
69
|
-
${g}` : ""}`;
|
|
70
|
-
}, w = (r, e) => {
|
|
71
|
-
if (r.nodeType === Node.TEXT_NODE)
|
|
72
|
-
return b(r.nodeValue || "");
|
|
73
|
-
if (r.nodeType !== Node.ELEMENT_NODE) return "";
|
|
74
|
-
const t = r, n = t.tagName.toLowerCase();
|
|
75
|
-
if (["script", "style", "button", "select", "option"].includes(n)) return "";
|
|
76
|
-
if (t.matches('div[data-type="mermaid"]'))
|
|
77
|
-
return `
|
|
78
|
-
|
|
79
|
-
${N(t)}
|
|
80
|
-
|
|
81
|
-
`;
|
|
82
|
-
if (n === "katex-formula")
|
|
83
|
-
return L(t);
|
|
84
|
-
if (n === "pre" || t.classList.contains("code-block-container"))
|
|
85
|
-
return `
|
|
86
|
-
|
|
87
|
-
${T(t)}
|
|
88
|
-
|
|
89
|
-
`;
|
|
90
|
-
if (n === "br") return `
|
|
91
|
-
`;
|
|
92
|
-
if (n === "hr") return `
|
|
93
|
-
|
|
94
|
-
---
|
|
95
|
-
|
|
96
|
-
`;
|
|
97
|
-
if (n === "img") {
|
|
98
|
-
const a = t.getAttribute("src") || "", s = t.getAttribute("alt") || "";
|
|
99
|
-
return a ? `` : "";
|
|
100
|
-
}
|
|
101
|
-
if (n === "a") {
|
|
102
|
-
const a = t.getAttribute("href") || "", s = c(t, e) || a;
|
|
103
|
-
return a ? `[${s}](${a})` : s;
|
|
104
|
-
}
|
|
105
|
-
if (n === "code") {
|
|
106
|
-
const a = t.textContent || "", s = a.includes("`") ? "``" : "`";
|
|
107
|
-
return `${s}${a}${s}`;
|
|
108
|
-
}
|
|
109
|
-
if (["strong", "b"].includes(n)) return `**${c(t, e)}**`;
|
|
110
|
-
if (["em", "i"].includes(n)) return `*${c(t, e)}*`;
|
|
111
|
-
if (["s", "strike", "del"].includes(n)) return `~~${c(t, e)}~~`;
|
|
112
|
-
if (n === "u") return `<u>${c(t, e)}</u>`;
|
|
113
|
-
if (/^h[1-6]$/.test(n)) {
|
|
114
|
-
const a = Number(n.slice(1));
|
|
115
|
-
return `
|
|
116
|
-
|
|
117
|
-
${"#".repeat(a)} ${c(t, e)}
|
|
118
|
-
|
|
119
|
-
`;
|
|
120
|
-
}
|
|
121
|
-
if (n === "p")
|
|
122
|
-
return `
|
|
123
|
-
|
|
124
|
-
${c(t, e)}
|
|
125
|
-
|
|
126
|
-
`;
|
|
127
|
-
if (n === "blockquote")
|
|
128
|
-
return `
|
|
129
|
-
|
|
130
|
-
${$(t, e).split(`
|
|
131
|
-
`).map((s) => `> ${s}`).join(`
|
|
132
|
-
`)}
|
|
133
|
-
|
|
134
|
-
`;
|
|
135
|
-
if (n === "ul")
|
|
136
|
-
return `
|
|
137
|
-
|
|
138
|
-
${Array.from(t.children).filter((s) => s.tagName.toLowerCase() === "li").map((s) => u(s, e, "-", e.listDepth + 1)).join(`
|
|
139
|
-
`)}
|
|
140
|
-
|
|
141
|
-
`;
|
|
142
|
-
if (n === "ol")
|
|
143
|
-
return `
|
|
144
|
-
|
|
145
|
-
${Array.from(t.children).filter((s) => s.tagName.toLowerCase() === "li").map((s, d) => u(s, e, `${d + 1}.`, e.listDepth + 1)).join(`
|
|
146
|
-
`)}
|
|
147
|
-
|
|
148
|
-
`;
|
|
149
|
-
if (n === "li") return u(t, e, "-", e.listDepth + 1);
|
|
150
|
-
if (t.classList.contains("bullet-item"))
|
|
151
|
-
return `
|
|
152
|
-
${u(t, e, "-")}
|
|
153
|
-
`;
|
|
154
|
-
if (t.classList.contains("ordered-item")) {
|
|
155
|
-
const a = t.getAttribute("data-order") || "1";
|
|
156
|
-
return `
|
|
157
|
-
${u(t, e, `${a}.`)}
|
|
158
|
-
`;
|
|
159
|
-
}
|
|
160
|
-
if (t.classList.contains("task-item")) {
|
|
161
|
-
const a = t.getAttribute("data-checked") === "true" || t.classList.contains("checked");
|
|
162
|
-
return `
|
|
163
|
-
${u(t, e, a ? "- [x]" : "- [ ]")}
|
|
164
|
-
`;
|
|
165
|
-
}
|
|
166
|
-
if (n === "table")
|
|
167
|
-
return `
|
|
168
|
-
|
|
169
|
-
${C(t, e)}
|
|
170
|
-
|
|
171
|
-
`;
|
|
172
|
-
const o = m(t, e);
|
|
173
|
-
return h.has(n) && !e.inline ? `
|
|
174
|
-
|
|
175
|
-
${p(o)}
|
|
176
|
-
|
|
177
|
-
` : o;
|
|
178
|
-
}, M = (r) => {
|
|
179
|
-
const e = document.createElement("div");
|
|
180
|
-
return e.innerHTML = r, A(m(e, { inline: !1, listDepth: 0 }));
|
|
181
|
-
};
|
|
182
|
-
export {
|
|
183
|
-
M as htmlToMarkdown
|
|
184
|
-
};
|