@fileverse-dev/ddoc 2.1.5-patch-2 → 2.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js
CHANGED
@@ -149244,9 +149244,14 @@ const LWt = ({
|
|
149244
149244
|
..._ie(() => null, "", ""),
|
149245
149245
|
Vie,
|
149246
149246
|
qie,
|
149247
|
-
qte.configure({
|
149247
|
+
qte.configure({
|
149248
|
+
document: o
|
149249
|
+
})
|
149248
149250
|
];
|
149249
|
-
return { editor: new Mq({
|
149251
|
+
return { editor: new Mq({
|
149252
|
+
extensions: l,
|
149253
|
+
autofocus: !1
|
149254
|
+
}), ydoc: o };
|
149250
149255
|
}, e = (o) => Array.isArray(o) || typeof o == "string" && !Jie(o), n = (o, l) => {
|
149251
149256
|
const c = o.map((u) => Gd(u));
|
149252
149257
|
kf(l, N4(c));
|
@@ -149256,20 +149261,17 @@ const LWt = ({
|
|
149256
149261
|
}, i = (o, l, c) => {
|
149257
149262
|
if (!l) throw new Error("cannot set content without Editor");
|
149258
149263
|
e(o) ? Array.isArray(o) ? n(o, c) : kf(c, Gd(o)) : l.commands.setContent(
|
149259
|
-
Qie({
|
149264
|
+
Qie({
|
149265
|
+
data: o
|
149266
|
+
})
|
149260
149267
|
);
|
149261
149268
|
};
|
149262
149269
|
return {
|
149263
149270
|
setContent: i,
|
149264
149271
|
getEditor: t,
|
149265
|
-
|
149266
|
-
const { editor:
|
149267
|
-
return
|
149268
|
-
convertJSONContentToYjsEncodedString: (c) => (i(c, o, l), Y4(tg(l))),
|
149269
|
-
cleanup: () => {
|
149270
|
-
o && o.destroy(), l && l.destroy();
|
149271
|
-
}
|
149272
|
-
};
|
149272
|
+
convertJSONContentToYjsEncodedString: (o) => {
|
149273
|
+
const { editor: l, ydoc: c } = t();
|
149274
|
+
return i(o, l, c), Y4(tg(c));
|
149273
149275
|
},
|
149274
149276
|
downloadContentAsMd: (o, l) => {
|
149275
149277
|
const { editor: c, ydoc: u } = t();
|
@@ -7,10 +7,7 @@ export declare const useHeadlessEditor: () => {
|
|
7
7
|
editor: Editor;
|
8
8
|
ydoc: Y.Doc;
|
9
9
|
};
|
10
|
-
|
11
|
-
convertJSONContentToYjsEncodedString: (content: JSONContent) => string;
|
12
|
-
cleanup: () => void;
|
13
|
-
};
|
10
|
+
convertJSONContentToYjsEncodedString: (content: JSONContent) => string;
|
14
11
|
downloadContentAsMd: (content: string | string[] | JSONContent, title: string) => void;
|
15
12
|
mergeYjsUpdates: (contents: string[]) => string;
|
16
13
|
};
|