@ecodev/natural-editor 45.2.0 → 45.4.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/esm2020/lib/editor/editor.component.mjs +3 -3
- package/esm2020/lib/utils/items/class-item.mjs +11 -12
- package/esm2020/lib/utils/items/id-item.mjs +14 -15
- package/esm2020/lib/utils/items/utils.mjs +15 -1
- package/esm2020/lib/utils/menu.mjs +7 -4
- package/esm2020/lib/utils/schema/heading.mjs +64 -0
- package/esm2020/lib/utils/schema/schema.mjs +3 -1
- package/fesm2015/ecodev-natural-editor.mjs +109 -29
- package/fesm2015/ecodev-natural-editor.mjs.map +1 -1
- package/fesm2020/ecodev-natural-editor.mjs +108 -28
- package/fesm2020/ecodev-natural-editor.mjs.map +1 -1
- package/lib/utils/items/class-item.d.ts +1 -2
- package/lib/utils/items/id-item.d.ts +1 -2
- package/lib/utils/items/utils.d.ts +1 -0
- package/lib/utils/menu.d.ts +1 -1
- package/lib/utils/schema/heading.d.ts +8 -0
- package/package.json +1 -13
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { NodeType } from 'prosemirror-model';
|
|
2
1
|
import { Item } from './item';
|
|
3
2
|
import { MatDialog } from '@angular/material/dialog';
|
|
4
3
|
export declare class ClassItem extends Item {
|
|
5
|
-
constructor(dialog: MatDialog,
|
|
4
|
+
constructor(dialog: MatDialog, nodeTypes: string[]);
|
|
6
5
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { NodeType } from 'prosemirror-model';
|
|
2
1
|
import { Item } from './item';
|
|
3
2
|
import { MatDialog } from '@angular/material/dialog';
|
|
4
3
|
export declare class IdItem extends Item {
|
|
5
|
-
constructor(dialog: MatDialog,
|
|
4
|
+
constructor(dialog: MatDialog, nodeTypes: string[]);
|
|
6
5
|
}
|
|
@@ -15,3 +15,4 @@ export declare function cmdToItem(cmd: Command, options?: Partial<MenuItemSpec>)
|
|
|
15
15
|
* From a `MarkType`, creates a new `Item` that will have an automatic `active` and `enable` spec
|
|
16
16
|
*/
|
|
17
17
|
export declare function markTypeToItem(markType: MarkType): Item;
|
|
18
|
+
export declare function selectionContainsNodeType(state: EditorState, allowedNodeTypes: string[]): boolean;
|
package/lib/utils/menu.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Schema } from 'prosemirror-model';
|
|
2
2
|
import { MatDialog } from '@angular/material/dialog';
|
|
3
3
|
import { Item } from './items/item';
|
|
4
|
-
export declare type Key = 'toggleStrong' | 'toggleEm' | 'toggleCode' | 'toggleLink' | 'wrapBulletList' | 'wrapOrderedList' | 'wrapBlockQuote' | 'makeParagraph' | 'makeCodeBlock' | 'makeHead1' | 'makeHead2' | 'makeHead3' | 'makeHead4' | 'makeHead5' | 'makeHead6' | 'alignLeft' | 'alignRight' | 'alignCenter' | 'alignJustify' | 'insertHorizontalRule' | 'joinUp' | 'lift' | 'selectParentNode' | 'undo' | 'redo' | 'insertTable' | 'addColumnBefore' | 'addColumnAfter' | 'deleteColumn' | 'addRowBefore' | 'addRowAfter' | 'deleteRow' | 'deleteTable' | 'mergeCells' | 'splitCell' | 'toggleHeaderColumn' | 'toggleHeaderRow' | 'toggleHeaderCell' | 'cellBackgroundColor' | 'tableClass' | 'tableId' | '
|
|
4
|
+
export declare type Key = 'toggleStrong' | 'toggleEm' | 'toggleCode' | 'toggleLink' | 'wrapBulletList' | 'wrapOrderedList' | 'wrapBlockQuote' | 'makeParagraph' | 'makeCodeBlock' | 'makeHead1' | 'makeHead2' | 'makeHead3' | 'makeHead4' | 'makeHead5' | 'makeHead6' | 'alignLeft' | 'alignRight' | 'alignCenter' | 'alignJustify' | 'insertHorizontalRule' | 'joinUp' | 'lift' | 'selectParentNode' | 'undo' | 'redo' | 'insertTable' | 'addColumnBefore' | 'addColumnAfter' | 'deleteColumn' | 'addRowBefore' | 'addRowAfter' | 'deleteRow' | 'deleteTable' | 'mergeCells' | 'splitCell' | 'toggleHeaderColumn' | 'toggleHeaderRow' | 'toggleHeaderCell' | 'cellBackgroundColor' | 'tableClass' | 'tableId' | 'blockClass' | 'blockId';
|
|
5
5
|
export declare type MenuItems = Partial<Record<Key, Item>>;
|
|
6
6
|
/**
|
|
7
7
|
* Given a schema, look for default mark and node types in it and
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { NodeSpec } from 'prosemirror-model';
|
|
2
|
+
/**
|
|
3
|
+
* A heading textblock, with a `level` attribute that should hold the number 1 to 6,
|
|
4
|
+
* with optional ID and class attributes. Parsed and serialized as `<h1>` to <h6>`
|
|
5
|
+
*
|
|
6
|
+
* https://github.com/ProseMirror/prosemirror-schema-basic/blob/master/src/schema-basic.js
|
|
7
|
+
*/
|
|
8
|
+
export declare const heading: NodeSpec;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ecodev/natural-editor",
|
|
3
|
-
"version": "45.
|
|
3
|
+
"version": "45.4.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": "github:Ecodev/natural",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -19,18 +19,6 @@
|
|
|
19
19
|
}
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@types/prosemirror-commands": "^1.0.4",
|
|
23
|
-
"@types/prosemirror-dropcursor": "^1.0.3",
|
|
24
|
-
"@types/prosemirror-gapcursor": "^1.0.4",
|
|
25
|
-
"@types/prosemirror-history": "^1.0.3",
|
|
26
|
-
"@types/prosemirror-inputrules": "^1.0.4",
|
|
27
|
-
"@types/prosemirror-keymap": "^1.0.4",
|
|
28
|
-
"@types/prosemirror-menu": "^1.0.6",
|
|
29
|
-
"@types/prosemirror-model": "^1.13.2",
|
|
30
|
-
"@types/prosemirror-schema-basic": "^1.0.2",
|
|
31
|
-
"@types/prosemirror-schema-list": "^1.0.3",
|
|
32
|
-
"@types/prosemirror-state": "^1.2.7",
|
|
33
|
-
"@types/prosemirror-view": "^1.19.1",
|
|
34
22
|
"prosemirror-commands": "^1.1.12",
|
|
35
23
|
"prosemirror-dropcursor": "^1.4.0",
|
|
36
24
|
"prosemirror-gapcursor": "^1.2.1",
|