@forevka/wordcanvas 0.1.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -4
- package/dist-lib/assets/{engine-DZ0JqUhP.js → engine-BVd9_fny.js} +1126 -1125
- package/dist-lib/assets/{worker-DL4Rxrg-.js → worker-C35TK5Ee.js} +1 -1
- package/dist-lib/builder.js +2347 -0
- package/dist-lib/{editorApp-Bl8rfr3S.js → editorApp-DYckquXo.js} +5052 -5577
- package/dist-lib/types-5-egHV_r.js +972 -0
- package/dist-lib/wordcanvas.js +65 -2
- package/package.json +6 -1
- package/types/builder.d.ts +231 -0
- package/types/model.d.ts +225 -0
- package/types/wordcanvas.d.ts +16 -0
- package/dist-lib/wordcanvas-DPJsuqnm.js +0 -365
package/README.md
CHANGED
|
@@ -65,8 +65,9 @@ const editor = new WordCanvas({
|
|
|
65
65
|
container: document.getElementById("editor")!,
|
|
66
66
|
backendUrl: "https://api.example.com",
|
|
67
67
|
user: { id: "u-42", firstName: "Ada", lastName: "Lovelace" },
|
|
68
|
-
// Join an existing session if the share link carried one
|
|
69
|
-
|
|
68
|
+
// Join an existing session if the share link carried one (the editor's own
|
|
69
|
+
// share links use ?collab=<docId>):
|
|
70
|
+
docId: params.get("collab") ?? undefined,
|
|
70
71
|
});
|
|
71
72
|
|
|
72
73
|
editor.on("shared", ({ url }) => navigator.clipboard.writeText(url));
|
|
@@ -105,8 +106,10 @@ input.addEventListener("change", async () => {
|
|
|
105
106
|
|
|
106
107
|
## Notes & limitations
|
|
107
108
|
|
|
108
|
-
- **
|
|
109
|
-
|
|
109
|
+
- **Multiple instances per page are supported** — the chrome is class-scoped under
|
|
110
|
+
a per-instance root and each instance mounts independently, so you can run several
|
|
111
|
+
editors at once. `destroy()` removes an instance's chrome and its floating panels.
|
|
112
|
+
See the [`embed-multi`](../examples/embed-multi) example.
|
|
110
113
|
- The editor injects its own stylesheet and mounts its full chrome (ribbon, ruler,
|
|
111
114
|
outline, status bar) inside the container; give it a sized element.
|
|
112
115
|
- The bundle is large on disk (~20 MB unminified, code-split) because it ships a
|