@kerebron/extension-menu 0.0.1 → 0.0.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/esm/ExtensionMenu.d.ts.map +1 -1
- package/esm/ExtensionMenu.js +20 -20
- package/package.json +4 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExtensionMenu.d.ts","sourceRoot":"","sources":["../src/ExtensionMenu.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,WAAW,EAIZ,MAAM,WAAW,CAAC;AACnB,OAAO,
|
|
1
|
+
{"version":3,"file":"ExtensionMenu.d.ts","sourceRoot":"","sources":["../src/ExtensionMenu.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,WAAW,EAIZ,MAAM,WAAW,CAAC;AACnB,OAAO,EAAuC,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChF,OAAO,EAAsB,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE/D,OAAO,EAAE,KAAK,UAAU,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAuD9D,wBAAgB,SAAS,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,GAAG,WAAW,EAAE,EAAE,CA0R7E;AAED,qBAAa,aAAc,SAAQ,SAAS;IAC1C,IAAI,SAAU;IAEL,qBAAqB,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE;CAQ7E"}
|
package/esm/ExtensionMenu.js
CHANGED
|
@@ -258,26 +258,26 @@ export function buildMenu(editor, schema) {
|
|
|
258
258
|
icon: icons.redo,
|
|
259
259
|
}));
|
|
260
260
|
/*
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
261
|
+
function item(label: string, cmd: (state: EditorState) => boolean) {
|
|
262
|
+
return new MenuItem({ label, select: cmd, run: cmd });
|
|
263
|
+
}
|
|
264
|
+
const tableMenu = [
|
|
265
|
+
item('Insert column before', addColumnBefore),
|
|
266
|
+
item('Insert column after', addColumnAfter),
|
|
267
|
+
item('Delete column', deleteColumn),
|
|
268
|
+
item('Insert row before', addRowBefore),
|
|
269
|
+
item('Insert row after', addRowAfter),
|
|
270
|
+
item('Delete row', deleteRow),
|
|
271
|
+
item('Delete table', deleteTable),
|
|
272
|
+
item('Merge cells', mergeCells),
|
|
273
|
+
item('Split cell', splitCell),
|
|
274
|
+
item('Toggle header column', toggleHeaderColumn),
|
|
275
|
+
item('Toggle header row', toggleHeaderRow),
|
|
276
|
+
item('Toggle header cells', toggleHeaderCell),
|
|
277
|
+
item('Make cell green', setCellAttr('background', '#dfd')),
|
|
278
|
+
item('Make cell not-green', setCellAttr('background', null)),
|
|
279
|
+
];
|
|
280
|
+
menu.splice(2, 0, [new Dropdown(tableMenu, { label: 'Table' })]);
|
|
281
281
|
*/
|
|
282
282
|
return [menu, blockMenu];
|
|
283
283
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kerebron/extension-menu",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"module": "./esm/ExtensionMenu.js",
|
|
6
6
|
"exports": {
|
|
@@ -9,6 +9,9 @@
|
|
|
9
9
|
}
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
+
"prosemirror-model": "1.24.1",
|
|
13
|
+
"prosemirror-state": "1.4.3",
|
|
14
|
+
"prosemirror-view": "1.33.6",
|
|
12
15
|
"@deno/shim-deno": "~0.18.0"
|
|
13
16
|
},
|
|
14
17
|
"devDependencies": {
|