@ecodev/natural-editor 41.3.0 → 42.2.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/{esm2015/ecodev-natural-editor.js → esm2020/ecodev-natural-editor.mjs} +0 -0
- package/esm2020/lib/class-dialog/class-dialog.component.mjs +37 -0
- package/esm2020/lib/color-dialog/color-dialog.component.mjs +184 -0
- package/esm2020/lib/custom-css/custom-css.directive.mjs +71 -0
- package/esm2020/lib/editor/editor.component.mjs +213 -0
- package/esm2020/lib/editor.module.mjs +90 -0
- package/{esm2015/lib/link-dialog/link-dialog.component.js → esm2020/lib/link-dialog/link-dialog.component.mjs} +5 -8
- package/esm2020/lib/utils/image.mjs +81 -0
- package/{esm2015/lib/utils/inputrules.js → esm2020/lib/utils/inputrules.mjs} +0 -0
- package/esm2020/lib/utils/items/cell-background-color-item.mjs +55 -0
- package/esm2020/lib/utils/items/class-item.mjs +86 -0
- package/esm2020/lib/utils/items/horizontal-rule-item.mjs +24 -0
- package/esm2020/lib/utils/items/item.mjs +39 -0
- package/esm2020/lib/utils/items/link-item.mjs +40 -0
- package/esm2020/lib/utils/items/table-item.mjs +43 -0
- package/esm2020/lib/utils/items/text-align-item.mjs +78 -0
- package/esm2020/lib/utils/items/utils.mjs +41 -0
- package/esm2020/lib/utils/items/wrap-list-item.mjs +6 -0
- package/esm2020/lib/utils/keymap.mjs +115 -0
- package/esm2020/lib/utils/menu.mjs +101 -0
- package/esm2020/lib/utils/schema/paragraph-with-alignment.mjs +50 -0
- package/esm2020/lib/utils/schema/schema.mjs +51 -0
- package/esm2020/lib/utils/schema/table.mjs +113 -0
- package/esm2020/public-api.mjs +9 -0
- package/fesm2015/ecodev-natural-editor.mjs +1548 -0
- package/fesm2015/ecodev-natural-editor.mjs.map +1 -0
- package/fesm2020/ecodev-natural-editor.mjs +1546 -0
- package/fesm2020/ecodev-natural-editor.mjs.map +1 -0
- package/lib/class-dialog/class-dialog.component.d.ts +24 -0
- package/lib/color-dialog/color-dialog.component.d.ts +26 -0
- package/lib/custom-css/custom-css.directive.d.ts +29 -0
- package/lib/editor.module.d.ts +19 -16
- package/lib/utils/items/cell-background-color-item.d.ts +5 -0
- package/lib/utils/items/class-item.d.ts +6 -0
- package/lib/utils/items/horizontal-rule-item.d.ts +5 -0
- package/lib/utils/{item.d.ts → items/item.d.ts} +0 -0
- package/lib/utils/items/link-item.d.ts +6 -0
- package/lib/utils/items/table-item.d.ts +4 -0
- package/lib/utils/{text-align-item.d.ts → items/text-align-item.d.ts} +0 -0
- package/lib/utils/items/utils.d.ts +18 -0
- package/lib/utils/items/wrap-list-item.d.ts +3 -0
- package/lib/utils/menu.d.ts +2 -2
- package/lib/utils/schema/paragraph-with-alignment.d.ts +8 -0
- package/lib/utils/{schema.d.ts → schema/schema.d.ts} +0 -0
- package/lib/utils/schema/table.d.ts +9 -0
- package/package.json +22 -8
- package/public-api.d.ts +1 -0
- package/src/lib/editor/_editor.theme.scss +1 -1
- package/theming/_natural-editor.theme.scss +1 -1
- package/bundles/ecodev-natural-editor.umd.js +0 -1351
- package/bundles/ecodev-natural-editor.umd.js.map +0 -1
- package/esm2015/lib/editor/editor.component.js +0 -219
- package/esm2015/lib/editor.module.js +0 -82
- package/esm2015/lib/utils/image.js +0 -81
- package/esm2015/lib/utils/item.js +0 -39
- package/esm2015/lib/utils/keymap.js +0 -115
- package/esm2015/lib/utils/menu.js +0 -178
- package/esm2015/lib/utils/paragraph-with-alignment.js +0 -43
- package/esm2015/lib/utils/schema.js +0 -47
- package/esm2015/lib/utils/table.js +0 -37
- package/esm2015/lib/utils/text-align-item.js +0 -78
- package/esm2015/public-api.js +0 -8
- package/fesm2015/ecodev-natural-editor.js +0 -997
- package/fesm2015/ecodev-natural-editor.js.map +0 -1
- package/lib/utils/paragraph-with-alignment.d.ts +0 -2
- package/lib/utils/table.d.ts +0 -8
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ecodev-natural-editor.mjs","sources":["../../../projects/natural-editor/src/lib/custom-css/custom-css.directive.ts","../../../projects/natural-editor/src/lib/utils/image.ts","../../../projects/natural-editor/src/lib/utils/schema/paragraph-with-alignment.ts","../../../projects/natural-editor/src/lib/utils/schema/table.ts","../../../projects/natural-editor/src/lib/utils/schema/schema.ts","../../../projects/natural-editor/src/lib/utils/items/item.ts","../../../projects/natural-editor/src/lib/utils/items/text-align-item.ts","../../../projects/natural-editor/src/lib/color-dialog/color-dialog.component.ts","../../../projects/natural-editor/src/lib/color-dialog/color-dialog.component.html","../../../projects/natural-editor/src/lib/utils/items/cell-background-color-item.ts","../../../projects/natural-editor/src/lib/link-dialog/link-dialog.component.ts","../../../projects/natural-editor/src/lib/link-dialog/link-dialog.component.html","../../../projects/natural-editor/src/lib/utils/items/utils.ts","../../../projects/natural-editor/src/lib/utils/items/link-item.ts","../../../projects/natural-editor/src/lib/utils/items/horizontal-rule-item.ts","../../../projects/natural-editor/src/lib/utils/items/wrap-list-item.ts","../../../projects/natural-editor/src/lib/class-dialog/class-dialog.component.ts","../../../projects/natural-editor/src/lib/class-dialog/class-dialog.component.html","../../../projects/natural-editor/src/lib/utils/items/class-item.ts","../../../projects/natural-editor/src/lib/utils/items/table-item.ts","../../../projects/natural-editor/src/lib/utils/menu.ts","../../../projects/natural-editor/src/lib/utils/inputrules.ts","../../../projects/natural-editor/src/lib/utils/keymap.ts","../../../projects/natural-editor/src/lib/editor/editor.component.ts","../../../projects/natural-editor/src/lib/editor/editor.component.html","../../../projects/natural-editor/src/lib/editor.module.ts","../../../projects/natural-editor/src/public-api.ts","../../../projects/natural-editor/src/ecodev-natural-editor.ts"],"sourcesContent":["import {Directive, HostBinding, Inject, Input, OnDestroy} from '@angular/core';\nimport {DOCUMENT} from '@angular/common';\n\n/**\n * Prefix all CSS selectors with the given selector\n *\n * This is meant to be relatively simple and might not cover advanced CSS syntax\n */\nexport function prefixCss(prefix: string, css: string): string {\n prefix = '\\n' + prefix + ' ';\n\n return css\n .replace(/([^{}]*){/gs, selectors =>\n selectors\n .split(',')\n .map(selector => prefix + selector.trim())\n .join(','),\n )\n .trim();\n}\n\nlet uniqueId = 0;\nlet componentCount = 0;\n\n/**\n * Inject custom CSS into component and scope the CSS only to this component\n *\n * Usage :\n *\n * ```html\n * <div [naturalCustomCss]=\".my-class {background: red}\">\n * <p class=\"my-class\">foo bar</p>\n * </div>\n * ```\n */\n@Directive({\n selector: '[naturalCustomCss]',\n})\nexport class NaturalCustomCssDirective implements OnDestroy {\n private style: HTMLStyleElement | null = null;\n\n @HostBinding('attr.data-natural-id') private readonly id = 'n' + ++uniqueId;\n\n @Input()\n public set naturalCustomCss(value: string | undefined) {\n if (value && !this.style) {\n this.style = this.document.createElement('style');\n this.document.head.appendChild(this.style);\n }\n\n if (this.style) {\n this.style.innerHTML = value ? prefixCss(`[data-natural-id=${this.id}]`, value) : '';\n }\n }\n\n public constructor(@Inject(DOCUMENT) private readonly document: Document) {}\n\n public ngOnDestroy(): void {\n this.style?.remove();\n\n // Reset uniqueId if we have no component alive anymore, so that we never reach max int\n componentCount--;\n if (componentCount <= 0) {\n uniqueId = 0;\n }\n }\n}\n","import {Decoration, DecorationSet, EditorView} from 'prosemirror-view';\nimport {EditorState, Plugin} from 'prosemirror-state';\nimport {Observable} from 'rxjs';\nimport {Schema} from 'prosemirror-model';\nimport {Inject, Injectable} from '@angular/core';\nimport {DOCUMENT} from '@angular/common';\n\nexport type ImageUploader = (file: File) => Observable<string>;\n\n@Injectable()\nexport class ImagePlugin {\n public readonly plugin: Plugin<DecorationSet>;\n\n public constructor(@Inject(DOCUMENT) private readonly document: Document) {\n this.plugin = new Plugin<DecorationSet>({\n state: {\n init(): DecorationSet {\n return DecorationSet.empty;\n },\n apply(tr, set): DecorationSet {\n // Adjust decoration positions to changes made by the transaction\n set = set.map(tr.mapping, tr.doc);\n\n // See if the transaction adds or removes any placeholders\n const action = tr.getMeta(this);\n if (action && action.add) {\n const widget = document.createElement('placeholder');\n const deco = Decoration.widget(action.add.pos, widget, {id: action.add.id});\n set = set.add(tr.doc, [deco]);\n } else if (action && action.remove) {\n set = set.remove(set.find(undefined, undefined, spec => spec.id === action.remove.id));\n }\n\n return set;\n },\n },\n props: {\n decorations(state): DecorationSet {\n return this.getState(state);\n },\n },\n });\n }\n\n private findPlaceholder(state: EditorState, id: Record<string, never>): number | null {\n const decorators = this.plugin.getState(state);\n const found = decorators.find(undefined, undefined, spec => spec.id === id);\n return found.length ? found[0].from : null;\n }\n\n public startImageUpload(view: EditorView, file: File, uploader: ImageUploader, schema: Schema): void {\n // A fresh object to act as the ID for this upload\n const id = {};\n\n // Replace the selection with a placeholder\n const tr = view.state.tr;\n if (!tr.selection.empty) {\n tr.deleteSelection();\n }\n\n tr.setMeta(this.plugin, {add: {id, pos: tr.selection.from}});\n view.dispatch(tr);\n\n uploader(file).subscribe({\n next: url => {\n const pos = this.findPlaceholder(view.state, id);\n // If the content around the placeholder has been deleted, drop\n // the image\n if (pos === null) {\n return;\n }\n\n // Otherwise, insert it at the placeholder's position, and remove\n // the placeholder\n view.dispatch(\n view.state.tr\n .replaceWith(pos, pos, schema.nodes.image.create({src: url}))\n .setMeta(this.plugin, {remove: {id}}),\n );\n },\n error: () => {\n // On failure, just clean up the placeholder\n view?.dispatch(tr.setMeta(this.plugin, {remove: {id}}));\n },\n });\n }\n}\n","import {NodeSpec} from 'prosemirror-model';\n\nconst ALIGN_PATTERN = /(left|right|center|justify)/;\ntype Attributes = {\n align: null | string;\n class: string;\n id: string;\n};\n\n/**\n * A plain paragraph textblock. Represented in the DOM\n * as a `<p>` element.\n *\n * https://github.com/ProseMirror/prosemirror-schema-basic/blob/master/src/schema-basic.js\n */\nexport const paragraphWithAlignment: NodeSpec = {\n attrs: {\n align: {default: null},\n class: {default: null},\n id: {default: null},\n },\n content: 'inline*',\n group: 'block',\n parseDOM: [\n {\n tag: 'p',\n getAttrs: (dom: Node | string): undefined | Attributes => {\n if (!(dom instanceof HTMLElement)) {\n return;\n }\n\n const {textAlign} = dom.style;\n\n let align: string | null = dom.getAttribute('align') || textAlign || '';\n align = ALIGN_PATTERN.test(align) ? align : null;\n\n const id = dom.getAttribute('id') || '';\n\n return {align, class: dom.className, id};\n },\n },\n ],\n toDOM: node => {\n const {align, id} = node.attrs;\n const attrs: {[key: string]: string} = {};\n\n let style = '';\n if (align && align !== 'left') {\n style += `text-align: ${align};`;\n }\n\n if (style) {\n attrs.style = style;\n }\n\n if (id) {\n attrs.id = id;\n }\n\n if (node.attrs.class) {\n attrs.class = node.attrs.class;\n }\n\n return ['p', attrs, 0];\n },\n};\n","import {TableNodes, TableNodesOptions} from 'prosemirror-tables';\nimport {Node as ProsemirrorNode} from 'prosemirror-model';\n\ntype CellAttributes = TableNodesOptions['cellAttributes'];\ntype Attributes = {[key: string]: number | string | null | number[]};\n\nfunction getCellAttrs(dom: Node | string, extraAttrs: CellAttributes): undefined | Attributes {\n if (!(dom instanceof HTMLElement)) {\n return;\n }\n\n const widthAttr = dom.getAttribute('data-colwidth');\n const widths = widthAttr && /^\\d+(,\\d+)*$/.test(widthAttr) ? widthAttr.split(',').map(s => Number(s)) : null;\n const colspan = Number(dom.getAttribute('colspan') || 1);\n const result: Attributes = {\n colspan,\n rowspan: Number(dom.getAttribute('rowspan') || 1),\n colwidth: widths && widths.length == colspan ? widths : null,\n };\n\n for (const prop in extraAttrs) {\n const getter = extraAttrs[prop].getFromDOM;\n const value = getter && getter(dom);\n if (value != null) result[prop] = value;\n }\n\n return result;\n}\n\nfunction setCellAttrs(node: ProsemirrorNode, extraAttrs: CellAttributes): undefined | Record<string, string> {\n const attrs: Record<string, string> = {};\n if (node.attrs.colspan != 1) attrs.colspan = node.attrs.colspan;\n if (node.attrs.rowspan != 1) attrs.rowspan = node.attrs.rowspan;\n if (node.attrs.colwidth) attrs['data-colwidth'] = node.attrs.colwidth.join(',');\n\n for (const prop in extraAttrs) {\n const setter = extraAttrs[prop].setDOMAttr;\n if (setter) setter(node.attrs[prop], attrs);\n }\n\n return attrs;\n}\n\n/**\n * This function creates a set of [node\n * specs](http://prosemirror.net/docs/ref/#model.SchemaSpec.nodes) for\n * `table`, `table_row`, and `table_cell` nodes types.\n *\n * It is very directly inspired by prosemirror-table\n */\nexport function tableNodes(options: TableNodesOptions): TableNodes {\n const extraAttrs = options.cellAttributes || {};\n const cellAttrs: CellAttributes = {\n colspan: {default: 1},\n rowspan: {default: 1},\n colwidth: {default: null},\n };\n\n for (const prop in extraAttrs) {\n cellAttrs[prop] = {\n default: extraAttrs[prop].default,\n };\n }\n\n return {\n table: {\n attrs: {\n class: {default: null},\n },\n content: 'table_row+',\n tableRole: 'table',\n isolating: true,\n group: options.tableGroup,\n parseDOM: [\n {\n tag: 'table',\n getAttrs: (dom: Node | string): undefined | Attributes => {\n if (!(dom instanceof HTMLElement)) {\n return;\n }\n\n return {class: dom.className};\n },\n },\n ],\n toDOM: node => {\n const attrs: Record<string, string> = {};\n if (node.attrs.class) {\n attrs.class = node.attrs.class;\n }\n\n return ['table', attrs, ['tbody', 0]];\n },\n },\n table_row: {\n content: '(table_cell | table_header)*',\n tableRole: 'row',\n parseDOM: [{tag: 'tr'}],\n toDOM: () => {\n return ['tr', 0];\n },\n },\n table_cell: {\n content: options.cellContent,\n attrs: cellAttrs,\n tableRole: 'cell',\n isolating: true,\n parseDOM: [{tag: 'td', getAttrs: dom => getCellAttrs(dom, extraAttrs)}],\n toDOM: node => {\n return ['td', setCellAttrs(node, extraAttrs), 0];\n },\n },\n table_header: {\n content: options.cellContent,\n attrs: cellAttrs,\n tableRole: 'header_cell',\n isolating: true,\n parseDOM: [{tag: 'th', getAttrs: dom => getCellAttrs(dom, extraAttrs)}],\n toDOM: node => {\n return ['th', setCellAttrs(node, extraAttrs), 0];\n },\n },\n };\n}\n","import {marks, nodes} from 'prosemirror-schema-basic';\nimport {addListNodes} from 'prosemirror-schema-list';\nimport {Schema} from 'prosemirror-model';\nimport {paragraphWithAlignment} from './paragraph-with-alignment';\nimport {tableNodes} from './table';\n\n// Keep only basic elements\ntype BasicNodes = Omit<typeof nodes, 'image' | 'code_block' | 'blockquote' | 'horizontal_rule'>;\nconst basicNodes: BasicNodes = {\n heading: nodes.heading,\n doc: nodes.doc,\n paragraph: nodes.paragraph,\n text: nodes.text,\n hard_break: nodes.hard_break,\n};\n\ntype BasicMarks = Omit<typeof marks, 'code'>;\nconst basicMarks: BasicMarks = {\n link: marks.link,\n em: marks.em,\n strong: marks.strong,\n};\n\nconst tmpSchema = new Schema({nodes: basicNodes, marks: basicMarks});\n\nexport const basicSchema = new Schema({\n nodes: addListNodes(tmpSchema.spec.nodes, 'paragraph block*', 'block'),\n marks: tmpSchema.spec.marks,\n});\n\nconst tmpSchema2 = new Schema({\n nodes: {\n ...nodes,\n ...tableNodes({\n tableGroup: 'block',\n cellContent: 'block+',\n cellAttributes: {\n background: {\n default: null,\n getFromDOM(dom: Element): string | null {\n return (dom as HTMLElement).style.backgroundColor || null;\n },\n setDOMAttr(value: any, attrs: any): void {\n if (value) {\n attrs.style = (attrs.style || '') + `background-color: ${value};`;\n }\n },\n },\n },\n }),\n paragraph: paragraphWithAlignment,\n },\n marks: basicMarks,\n});\n\nexport const advancedSchema = new Schema({\n nodes: addListNodes(tmpSchema2.spec.nodes, 'paragraph block*', 'block'),\n marks: basicMarks,\n});\n","import {MenuItemSpec} from 'prosemirror-menu';\nimport {EditorState} from 'prosemirror-state';\nimport {EditorView} from 'prosemirror-view';\n\n/**\n * One item of the menu.\n *\n * This is the equivalent of `MenuItem` but without all the rendering logic since we use Angular\n * templates for rendering. Also it caches the state of the item everytime the editor state changes,\n * so Angular can query the state as often as needed without performance hit.\n */\nexport class Item {\n /**\n * Whether the item is 'active' (for example, the item for toggling the strong mark might be active when the cursor is in strong text).\n */\n public active = false;\n\n /**\n * Button is shown but disabled, because the item cannot be (un-)applied\n */\n public disabled = false;\n\n /**\n * Whether the item is shown at the moment\n */\n public show = true;\n\n public constructor(public readonly spec: MenuItemSpec) {}\n\n /**\n * Update the item state according to the editor state\n */\n public update(view: EditorView, state: EditorState): void {\n if (this.spec.active) {\n this.active = this.spec.active(state);\n }\n\n if (this.spec.enable) {\n this.disabled = !this.spec.enable(state);\n }\n\n if (this.spec.select) {\n this.show = this.spec.select(state);\n }\n }\n}\n","import {Node, NodeType, Schema} from 'prosemirror-model';\nimport {AllSelection, TextSelection, Transaction} from 'prosemirror-state';\nimport {Item} from './item';\n\ntype Alignment = 'left' | 'right' | 'center' | 'justify';\n\nfunction setTextAlign(tr: Transaction, schema: Schema, alignment: null | Alignment): Transaction {\n const {selection, doc} = tr;\n if (!selection || !doc) {\n return tr;\n }\n const {from, to} = selection;\n const {nodes} = schema;\n\n const tasks: {\n node: Node;\n pos: number;\n nodeType: NodeType;\n }[] = [];\n\n alignment = alignment || null;\n\n const allowedNodeTypes = new Set([\n nodes.paragraph,\n // nodes['blockquote'],\n // nodes['listItem'],\n // nodes['heading'],\n ]);\n\n doc.nodesBetween(from, to, (node, pos) => {\n const nodeType = node.type;\n const align = node.attrs.align || null;\n if (align !== alignment && allowedNodeTypes.has(nodeType)) {\n tasks.push({\n node,\n pos,\n nodeType,\n });\n }\n return true;\n });\n\n if (!tasks.length) {\n return tr;\n }\n\n tasks.forEach(job => {\n const {node, pos, nodeType} = job;\n const newAttrs = {\n ...node.attrs,\n align: alignment ? alignment : null,\n };\n\n tr = tr.setNodeMarkup(pos, nodeType, newAttrs, node.marks);\n });\n\n return tr;\n}\n\nexport class TextAlignItem extends Item {\n public constructor(alignment: Alignment) {\n super({\n active: state => {\n const {selection, doc} = state;\n const {from, to} = selection;\n let keepLooking = true;\n let active = false;\n doc.nodesBetween(from, to, node => {\n if (keepLooking && node.attrs.align === alignment) {\n keepLooking = false;\n active = true;\n }\n return keepLooking;\n });\n\n return active;\n },\n\n enable: state => {\n const {selection} = state;\n return selection instanceof TextSelection || selection instanceof AllSelection;\n },\n\n run: (state, dispatch): boolean => {\n const {schema, selection} = state;\n\n const tr = setTextAlign(state.tr.setSelection(selection), schema, this.active ? null : alignment);\n if (tr.docChanged) {\n dispatch?.(tr);\n return true;\n } else {\n return false;\n }\n },\n });\n }\n}\n","import {Component, Inject} from '@angular/core';\nimport {MAT_DIALOG_DATA, MatDialogRef} from '@angular/material/dialog';\nimport {FormControl, FormGroup, Validators} from '@angular/forms';\nimport {ifValid} from '@ecodev/natural';\n\nexport interface ColorDialogData {\n /**\n * Empty string means no color set at all. Anything else must be a valid CSS color in hexa format.\n *\n * Eg:\n *\n * - `\"\"`\n * - `\"#ff4000\"`\n */\n color: string;\n}\n\n@Component({\n templateUrl: './color-dialog.component.html',\n styleUrls: ['./color-dialog.component.scss'],\n})\nexport class ColorDialogComponent {\n public readonly colors: string[][] = [\n [\n '#000000',\n '#111111',\n '#1c1c1c',\n '#333333',\n '#666666',\n '#808080',\n '#999999',\n '#b2b2b2',\n '#cccccc',\n '#dddddd',\n '#eeeeee',\n '#ffffff',\n ],\n [\n '#ffff00',\n '#ffbf00',\n '#ff8000',\n '#ff4000',\n '#ff0000',\n '#bf0041',\n '#800080',\n '#55308d',\n '#2a6099',\n '#158466',\n '#00a933',\n '#81d41a',\n ],\n [\n '#ffffd7',\n '#fff5ce',\n '#ffdbb6',\n '#ffd8ce',\n '#ffd7d7',\n '#f7d1d5',\n '#e0c2cd',\n '#dedce6',\n '#dee6ef',\n '#dee7e5',\n '#dde8cb',\n '#f6f9d4',\n ],\n [\n '#ffffa6',\n '#ffe994',\n '#ffb66c',\n '#ffaa95',\n '#ffa6a6',\n '#ec9ba4',\n '#bf819e',\n '#b7b3ca',\n '#b4c7dc',\n '#b3cac7',\n '#afd095',\n '#e8f2a1',\n ],\n [\n '#ffff6d',\n '#ffde59',\n '#ff972f',\n '#ff7b59',\n '#ff6d6d',\n '#e16173',\n '#a1467e',\n '#8e86ae',\n '#729fcf',\n '#81aca6',\n '#77bc65',\n '#d4ea6b',\n ],\n [\n '#ffff38',\n '#ffd428',\n '#ff860d',\n '#ff5429',\n '#ff3838',\n '#d62e4e',\n '#8d1d75',\n '#6b5e9b',\n '#5983b0',\n '#50938a',\n '#3faf46',\n '#bbe33d',\n ],\n [\n '#e6e905',\n '#e8a202',\n '#ea7500',\n '#ed4c05',\n '#f10d0c',\n '#a7074b',\n '#780373',\n '#5b277d',\n '#3465a4',\n '#168253',\n '#069a2e',\n '#5eb91e',\n ],\n [\n '#acb20c',\n '#b47804',\n '#b85c00',\n '#be480a',\n '#c9211e',\n '#861141',\n '#650953',\n '#55215b',\n '#355269',\n '#1e6a39',\n '#127622',\n '#468a1a',\n ],\n [\n '#706e0c',\n '#784b04',\n '#7b3d00',\n '#813709',\n '#8d281e',\n '#611729',\n '#4e102d',\n '#481d32',\n '#383d3c',\n '#28471f',\n '#224b12',\n '#395511',\n ],\n [\n '#443205',\n '#472702',\n '#492300',\n '#4b2204',\n '#50200c',\n '#41190d',\n '#3b160e',\n '#3a1a0f',\n '#362413',\n '#302709',\n '#2e2706',\n '#342a06',\n ],\n ];\n\n public readonly colorControl = new FormControl('', Validators.pattern(/^#\\p{Hex_Digit}{6}/u));\n public readonly form = new FormGroup({\n color: this.colorControl,\n });\n\n public constructor(\n @Inject(MAT_DIALOG_DATA) data: ColorDialogData,\n private dialogRef: MatDialogRef<ColorDialogComponent, ColorDialogData>,\n ) {\n this.form.setValue(data);\n }\n\n public maybeConfirm(): void {\n ifValid(this.form).subscribe(() => this.confirm());\n }\n\n private confirm(): void {\n this.dialogRef.close(this.form.value);\n }\n\n public selectColor(color: string): void {\n this.colorControl.setValue(color);\n this.maybeConfirm();\n }\n}\n","<h2 i18n mat-dialog-title>Sélectionner une couleur</h2>\n\n<mat-dialog-content [formGroup]=\"form\">\n <div>\n <div *ngFor=\"let row of colors\">\n <div\n *ngFor=\"let color of row\"\n class=\"color\"\n [style]=\"{backgroundColor: color}\"\n (click)=\"selectColor(color)\"\n >\n </div>\n </div>\n </div>\n\n <div>\n <button mat-button (click)=\"selectColor('')\">\n <natural-icon name=\"format_color_reset\"></natural-icon>\n <span i18n>Transparent</span></button\n >\n </div>\n\n <mat-form-field>\n <mat-label i18n>Couleur</mat-label>\n <input matInput [formControl]=\"colorControl\" (keydown.enter)=\"maybeConfirm()\" cdkFocusInitial />\n <div class=\"sample\" matSuffix [style]=\"{backgroundColor: colorControl.valid ? colorControl.value : ''}\"></div>\n <mat-error *ngIf=\"colorControl.hasError('pattern')\" i18n\n >Doit être le format hexadecimal. Par exemple: #ff4000\n </mat-error>\n </mat-form-field>\n</mat-dialog-content>\n\n<mat-dialog-actions>\n <button mat-button [mat-dialog-close] i18n>Annuler</button>\n <button mat-stroked-button (click)=\"maybeConfirm()\" [disabled]=\"!form.valid\"><span i18n>Valider</span></button>\n</mat-dialog-actions>\n","import {EditorState, Transaction} from 'prosemirror-state';\nimport {CellSelection, isInTable, selectionCell, setCellAttr} from 'prosemirror-tables';\nimport {EditorView} from 'prosemirror-view';\nimport {Item} from './item';\nimport {MatDialog} from '@angular/material/dialog';\nimport {ColorDialogComponent, ColorDialogData} from '../../color-dialog/color-dialog.component';\n\nconst setCellBackgroundColor = setCellAttr.bind(null, 'background');\n\nfunction findFirstClassInSelection(state: EditorState): string {\n if (!isInTable(state)) {\n return '';\n }\n\n // For single cell selection\n const $cell = selectionCell(state);\n let foundColor: string = $cell?.nodeAfter?.attrs.background ?? '';\n if (foundColor) {\n return foundColor;\n }\n\n // For multiple cells selection\n let keepLooking = true;\n if (state.selection instanceof CellSelection) {\n state.selection.forEachCell(node => {\n const color = node.attrs.background;\n if (keepLooking && color) {\n keepLooking = false;\n foundColor = color;\n }\n });\n }\n\n return foundColor;\n}\n\nexport class CellBackgroundColorItem extends Item {\n public constructor(dialog: MatDialog) {\n super({\n enable(state: EditorState): boolean {\n // Pretend to set a unique color that is not already set, to test if we can any color at all\n const cmd = setCellBackgroundColor('#000001');\n\n return cmd(state);\n },\n run(state: EditorState, dispatch: (p: Transaction) => void, view: EditorView): void {\n dialog\n .open<ColorDialogComponent, ColorDialogData, ColorDialogData>(ColorDialogComponent, {\n data: {\n color: findFirstClassInSelection(state),\n },\n })\n .afterClosed()\n .subscribe(result => {\n if (dispatch && result) {\n const cmd = setCellBackgroundColor(result.color);\n cmd(state, dispatch);\n }\n\n view.focus();\n });\n },\n });\n }\n}\n","import {Component, Inject} from '@angular/core';\nimport {MAT_DIALOG_DATA, MatDialogRef} from '@angular/material/dialog';\nimport {FormControl, FormGroup, Validators} from '@angular/forms';\nimport {ifValid} from '@ecodev/natural';\n\nexport interface LinkDialogData {\n href: string;\n title?: string;\n}\n\n@Component({\n templateUrl: './link-dialog.component.html',\n styleUrls: ['./link-dialog.component.scss'],\n})\nexport class LinkDialogComponent {\n public readonly hrefControl = new FormControl('', Validators.required);\n public readonly titleControl = new FormControl('');\n public readonly form = new FormGroup({\n href: this.hrefControl,\n title: this.titleControl,\n });\n\n public constructor(\n @Inject(MAT_DIALOG_DATA) data: LinkDialogData,\n private dialogRef: MatDialogRef<LinkDialogComponent, LinkDialogData>,\n ) {\n this.form.setValue(data);\n }\n\n public maybeConfirm(): void {\n ifValid(this.form).subscribe(() => this.confirm());\n }\n\n private confirm(): void {\n this.dialogRef.close(this.form.value);\n }\n}\n","<h2 i18n mat-dialog-title>Insérer un lien</h2>\n\n<mat-dialog-content [formGroup]=\"form\">\n <mat-form-field>\n <mat-label i18n>URL</mat-label>\n <input matInput [formControl]=\"hrefControl\" (keydown.enter)=\"maybeConfirm()\" />\n <mat-error *ngIf=\"hrefControl.hasError('required')\" i18n>Ce champ est requis</mat-error>\n </mat-form-field>\n <mat-form-field>\n <mat-label i18n>Titre</mat-label>\n <input matInput [formControl]=\"titleControl\" (keydown.enter)=\"maybeConfirm()\" />\n </mat-form-field>\n</mat-dialog-content>\n\n<mat-dialog-actions>\n <button mat-button [mat-dialog-close] i18n>Annuler</button>\n <button mat-stroked-button (click)=\"maybeConfirm()\" [disabled]=\"!form.valid\"><span i18n>Valider</span></button>\n</mat-dialog-actions>\n","import {EditorState} from 'prosemirror-state';\nimport {MarkType} from 'prosemirror-model';\nimport {MenuItem, MenuItemSpec} from 'prosemirror-menu';\nimport {Item} from './item';\nimport {Command, toggleMark} from 'prosemirror-commands';\n\nexport function markActive(state: EditorState, type: MarkType): boolean {\n const {from, $from, to, empty} = state.selection;\n if (empty) {\n return !!type.isInSet(state.storedMarks || $from.marks());\n } else {\n return state.doc.rangeHasMark(from, to, type);\n }\n}\n\n/**\n * Convert built-in `MenuItem` into our Angular specific `Item`\n */\nexport function menuItemToItem(item: MenuItem): Item {\n return new Item(item.spec);\n}\n\n/**\n * From a `Command`, creates a new `Item` that will have an automatic `enable` spec\n */\nexport function cmdToItem(cmd: Command, options: Partial<MenuItemSpec> = {}): Item {\n const passedOptions: MenuItemSpec = {\n run: cmd,\n ...options,\n };\n\n if (!options.enable && !options.select) {\n passedOptions.enable = state => cmd(state);\n }\n\n return new Item(passedOptions);\n}\n\n/**\n * From a `MarkType`, creates a new `Item` that will have an automatic `active` and `enable` spec\n */\nexport function markTypeToItem(markType: MarkType): Item {\n return cmdToItem(toggleMark(markType), {\n active(state: EditorState): boolean {\n return markActive(state, markType);\n },\n });\n}\n","import {Item} from './item';\nimport {MarkType} from 'prosemirror-model';\nimport {MatDialog} from '@angular/material/dialog';\nimport {EditorState, Transaction} from 'prosemirror-state';\nimport {EditorView} from 'prosemirror-view';\nimport {toggleMark} from 'prosemirror-commands';\nimport {LinkDialogComponent, LinkDialogData} from '../../link-dialog/link-dialog.component';\nimport {markActive} from './utils';\n\nexport class LinkItem extends Item {\n public constructor(markType: MarkType, dialog: MatDialog) {\n super({\n active(state: EditorState): boolean {\n return markActive(state, markType);\n },\n enable(state: EditorState): boolean {\n return !state.selection.empty;\n },\n run(state: EditorState, dispatch: (p: Transaction) => void, view: EditorView): void {\n if (markActive(state, markType)) {\n toggleMark(markType)(state, dispatch);\n return;\n }\n\n dialog\n .open<LinkDialogComponent, LinkDialogData, LinkDialogData>(LinkDialogComponent, {\n data: {\n href: '',\n title: '',\n },\n })\n .afterClosed()\n .subscribe(result => {\n if (result) {\n if (!result.title) {\n delete result.title;\n }\n\n toggleMark(markType, result)(view.state, view.dispatch);\n }\n\n view.focus();\n });\n },\n });\n }\n}\n","import {Item} from './item';\nimport {EditorState} from 'prosemirror-state';\nimport {NodeType} from 'prosemirror-model';\n\nfunction canInsert(state: EditorState, nodeType: NodeType): boolean {\n const $from = state.selection.$from;\n for (let d = $from.depth; d >= 0; d--) {\n const index = $from.index(d);\n if ($from.node(d).canReplaceWith(index, index, nodeType)) {\n return true;\n }\n }\n\n return false;\n}\n\nexport class HorizontalRuleItem extends Item {\n public constructor(hr: NodeType) {\n super({\n enable(state): boolean {\n return canInsert(state, hr);\n },\n run(state, dispatch): void {\n dispatch(state.tr.replaceSelectionWith(hr.create()));\n },\n });\n }\n}\n","import {NodeType} from 'prosemirror-model';\nimport {Item} from './item';\nimport {wrapInList} from 'prosemirror-schema-list';\nimport {cmdToItem} from './utils';\n\nexport function wrapListItem(nodeType: NodeType): Item {\n return cmdToItem(wrapInList(nodeType));\n}\n","import {Component, Inject} from '@angular/core';\nimport {MAT_DIALOG_DATA, MatDialogRef} from '@angular/material/dialog';\nimport {FormControl, FormGroup, Validators} from '@angular/forms';\nimport {ifValid} from '@ecodev/natural';\n\nexport interface ClassDialogData {\n /**\n * CSS class names\n *\n * Eg:\n *\n * - `\"\"`\n * - `\"my-class my-other-class\"`\n */\n class: string;\n}\n\n@Component({\n templateUrl: './class-dialog.component.html',\n styleUrls: ['./class-dialog.component.scss'],\n})\nexport class ClassDialogComponent {\n public readonly classControl = new FormControl('', Validators.pattern(/(^\\s*(-?[_a-zA-Z]+[_a-zA-Z0-9-]*\\s*)+)/));\n public readonly form = new FormGroup({\n class: this.classControl,\n });\n\n public constructor(\n @Inject(MAT_DIALOG_DATA) data: ClassDialogData,\n private dialogRef: MatDialogRef<ClassDialogComponent, ClassDialogData>,\n ) {\n this.form.setValue(data);\n }\n\n public maybeConfirm(): void {\n ifValid(this.form).subscribe(() => this.confirm());\n }\n\n private confirm(): void {\n this.dialogRef.close(this.form.value);\n }\n}\n","<h2 i18n mat-dialog-title>Saisir les classes CSS</h2>\n\n<mat-dialog-content [formGroup]=\"form\">\n <mat-form-field>\n <mat-label i18n>Classes CSS</mat-label>\n <input matInput [formControl]=\"classControl\" (keydown.enter)=\"maybeConfirm()\" cdkFocusInitial />\n <div class=\"sample\" matSuffix [style]=\"{backgroundClass: classControl.valid ? classControl.value : ''}\"></div>\n <mat-error *ngIf=\"classControl.hasError('pattern')\" i18n>Doit être un ou plusieurs nom de classe CSS</mat-error>\n </mat-form-field>\n</mat-dialog-content>\n\n<mat-dialog-actions>\n <button mat-button [mat-dialog-close] i18n>Annuler</button>\n <button mat-stroked-button (click)=\"maybeConfirm()\" [disabled]=\"!form.valid\"><span i18n>Valider</span></button>\n</mat-dialog-actions>\n","import {Node, NodeType} from 'prosemirror-model';\nimport {AllSelection, EditorState, TextSelection, Transaction} from 'prosemirror-state';\nimport {Item} from './item';\nimport {MatDialog} from '@angular/material/dialog';\nimport {ClassDialogComponent, ClassDialogData} from '../../class-dialog/class-dialog.component';\n\nfunction setClass(tr: Transaction, classValue: string, allowedNodeType: NodeType): Transaction {\n const {selection, doc} = tr;\n if (!selection || !doc) {\n return tr;\n }\n const {from, to} = selection;\n\n const tasks: {\n node: Node;\n pos: number;\n nodeType: NodeType;\n }[] = [];\n\n doc.nodesBetween(from, to, (node, pos) => {\n const nodeType = node.type;\n const currentClass = node.attrs.class || null;\n if (currentClass !== classValue && allowedNodeType === nodeType) {\n tasks.push({\n node,\n pos,\n nodeType,\n });\n }\n return true;\n });\n\n if (!tasks.length) {\n return tr;\n }\n\n tasks.forEach(job => {\n const {node, pos, nodeType} = job;\n const newAttrs = {\n ...node.attrs,\n class: classValue ? classValue : null,\n };\n\n tr = tr.setNodeMarkup(pos, nodeType, newAttrs, node.marks);\n });\n\n return tr;\n}\n\n/**\n * Returns the first `class` attribute that is non-empty in the selection.\n * If not found, return empty string.\n */\nfunction findFirstClassInSelection(state: EditorState, allowedNodeType: NodeType): string {\n const {selection, doc} = state;\n const {from, to} = selection;\n let keepLooking = true;\n let foundClass: string = '';\n\n doc.nodesBetween(from, to, node => {\n if (keepLooking && node.type === allowedNodeType && node.attrs.class) {\n keepLooking = false;\n foundClass = node.attrs.class;\n }\n\n return keepLooking;\n });\n\n return foundClass;\n}\n\nexport class ClassItem extends Item {\n public constructor(dialog: MatDialog, nodeType: NodeType) {\n super({\n active: state => {\n return !!findFirstClassInSelection(state, nodeType);\n },\n\n enable: state => {\n const {selection} = state;\n return selection instanceof TextSelection || selection instanceof AllSelection;\n },\n\n run: (state, dispatch, view): void => {\n dialog\n .open<ClassDialogComponent, ClassDialogData, ClassDialogData>(ClassDialogComponent, {\n data: {\n class: findFirstClassInSelection(state, nodeType),\n },\n })\n .afterClosed()\n .subscribe(result => {\n if (dispatch && result) {\n const {selection} = state;\n\n const tr = setClass(state.tr.setSelection(selection), result.class, nodeType);\n if (tr.docChanged) {\n dispatch?.(tr);\n }\n }\n\n view.focus();\n });\n },\n });\n }\n}\n","import {EditorState, TextSelection, Transaction} from 'prosemirror-state';\nimport {Fragment, Node as ProsemirrorNode, NodeType} from 'prosemirror-model';\nimport {tableNodeTypes} from 'prosemirror-tables';\nimport {Item} from './item';\n\nfunction createCell(\n cellType: NodeType,\n cellContent?: Fragment | ProsemirrorNode | Array<ProsemirrorNode>,\n): ProsemirrorNode<any> | null | undefined {\n return cellContent ? cellType.createChecked(null, cellContent) : cellType.createAndFill();\n}\n\nfunction createTable(\n state: EditorState,\n rowsCount: number,\n colsCount: number,\n withHeaderRow: boolean,\n cellContent?: Fragment | ProsemirrorNode | Array<ProsemirrorNode>,\n): ProsemirrorNode {\n const types = tableNodeTypes(state.schema);\n const headerCells = [];\n const cells = [];\n\n for (let index = 0; index < colsCount; index += 1) {\n const cell = createCell(types.cell, cellContent);\n\n if (cell) {\n cells.push(cell);\n }\n\n if (withHeaderRow) {\n const headerCell = createCell(types.header_cell, cellContent);\n\n if (headerCell) {\n headerCells.push(headerCell);\n }\n }\n }\n\n const rows = [];\n\n for (let index = 0; index < rowsCount; index += 1) {\n rows.push(types.row.createChecked(null, withHeaderRow && index === 0 ? headerCells : cells));\n }\n\n return types.table.createChecked(null, rows);\n}\n\nfunction addTable(\n state: EditorState,\n dispatch?: (tr: Transaction) => void,\n {\n rowsCount = 3,\n colsCount = 3,\n withHeaderRow = true,\n cellContent,\n }: {\n rowsCount?: number;\n colsCount?: number;\n withHeaderRow?: boolean;\n cellContent?: Fragment | ProsemirrorNode | Array<ProsemirrorNode>;\n } = {},\n): void {\n const offset = state.tr.selection.anchor + 1;\n\n const nodes = createTable(state, rowsCount, colsCount, withHeaderRow, cellContent);\n const tr = state.tr.replaceSelectionWith(nodes).scrollIntoView();\n const resolvedPos = tr.doc.resolve(offset);\n\n // move cursor into table\n tr.setSelection(TextSelection.near(resolvedPos));\n\n dispatch?.(tr);\n}\n\nexport class AddTableItem extends Item {\n public constructor() {\n super({run: (editor, tr) => addTable(editor, tr)});\n }\n}\n","import {\n blockTypeItem,\n joinUpItem,\n liftItem,\n MenuItem,\n redoItem,\n selectParentNodeItem,\n undoItem,\n wrapItem,\n} from 'prosemirror-menu';\nimport {MarkType, NodeType, Schema} from 'prosemirror-model';\nimport {MatDialog} from '@angular/material/dialog';\nimport {\n addColumnAfter,\n addColumnBefore,\n addRowAfter,\n addRowBefore,\n deleteColumn,\n deleteRow,\n deleteTable,\n mergeCells,\n splitCell,\n toggleHeaderCell,\n toggleHeaderColumn,\n toggleHeaderRow,\n} from 'prosemirror-tables';\nimport {Item} from './items/item';\nimport {paragraphWithAlignment} from './schema/paragraph-with-alignment';\nimport {TextAlignItem} from './items/text-align-item';\nimport {CellBackgroundColorItem} from './items/cell-background-color-item';\nimport {LinkItem} from './items/link-item';\nimport {HorizontalRuleItem} from './items/horizontal-rule-item';\nimport {cmdToItem, markTypeToItem, menuItemToItem} from './items/utils';\nimport {wrapListItem} from './items/wrap-list-item';\nimport {ClassItem} from './items/class-item';\nimport {AddTableItem} from './items/table-item';\n\nexport type Key =\n | 'toggleStrong'\n | 'toggleEm'\n | 'toggleCode'\n | 'toggleLink'\n | 'wrapBulletList'\n | 'wrapOrderedList'\n | 'wrapBlockQuote'\n | 'makeParagraph'\n | 'makeCodeBlock'\n | 'makeHead1'\n | 'makeHead2'\n | 'makeHead3'\n | 'makeHead4'\n | 'makeHead5'\n | 'makeHead6'\n | 'alignLeft'\n | 'alignRight'\n | 'alignCenter'\n | 'alignJustify'\n | 'insertHorizontalRule'\n | 'joinUp'\n | 'lift'\n | 'selectParentNode'\n | 'undo'\n | 'redo'\n | 'insertTable'\n | 'addColumnBefore'\n | 'addColumnAfter'\n | 'deleteColumn'\n | 'addRowBefore'\n | 'addRowAfter'\n | 'deleteRow'\n | 'deleteTable'\n | 'mergeCells'\n | 'splitCell'\n | 'toggleHeaderColumn'\n | 'toggleHeaderRow'\n | 'toggleHeaderCell'\n | 'cellBackgroundColor'\n | 'tableClass'\n | 'paragraphClass';\n\nexport type MenuItems = Partial<Record<Key, Item>>;\n\n/**\n * Given a schema, look for default mark and node types in it and\n * return an object with relevant menu items relating to those marks:\n */\nexport function buildMenuItems(schema: Schema, dialog: MatDialog): MenuItems {\n const r: MenuItems = {\n joinUp: menuItemToItem(joinUpItem),\n lift: menuItemToItem(liftItem),\n selectParentNode: menuItemToItem(selectParentNodeItem),\n undo: menuItemToItem(undoItem as unknown as MenuItem), // Typing is incorrect, so we force it\n redo: menuItemToItem(redoItem as unknown as MenuItem),\n };\n\n let type: MarkType | NodeType | undefined;\n type = schema.marks.strong;\n if (type) {\n r.toggleStrong = markTypeToItem(type);\n }\n\n type = schema.marks.em;\n if (type) {\n r.toggleEm = markTypeToItem(type);\n }\n\n type = schema.marks.code;\n if (type) {\n r.toggleCode = markTypeToItem(type);\n }\n\n type = schema.marks.link;\n if (type) {\n r.toggleLink = new LinkItem(type, dialog);\n }\n\n type = schema.nodes.bullet_list;\n if (type) {\n r.wrapBulletList = wrapListItem(type);\n }\n\n type = schema.nodes.ordered_list;\n if (type) {\n r.wrapOrderedList = wrapListItem(type);\n }\n\n type = schema.nodes.blockquote;\n if (type) {\n r.wrapBlockQuote = menuItemToItem(wrapItem(type, {}));\n }\n\n type = schema.nodes.paragraph;\n if (type) {\n r.makeParagraph = menuItemToItem(blockTypeItem(type, {}));\n\n if (type.spec === paragraphWithAlignment) {\n r.alignLeft = new TextAlignItem('left');\n r.alignRight = new TextAlignItem('right');\n r.alignCenter = new TextAlignItem('center');\n r.alignJustify = new TextAlignItem('justify');\n r.paragraphClass = new ClassItem(dialog, type);\n }\n }\n\n type = schema.nodes.code_block;\n if (type) {\n r.makeCodeBlock = menuItemToItem(blockTypeItem(type, {}));\n }\n\n type = schema.nodes.heading;\n if (type) {\n r.makeHead1 = menuItemToItem(blockTypeItem(type, {attrs: {level: 1}}));\n r.makeHead2 = menuItemToItem(blockTypeItem(type, {attrs: {level: 2}}));\n r.makeHead3 = menuItemToItem(blockTypeItem(type, {attrs: {level: 3}}));\n r.makeHead4 = menuItemToItem(blockTypeItem(type, {attrs: {level: 4}}));\n r.makeHead5 = menuItemToItem(blockTypeItem(type, {attrs: {level: 5}}));\n r.makeHead6 = menuItemToItem(blockTypeItem(type, {attrs: {level: 6}}));\n }\n\n type = schema.nodes.horizontal_rule;\n if (type) {\n r.insertHorizontalRule = new HorizontalRuleItem(type);\n }\n\n type = schema.nodes.table;\n if (type) {\n r.insertTable = new AddTableItem();\n r.addColumnBefore = cmdToItem(addColumnBefore);\n r.addColumnAfter = cmdToItem(addColumnAfter);\n r.deleteColumn = cmdToItem(deleteColumn);\n r.addRowBefore = cmdToItem(addRowBefore);\n r.addRowAfter = cmdToItem(addRowAfter);\n r.deleteRow = cmdToItem(deleteRow);\n r.deleteTable = cmdToItem(deleteTable);\n r.mergeCells = cmdToItem(mergeCells);\n r.splitCell = cmdToItem(splitCell);\n r.toggleHeaderColumn = cmdToItem(toggleHeaderColumn);\n r.toggleHeaderRow = cmdToItem(toggleHeaderRow);\n r.toggleHeaderCell = cmdToItem(toggleHeaderCell);\n r.cellBackgroundColor = new CellBackgroundColorItem(dialog);\n r.tableClass = new ClassItem(dialog, type);\n }\n\n return r;\n}\n","import {\n ellipsis,\n emDash,\n InputRule,\n inputRules,\n textblockTypeInputRule,\n wrappingInputRule,\n} from 'prosemirror-inputrules';\nimport {NodeType, Schema} from 'prosemirror-model';\nimport {Plugin} from 'prosemirror-state';\n\n/**\n * Given a blockquote node type, returns an input rule that turns `\"> \"`\n * at the start of a textblock into a blockquote.\n */\nfunction blockQuoteRule(nodeType: NodeType): InputRule {\n return wrappingInputRule(/^\\s*>\\s$/, nodeType);\n}\n\n/**\n * Given a list node type, returns an input rule that turns a number\n * followed by a dot at the start of a textblock into an ordered list.\n */\nfunction orderedListRule(nodeType: NodeType): InputRule {\n return wrappingInputRule(\n /^(\\d+)\\.\\s$/,\n nodeType,\n match => ({order: +match[1]}),\n (match, node) => node.childCount + node.attrs.order === +match[1],\n );\n}\n\n/**\n * Given a list node type, returns an input rule that turns a bullet\n * (dash, plush, or asterisk) at the start of a textblock into a\n * bullet list.\n */\nfunction bulletListRule(nodeType: NodeType): InputRule {\n return wrappingInputRule(/^\\s*([-+*])\\s$/, nodeType);\n}\n\n/**\n * Given a code block node type, returns an input rule that turns a\n * textblock starting with three backticks into a code block.\n */\nfunction codeBlockRule(nodeType: NodeType): InputRule {\n return textblockTypeInputRule(/^```$/, nodeType);\n}\n\n/**\n * Given a node type and a maximum level, creates an input rule that\n * turns up to that number of `#` characters followed by a space at\n * the start of a textblock into a heading whose level corresponds to\n * the number of `#` signs.\n */\nfunction headingRule(nodeType: NodeType, maxLevel: number): InputRule {\n return textblockTypeInputRule(new RegExp('^(#{1,' + maxLevel + '})\\\\s$'), nodeType, match => ({\n level: match[1].length,\n }));\n}\n\n/**\n * A set of input rules for creating the basic block quotes, lists,\n * code blocks, and heading.\n */\nexport function buildInputRules(schema: Schema): Plugin {\n const rules = [ellipsis, emDash];\n\n let type = schema.nodes.blockquote;\n if (type) {\n rules.push(blockQuoteRule(type));\n }\n\n type = schema.nodes.ordered_list;\n if (type) {\n rules.push(orderedListRule(type));\n }\n\n type = schema.nodes.bullet_list;\n if (type) {\n rules.push(bulletListRule(type));\n }\n\n type = schema.nodes.code_block;\n if (type) {\n rules.push(codeBlockRule(type));\n }\n\n type = schema.nodes.heading;\n if (type) {\n rules.push(headingRule(type, 6));\n }\n\n return inputRules({rules});\n}\n","import {\n chainCommands,\n exitCode,\n joinDown,\n joinUp,\n Keymap,\n lift,\n selectParentNode,\n setBlockType,\n toggleMark,\n wrapIn,\n} from 'prosemirror-commands';\nimport {liftListItem, sinkListItem, splitListItem, wrapInList} from 'prosemirror-schema-list';\nimport {redo, undo} from 'prosemirror-history';\nimport {undoInputRule} from 'prosemirror-inputrules';\nimport {MarkType, NodeType, Schema} from 'prosemirror-model';\n\n/**\n * Inspect the given schema looking for marks and nodes from the\n * basic schema, and if found, add key bindings related to them.\n * This will add:\n *\n * * **Mod-b** for toggling [strong](#schema-basic.StrongMark)\n * * **Mod-i** for toggling [emphasis](#schema-basic.EmMark)\n * * **Mod-`** for toggling [code font](#schema-basic.CodeMark)\n * * **Ctrl-Shift-0** for making the current textblock a paragraph\n * * **Ctrl-Shift-1** to **Ctrl-Shift-Digit6** for making the current\n * textblock a heading of the corresponding level\n * * **Ctrl-Shift-Backslash** to make the current textblock a code block\n * * **Ctrl-Shift-8** to wrap the selection in an ordered list\n * * **Ctrl-Shift-9** to wrap the selection in a bullet list\n * * **Ctrl->** to wrap the selection in a block quote\n * * **Enter** to split a non-empty textblock in a list item while at\n * the same time splitting the list item\n * * **Mod-Enter** to insert a hard break\n * * **Mod-_** to insert a horizontal rule\n * * **Backspace** to undo an input rule\n * * **Alt-ArrowUp** to `joinUp`\n * * **Alt-ArrowDown** to `joinDown`\n * * **Mod-BracketLeft** to `lift`\n * * **Escape** to `selectParentNode`\n *\n * You can suppress or map these bindings by passing a `mapKeys`\n * argument, which maps key names (say `\"Mod-B\"` to either `false`, to\n * remove the binding, or a new key name string.\n */\nexport function buildKeymap(schema: Schema, isMac: boolean): Keymap {\n const keys: Keymap = {};\n\n keys['Mod-z'] = undo;\n keys['Shift-Mod-z'] = redo;\n keys['Backspace'] = undoInputRule;\n if (!isMac) {\n keys['Mod-y'] = redo;\n }\n\n keys['Alt-ArrowUp'] = joinUp;\n keys['Alt-ArrowDown'] = joinDown;\n keys['Mod-BracketLeft'] = lift;\n keys['Escape'] = selectParentNode;\n\n let type: MarkType | NodeType = schema.marks.strong;\n if (type) {\n keys['Mod-b'] = toggleMark(type);\n keys['Mod-B'] = toggleMark(type);\n }\n\n type = schema.marks.em;\n if (type) {\n keys['Mod-i'] = toggleMark(type);\n keys['Mod-I'] = toggleMark(type);\n }\n\n type = schema.marks.code;\n if (type) {\n keys['Mod-`'] = toggleMark(type);\n }\n\n type = schema.nodes.bullet_list;\n if (type) {\n keys['Shift-Ctrl-8'] = wrapInList(type);\n }\n\n type = schema.nodes.ordered_list;\n if (type) {\n keys['Shift-Ctrl-9'] = wrapInList(type);\n }\n\n type = schema.nodes.blockquote;\n if (type) {\n keys['Ctrl->'] = wrapIn(type);\n }\n\n type = schema.nodes.hard_break;\n if (type) {\n const br = type;\n const cmd = chainCommands(exitCode, (state, dispatch) => {\n dispatch?.(state.tr.replaceSelectionWith(br.create()).scrollIntoView());\n return true;\n });\n keys['Mod-Enter'] = cmd;\n keys['Shift-Enter'] = cmd;\n if (isMac) {\n keys['Ctrl-Enter'] = cmd;\n }\n }\n\n type = schema.nodes.list_item;\n if (type) {\n keys['Enter'] = splitListItem(type);\n keys['Mod-['] = liftListItem(type);\n keys['Mod-]'] = sinkListItem(type);\n }\n\n type = schema.nodes.paragraph;\n if (type) {\n keys['Shift-Ctrl-0'] = setBlockType(type);\n }\n\n type = schema.nodes.code_block;\n if (type) {\n keys['Shift-Ctrl-\\\\'] = setBlockType(type);\n }\n\n type = schema.nodes.heading;\n if (type) {\n for (let i = 1; i <= 6; i++) {\n keys['Shift-Ctrl-' + i] = setBlockType(type, {level: i});\n }\n }\n\n type = schema.nodes.horizontal_rule;\n if (type) {\n const hr = type;\n keys['Mod-_'] = (state, dispatch) => {\n dispatch?.(state.tr.replaceSelectionWith(hr.create()).scrollIntoView());\n return true;\n };\n }\n\n return keys;\n}\n","import {\n Component,\n ElementRef,\n EventEmitter,\n Inject,\n Input,\n OnDestroy,\n OnInit,\n Optional,\n Output,\n Self,\n ViewChild,\n} from '@angular/core';\nimport {ControlValueAccessor, NgControl} from '@angular/forms';\nimport {EditorView} from 'prosemirror-view';\nimport {EditorState, Plugin, Transaction} from 'prosemirror-state';\nimport {DOMParser, DOMSerializer, Schema} from 'prosemirror-model';\nimport {DOCUMENT} from '@angular/common';\nimport {MatDialog} from '@angular/material/dialog';\nimport {goToNextCell, tableEditing} from 'prosemirror-tables';\nimport {keymap} from 'prosemirror-keymap';\nimport {ImagePlugin, ImageUploader} from '../utils/image';\nimport {advancedSchema, basicSchema} from '../utils/schema/schema';\nimport {buildMenuItems, Key, MenuItems} from '../utils/menu';\nimport {history} from 'prosemirror-history';\nimport {baseKeymap} from 'prosemirror-commands';\nimport {dropCursor} from 'prosemirror-dropcursor';\nimport {gapCursor} from 'prosemirror-gapcursor';\nimport {buildInputRules} from '../utils/inputrules';\nimport {buildKeymap} from '../utils/keymap';\n\n/**\n * Prosemirror component\n *\n * Usage :\n *\n * ```html\n * <natural-editor [(ngModel)]=\"htmlString\"></natural-editor>\n * ```\n */\n// @dynamic\n@Component({\n selector: 'natural-editor',\n templateUrl: './editor.component.html',\n styleUrls: ['./editor.component.scss'],\n providers: [ImagePlugin],\n})\nexport class NaturalEditorComponent implements OnInit, OnDestroy, ControlValueAccessor {\n private view: EditorView | null = null;\n\n @ViewChild('editor', {read: ElementRef, static: true}) private editor!: ElementRef;\n\n @Output() public readonly contentChange = new EventEmitter<string>();\n\n /**\n * Callback to upload an image.\n *\n * If given it will enable advanced schema, including image and tables.\n * It must be given on initialization and cannot be changed later on.\n */\n @Input() public imageUploader: ImageUploader | null = null;\n\n private schema: Schema = basicSchema;\n\n /**\n * Interface with ControlValueAccessor\n * Notifies parent model / form controller\n */\n private onChange?: (value: string | null) => void;\n\n /**\n * HTML string\n */\n private content = '';\n\n public menu: MenuItems | null = null;\n\n /**\n * If subscribed to, then the save button will be shown and click events forwarded\n */\n @Output() public readonly save = new EventEmitter<void>();\n\n public constructor(\n @Optional() @Self() public readonly ngControl: NgControl,\n @Inject(DOCUMENT) private readonly document: Document,\n private readonly dialog: MatDialog,\n private readonly imagePlugin: ImagePlugin,\n ) {\n if (this.ngControl !== null) {\n this.ngControl.valueAccessor = this;\n }\n }\n\n public ngOnInit(): void {\n this.schema = this.imageUploader ? advancedSchema : basicSchema;\n this.menu = buildMenuItems(this.schema, this.dialog);\n const serializer = DOMSerializer.fromSchema(this.schema);\n const state = this.createState();\n\n this.view = new EditorView(this.editor.nativeElement, {\n state: state,\n dispatchTransaction: (transaction: Transaction) => {\n if (!this.view) {\n return;\n }\n\n const newState = this.view.state.apply(transaction);\n this.view.updateState(newState);\n\n // Transform doc into HTML string\n const dom = serializer.serializeFragment(this.view.state.doc as any);\n const el = this.document.createElement('_');\n el.appendChild(dom);\n\n const newContent = el.innerHTML;\n if (this.content === newContent) {\n return;\n }\n\n this.content = el.innerHTML;\n\n if (this.onChange) {\n this.onChange(this.content);\n }\n this.contentChange.emit(this.content);\n },\n });\n this.update();\n }\n\n public writeValue(val: string | undefined): void {\n if (typeof val === 'string' && val !== this.content) {\n this.content = val;\n }\n\n if (this.view !== null) {\n const state = this.createState();\n this.view.updateState(state);\n }\n }\n\n private createState(): EditorState {\n const template = this.document.createElement('_');\n template.innerHTML = '<div>' + this.content + '</div>';\n if (!template.firstChild) {\n throw new Error('child of template element could not be created');\n }\n\n const parser = DOMParser.fromSchema(this.schema);\n const doc = parser.parse(template.firstChild);\n\n return EditorState.create({\n doc: doc,\n plugins: this.createPlugins(),\n });\n }\n\n private createPlugins(): Plugin[] {\n const isMac = !!this.document.defaultView?.navigator.platform.match(/Mac/);\n\n const plugins = [\n buildInputRules(this.schema),\n keymap(buildKeymap(this.schema, isMac)),\n keymap(baseKeymap),\n dropCursor(),\n gapCursor(),\n history(),\n new Plugin({\n props: {\n attributes: {class: 'ProseMirror-example-setup-style'},\n },\n }),\n new Plugin({\n view: () => this,\n }),\n ];\n\n if (this.schema === advancedSchema) {\n plugins.push(\n this.imagePlugin.plugin,\n tableEditing(),\n keymap({\n Tab: goToNextCell(1),\n 'Shift-Tab': goToNextCell(-1),\n }),\n );\n }\n\n return plugins;\n }\n\n /**\n * Called by Prosemirror whenever the editor state changes. So we update our menu states.\n */\n public update(): void {\n if (!this.view || !this.menu) {\n return;\n }\n\n for (const item of Object.values(this.menu)) {\n item.update(this.view, this.view.state);\n }\n }\n\n public registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n\n public registerOnTouched(fn: any): void {}\n\n public setDisabledState(isDisabled: boolean): void {\n // TODO disable editor ?\n }\n\n public ngOnDestroy(): void {\n if (this.view) {\n this.view.destroy();\n this.view = null;\n }\n }\n\n public run(event: Event, key: Key): void {\n if (!this.view || !this.menu) {\n return;\n }\n\n const item = this.menu[key];\n if (!item || item.disabled || !item.show) {\n return;\n }\n\n item.spec.run(this.view.state, this.view.dispatch, this.view, event);\n this.view.focus();\n }\n\n public upload(file: File): void {\n if (!this.view || !this.imageUploader) {\n return;\n }\n\n if (this.view.state.selection.$from.parent.inlineContent) {\n this.imagePlugin.startImageUpload(this.view, file, this.imageUploader, this.schema);\n }\n\n this.view.focus();\n }\n}\n","<div class=\"menu-container\" *ngIf=\"menu\">\n <div class=\"menu\">\n <button mat-button *ngIf=\"save.observed\" (click)=\"save.emit()\" i18n-matTooltip matTooltip=\"Enregistrer\">\n <mat-icon>save</mat-icon>\n </button>\n\n <mat-button-toggle-group multiple>\n <mat-button-toggle\n *ngIf=\"menu.toggleStrong\"\n [disabled]=\"menu.toggleStrong.disabled\"\n [checked]=\"menu.toggleStrong.active\"\n (click)=\"run($event, 'toggleStrong')\"\n i18n-matTooltip\n matTooltip=\"Gras\"\n >\n <mat-icon>format_bold</mat-icon>\n </mat-button-toggle>\n\n <mat-button-toggle\n *ngIf=\"menu.toggleEm\"\n [disabled]=\"menu.toggleEm.disabled\"\n [checked]=\"menu.toggleEm.active\"\n (click)=\"run($event, 'toggleEm')\"\n i18n-matTooltip\n matTooltip=\"Italique\"\n >\n <mat-icon>format_italic</mat-icon>\n </mat-button-toggle>\n\n <mat-button-toggle\n *ngIf=\"menu.toggleCode\"\n [disabled]=\"menu.toggleCode.disabled\"\n [checked]=\"menu.toggleCode.active\"\n (click)=\"run($event, 'toggleCode')\"\n i18n-matTooltip\n matTooltip=\"Code\"\n >\n <mat-icon>code</mat-icon>\n </mat-button-toggle>\n\n <mat-button-toggle\n *ngIf=\"menu.toggleLink\"\n [disabled]=\"menu.toggleLink.disabled\"\n [checked]=\"menu.toggleLink.active\"\n (click)=\"run($event, 'toggleLink')\"\n i18n-matTooltip\n matTooltip=\"Insérer un lien...\"\n >\n <mat-icon>insert_link</mat-icon>\n </mat-button-toggle>\n </mat-button-toggle-group>\n\n <button mat-button [matMenuTriggerFor]=\"blockMenu\">\n <span i18n>Type</span>\n <mat-icon>arrow_drop_down</mat-icon>\n </button>\n\n <mat-menu #blockMenu=\"matMenu\">\n <button\n mat-menu-item\n *ngIf=\"menu.makeParagraph\"\n [disabled]=\"menu.makeParagraph.disabled\"\n (click)=\"run($event, 'makeParagraph')\"\n i18n\n >Paragraphe\n </button>\n <button\n mat-menu-item\n *ngIf=\"menu.makeCodeBlock\"\n [disabled]=\"menu.makeCodeBlock.disabled\"\n (click)=\"run($event, 'makeCodeBlock')\"\n i18n\n >Code\n </button>\n <button\n mat-menu-item\n *ngIf=\"menu.makeHead1\"\n [disabled]=\"menu.makeHead1.disabled\"\n (click)=\"run($event, 'makeHead1')\"\n i18n\n >Titre 1\n </button>\n <button\n mat-menu-item\n *ngIf=\"menu.makeHead2\"\n [disabled]=\"menu.makeHead2.disabled\"\n (click)=\"run($event, 'makeHead2')\"\n i18n\n >Titre 2\n </button>\n <button\n mat-menu-item\n *ngIf=\"menu.makeHead3\"\n [disabled]=\"menu.makeHead3.disabled\"\n (click)=\"run($event, 'makeHead3')\"\n i18n\n >Titre 3\n </button>\n <button\n mat-menu-item\n *ngIf=\"menu.makeHead4\"\n [disabled]=\"menu.makeHead4.disabled\"\n (click)=\"run($event, 'makeHead4')\"\n i18n\n >Titre 4\n </button>\n <button\n mat-menu-item\n *ngIf=\"menu.makeHead5\"\n [disabled]=\"menu.makeHead5.disabled\"\n (click)=\"run($event, 'makeHead5')\"\n i18n\n >Titre 5\n </button>\n <button\n mat-menu-item\n *ngIf=\"menu.makeHead6\"\n [disabled]=\"menu.makeHead6.disabled\"\n (click)=\"run($event, 'makeHead6')\"\n i18n\n >Titre 6\n </button>\n\n <mat-divider></mat-divider>\n\n <button\n mat-menu-item\n *ngIf=\"menu.paragraphClass\"\n [disabled]=\"menu.paragraphClass.disabled\"\n (click)=\"run($event, 'paragraphClass')\"\n i18n\n >Classe...\n </button>\n </mat-menu>\n\n <button mat-button [matMenuTriggerFor]=\"tableMenu\" *ngIf=\"menu.addColumnBefore\">\n <span i18n>Tableau</span>\n <mat-icon>arrow_drop_down</mat-icon>\n </button>\n\n <mat-menu #tableMenu=\"matMenu\">\n <button\n mat-menu-item\n *ngIf=\"menu.insertTable\"\n [disabled]=\"menu.insertTable.disabled\"\n (click)=\"run($event, 'insertTable')\"\n i18n\n >Insérer un tableau\n </button>\n <button\n mat-menu-item\n *ngIf=\"menu.deleteTable\"\n [disabled]=\"menu.deleteTable.disabled\"\n (click)=\"run($event, 'deleteTable')\"\n i18n\n >Supprimer le tableau\n </button>\n <button\n mat-menu-item\n *ngIf=\"menu.mergeCells\"\n [disabled]=\"menu.mergeCells.disabled\"\n (click)=\"run($event, 'mergeCells')\"\n i18n\n >Fusionner les cellules\n </button>\n <button\n mat-menu-item\n *ngIf=\"menu.splitCell\"\n [disabled]=\"menu.splitCell.disabled\"\n (click)=\"run($event, 'splitCell')\"\n i18n\n >Scinder les cellules\n </button>\n <button\n mat-menu-item\n *ngIf=\"menu.cellBackgroundColor\"\n [disabled]=\"menu.cellBackgroundColor.disabled\"\n (click)=\"run($event, 'cellBackgroundColor')\"\n i18n\n >Couleur de fond...\n </button>\n <button\n mat-menu-item\n *ngIf=\"menu.tableClass\"\n [disabled]=\"menu.tableClass.disabled\"\n (click)=\"run($event, 'tableClass')\"\n i18n\n >Classe...\n </button>\n\n <mat-divider></mat-divider>\n\n <button\n mat-menu-item\n *ngIf=\"menu.addColumnBefore\"\n [disabled]=\"menu.addColumnBefore.disabled\"\n (click)=\"run($event, 'addColumnBefore')\"\n i18n\n >Insérer une colonne avant\n </button>\n <button\n mat-menu-item\n *ngIf=\"menu.addColumnAfter\"\n [disabled]=\"menu.addColumnAfter.disabled\"\n (click)=\"run($event, 'addColumnAfter')\"\n i18n\n >Insérer une colonne après\n </button>\n <button\n mat-menu-item\n *ngIf=\"menu.deleteColumn\"\n [disabled]=\"menu.deleteColumn.disabled\"\n (click)=\"run($event, 'deleteColumn')\"\n i18n\n >Supprimer la colonne\n </button>\n\n <mat-divider></mat-divider>\n\n <button\n mat-menu-item\n *ngIf=\"menu.addRowBefore\"\n [disabled]=\"menu.addRowBefore.disabled\"\n (click)=\"run($event, 'addRowBefore')\"\n i18n\n >Insérer une ligne avant\n </button>\n <button\n mat-menu-item\n *ngIf=\"menu.addRowAfter\"\n [disabled]=\"menu.addRowAfter.disabled\"\n (click)=\"run($event, 'addRowAfter')\"\n i18n\n >Insérer une ligne après\n </button>\n <button\n mat-menu-item\n *ngIf=\"menu.deleteRow\"\n [disabled]=\"menu.deleteRow.disabled\"\n (click)=\"run($event, 'deleteRow')\"\n i18n\n >Supprimer la ligne\n </button>\n\n <mat-divider></mat-divider>\n\n <button\n mat-menu-item\n *ngIf=\"menu.toggleHeaderColumn\"\n [disabled]=\"menu.toggleHeaderColumn.disabled\"\n (click)=\"run($event, 'toggleHeaderColumn')\"\n i18n\n >Entête de colonne\n </button>\n <button\n mat-menu-item\n *ngIf=\"menu.toggleHeaderRow\"\n [disabled]=\"menu.toggleHeaderRow.disabled\"\n (click)=\"run($event, 'toggleHeaderRow')\"\n i18n\n >Entête de ligne\n </button>\n <button\n mat-menu-item\n *ngIf=\"menu.toggleHeaderCell\"\n [disabled]=\"menu.toggleHeaderCell.disabled\"\n (click)=\"run($event, 'toggleHeaderCell')\"\n i18n\n >Entête de cellule\n </button>\n </mat-menu>\n\n <button\n mat-button\n *ngIf=\"imageUploader\"\n naturalFileDrop\n [selectable]=\"true\"\n [broadcast]=\"false\"\n i18n-matTooltip\n matTooltip=\"Insérer une image\"\n (fileChange)=\"upload($event)\"\n >\n <mat-icon>insert_photo</mat-icon>\n </button>\n\n <mat-button-toggle-group *ngIf=\"menu.alignLeft\">\n <mat-button-toggle\n *ngIf=\"menu.alignLeft\"\n [disabled]=\"menu.alignLeft.disabled\"\n [checked]=\"menu.alignLeft.active\"\n (click)=\"run($event, 'alignLeft')\"\n i18n-matTooltip\n matTooltip=\"Aligner gauche\"\n >\n <mat-icon>format_align_left</mat-icon>\n </mat-button-toggle>\n\n <mat-button-toggle\n *ngIf=\"menu.alignCenter\"\n [disabled]=\"menu.alignCenter.disabled\"\n [checked]=\"menu.alignCenter.active\"\n (click)=\"run($event, 'alignCenter')\"\n i18n-matTooltip\n matTooltip=\"Centrer\"\n >\n <mat-icon>format_align_center</mat-icon>\n </mat-button-toggle>\n\n <mat-button-toggle\n *ngIf=\"menu.alignRight\"\n [disabled]=\"menu.alignRight.disabled\"\n [checked]=\"menu.alignRight.active\"\n (click)=\"run($event, 'alignRight')\"\n i18n-matTooltip\n matTooltip=\"Aligner droite\"\n >\n <mat-icon>format_align_right</mat-icon>\n </mat-button-toggle>\n\n <mat-button-toggle\n *ngIf=\"menu.alignJustify\"\n [disabled]=\"menu.alignJustify.disabled\"\n [checked]=\"menu.alignJustify.active\"\n (click)=\"run($event, 'alignJustify')\"\n i18n-matTooltip\n matTooltip=\"Justifier\"\n >\n <mat-icon>format_align_justify</mat-icon>\n </mat-button-toggle>\n </mat-button-toggle-group>\n\n <button\n mat-button\n *ngIf=\"menu.undo\"\n [disabled]=\"menu.undo.disabled\"\n (click)=\"run($event, 'undo')\"\n i18n-matTooltip\n matTooltip=\"Annuler\"\n >\n <mat-icon>undo</mat-icon>\n </button>\n\n <button\n mat-button\n *ngIf=\"menu.redo\"\n [disabled]=\"menu.redo.disabled\"\n (click)=\"run($event, 'redo')\"\n i18n-matTooltip\n matTooltip=\"Refaire\"\n >\n <mat-icon>redo</mat-icon>\n </button>\n\n <button\n mat-button\n *ngIf=\"menu.wrapBulletList && menu.wrapBulletList.show\"\n [disabled]=\"menu.wrapBulletList.disabled\"\n (click)=\"run($event, 'wrapBulletList')\"\n i18n-matTooltip\n matTooltip=\"Liste à puce\"\n >\n <mat-icon>format_list_bulleted</mat-icon>\n </button>\n\n <button\n mat-button\n *ngIf=\"menu.wrapOrderedList && menu.wrapOrderedList.show\"\n [disabled]=\"menu.wrapOrderedList.disabled\"\n (click)=\"run($event, 'wrapOrderedList')\"\n i18n-matTooltip\n matTooltip=\"Liste à numéro\"\n >\n <mat-icon>format_list_numbered</mat-icon>\n </button>\n\n <button\n mat-button\n *ngIf=\"menu.wrapBlockQuote && menu.wrapBlockQuote.show\"\n [disabled]=\"menu.wrapBlockQuote.disabled\"\n (click)=\"run($event, 'wrapBlockQuote')\"\n i18n-matTooltip\n matTooltip=\"Citation\"\n >\n <mat-icon>format_quote</mat-icon>\n </button>\n\n <button\n mat-button\n *ngIf=\"menu.joinUp && menu.joinUp.show\"\n [disabled]=\"menu.joinUp.disabled\"\n (click)=\"run($event, 'joinUp')\"\n i18n-matTooltip\n matTooltip=\"Fusionner avec l'élément du haut\"\n >\n <mat-icon>move_up</mat-icon>\n </button>\n\n <button\n mat-button\n *ngIf=\"menu.lift && menu.lift.show\"\n [disabled]=\"menu.lift.disabled\"\n (click)=\"run($event, 'lift')\"\n i18n-matTooltip\n matTooltip=\"Désindenter\"\n >\n <mat-icon>format_indent_decrease</mat-icon>\n </button>\n\n <button\n mat-button\n *ngIf=\"menu.selectParentNode && menu.selectParentNode.show\"\n [disabled]=\"menu.selectParentNode.disabled\"\n (click)=\"run($event, 'selectParentNode')\"\n i18n-matTooltip\n matTooltip=\"Sélectionner l'élément parent\"\n >\n <mat-icon>select_all</mat-icon>\n </button>\n </div>\n</div>\n<div #editor></div>\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {NaturalEditorComponent} from './editor/editor.component';\nimport {MatButtonModule} from '@angular/material/button';\nimport {MatButtonToggleModule} from '@angular/material/button-toggle';\nimport {MatToolbarModule} from '@angular/material/toolbar';\nimport {MatIconModule} from '@angular/material/icon';\nimport {MatMenuModule} from '@angular/material/menu';\nimport {LinkDialogComponent} from './link-dialog/link-dialog.component';\nimport {ReactiveFormsModule} from '@angular/forms';\nimport {MatDialogModule} from '@angular/material/dialog';\nimport {MatFormFieldModule} from '@angular/material/form-field';\nimport {MatInputModule} from '@angular/material/input';\nimport {MatTooltipModule} from '@angular/material/tooltip';\nimport {NaturalFileModule, NaturalIconModule} from '@ecodev/natural';\nimport {MatDividerModule} from '@angular/material/divider';\nimport {ColorDialogComponent} from './color-dialog/color-dialog.component';\nimport {ClassDialogComponent} from './class-dialog/class-dialog.component';\nimport {NaturalCustomCssDirective} from './custom-css/custom-css.directive';\n\nconst imports = [\n CommonModule,\n MatButtonModule,\n MatButtonToggleModule,\n MatDialogModule,\n MatDividerModule,\n MatFormFieldModule,\n MatIconModule,\n MatInputModule,\n MatMenuModule,\n MatToolbarModule,\n MatTooltipModule,\n NaturalFileModule,\n NaturalIconModule,\n ReactiveFormsModule,\n];\n\nconst declarationsToExport = [NaturalEditorComponent, NaturalCustomCssDirective];\n\n@NgModule({\n declarations: [ClassDialogComponent, ColorDialogComponent, LinkDialogComponent, ...declarationsToExport],\n imports: [...imports],\n exports: [...imports, ...declarationsToExport],\n})\nexport class NaturalEditorModule {}\n","// Load `$localize` onto the global scope - to be able to use that function to translate strings in components/services.\nimport '@angular/localize/init';\n\n/*\n * Public API Surface of natural-editor\n */\n\nexport {NaturalCustomCssDirective} from './lib/custom-css/custom-css.directive';\nexport {NaturalEditorComponent} from './lib/editor/editor.component';\nexport {NaturalEditorModule} from './lib/editor.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i2","i3","i4","i5","i7","findFirstClassInSelection","i3.ImagePlugin","i6","i9","i11"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA;;;;AAIG;AACa,SAAA,SAAS,CAAC,MAAc,EAAE,GAAW,EAAA;AACjD,IAAA,MAAM,GAAG,IAAI,GAAG,MAAM,GAAG,GAAG,CAAC;AAE7B,IAAA,OAAO,GAAG;AACL,SAAA,OAAO,CAAC,aAAa,EAAE,SAAS,IAC7B,SAAS;SACJ,KAAK,CAAC,GAAG,CAAC;SACV,GAAG,CAAC,QAAQ,IAAI,MAAM,GAAG,QAAQ,CAAC,IAAI,EAAE,CAAC;SACzC,IAAI,CAAC,GAAG,CAAC,CACjB;AACA,SAAA,IAAI,EAAE,CAAC;AAChB,CAAC;AAED,IAAI,QAAQ,GAAG,CAAC,CAAC;AACjB,IAAI,cAAc,GAAG,CAAC,CAAC;AAEvB;;;;;;;;;;AAUG;MAIU,yBAAyB,CAAA;AAiBlC,IAAA,WAAA,CAAsD,QAAkB,EAAA;QAAlB,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAU;QAhBhE,IAAK,CAAA,KAAA,GAA4B,IAAI,CAAC;AAEQ,QAAA,IAAA,CAAA,EAAE,GAAG,GAAG,GAAG,EAAE,QAAQ,CAAC;KAcA;IAZ5E,IACW,gBAAgB,CAAC,KAAyB,EAAA;AACjD,QAAA,IAAI,KAAK,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE;YACtB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,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,CAAA,EAAA,CAAA,CAAA;2FAUV,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAL/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,YAAY,EAAE,CAAC,oBAAoB,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,GAAG,oBAAoB,CAAC;AACxG,oBAAA,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC;AACrB,oBAAA,OAAO,EAAE,CAAC,GAAG,OAAO,EAAE,GAAG,oBAAoB,CAAC;AACjD,iBAAA,CAAA;;;AC3CD;;ACAA;;AAEG;;;;"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { MatDialogRef } from '@angular/material/dialog';
|
|
2
|
+
import { FormControl, FormGroup } from '@angular/forms';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export interface ClassDialogData {
|
|
5
|
+
/**
|
|
6
|
+
* CSS class names
|
|
7
|
+
*
|
|
8
|
+
* Eg:
|
|
9
|
+
*
|
|
10
|
+
* - `""`
|
|
11
|
+
* - `"my-class my-other-class"`
|
|
12
|
+
*/
|
|
13
|
+
class: string;
|
|
14
|
+
}
|
|
15
|
+
export declare class ClassDialogComponent {
|
|
16
|
+
private dialogRef;
|
|
17
|
+
readonly classControl: FormControl;
|
|
18
|
+
readonly form: FormGroup;
|
|
19
|
+
constructor(data: ClassDialogData, dialogRef: MatDialogRef<ClassDialogComponent, ClassDialogData>);
|
|
20
|
+
maybeConfirm(): void;
|
|
21
|
+
private confirm;
|
|
22
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ClassDialogComponent, never>;
|
|
23
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ClassDialogComponent, "ng-component", never, {}, {}, never, never>;
|
|
24
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { MatDialogRef } from '@angular/material/dialog';
|
|
2
|
+
import { FormControl, FormGroup } from '@angular/forms';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export interface ColorDialogData {
|
|
5
|
+
/**
|
|
6
|
+
* Empty string means no color set at all. Anything else must be a valid CSS color in hexa format.
|
|
7
|
+
*
|
|
8
|
+
* Eg:
|
|
9
|
+
*
|
|
10
|
+
* - `""`
|
|
11
|
+
* - `"#ff4000"`
|
|
12
|
+
*/
|
|
13
|
+
color: string;
|
|
14
|
+
}
|
|
15
|
+
export declare class ColorDialogComponent {
|
|
16
|
+
private dialogRef;
|
|
17
|
+
readonly colors: string[][];
|
|
18
|
+
readonly colorControl: FormControl;
|
|
19
|
+
readonly form: FormGroup;
|
|
20
|
+
constructor(data: ColorDialogData, dialogRef: MatDialogRef<ColorDialogComponent, ColorDialogData>);
|
|
21
|
+
maybeConfirm(): void;
|
|
22
|
+
private confirm;
|
|
23
|
+
selectColor(color: string): void;
|
|
24
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ColorDialogComponent, never>;
|
|
25
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ColorDialogComponent, "ng-component", never, {}, {}, never, never>;
|
|
26
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { OnDestroy } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* Prefix all CSS selectors with the given selector
|
|
5
|
+
*
|
|
6
|
+
* This is meant to be relatively simple and might not cover advanced CSS syntax
|
|
7
|
+
*/
|
|
8
|
+
export declare function prefixCss(prefix: string, css: string): string;
|
|
9
|
+
/**
|
|
10
|
+
* Inject custom CSS into component and scope the CSS only to this component
|
|
11
|
+
*
|
|
12
|
+
* Usage :
|
|
13
|
+
*
|
|
14
|
+
* ```html
|
|
15
|
+
* <div [naturalCustomCss]=".my-class {background: red}">
|
|
16
|
+
* <p class="my-class">foo bar</p>
|
|
17
|
+
* </div>
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
export declare class NaturalCustomCssDirective implements OnDestroy {
|
|
21
|
+
private readonly document;
|
|
22
|
+
private style;
|
|
23
|
+
private readonly id;
|
|
24
|
+
set naturalCustomCss(value: string | undefined);
|
|
25
|
+
constructor(document: Document);
|
|
26
|
+
ngOnDestroy(): void;
|
|
27
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NaturalCustomCssDirective, never>;
|
|
28
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<NaturalCustomCssDirective, "[naturalCustomCss]", never, { "naturalCustomCss": "naturalCustomCss"; }, {}, never>;
|
|
29
|
+
}
|
package/lib/editor.module.d.ts
CHANGED
|
@@ -1,21 +1,24 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "./
|
|
3
|
-
import * as i2 from "./
|
|
4
|
-
import * as i3 from "
|
|
5
|
-
import * as i4 from "
|
|
6
|
-
import * as i5 from "
|
|
7
|
-
import * as i6 from "@angular/
|
|
8
|
-
import * as i7 from "@angular/material/
|
|
9
|
-
import * as i8 from "@angular/material/
|
|
10
|
-
import * as i9 from "@angular/material/
|
|
11
|
-
import * as i10 from "@angular/material/
|
|
12
|
-
import * as i11 from "@angular/material/
|
|
13
|
-
import * as i12 from "@angular/material/
|
|
14
|
-
import * as i13 from "@angular/
|
|
15
|
-
import * as i14 from "@
|
|
16
|
-
import * as i15 from "@angular/material/
|
|
2
|
+
import * as i1 from "./class-dialog/class-dialog.component";
|
|
3
|
+
import * as i2 from "./color-dialog/color-dialog.component";
|
|
4
|
+
import * as i3 from "./link-dialog/link-dialog.component";
|
|
5
|
+
import * as i4 from "./editor/editor.component";
|
|
6
|
+
import * as i5 from "./custom-css/custom-css.directive";
|
|
7
|
+
import * as i6 from "@angular/common";
|
|
8
|
+
import * as i7 from "@angular/material/button";
|
|
9
|
+
import * as i8 from "@angular/material/button-toggle";
|
|
10
|
+
import * as i9 from "@angular/material/dialog";
|
|
11
|
+
import * as i10 from "@angular/material/divider";
|
|
12
|
+
import * as i11 from "@angular/material/form-field";
|
|
13
|
+
import * as i12 from "@angular/material/icon";
|
|
14
|
+
import * as i13 from "@angular/material/input";
|
|
15
|
+
import * as i14 from "@angular/material/menu";
|
|
16
|
+
import * as i15 from "@angular/material/toolbar";
|
|
17
|
+
import * as i16 from "@angular/material/tooltip";
|
|
18
|
+
import * as i17 from "@ecodev/natural";
|
|
19
|
+
import * as i18 from "@angular/forms";
|
|
17
20
|
export declare class NaturalEditorModule {
|
|
18
21
|
static ɵfac: i0.ɵɵFactoryDeclaration<NaturalEditorModule, never>;
|
|
19
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<NaturalEditorModule, [typeof i1.
|
|
22
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<NaturalEditorModule, [typeof i1.ClassDialogComponent, typeof i2.ColorDialogComponent, typeof i3.LinkDialogComponent, typeof i4.NaturalEditorComponent, typeof i5.NaturalCustomCssDirective], [typeof i6.CommonModule, typeof i7.MatButtonModule, typeof i8.MatButtonToggleModule, typeof i9.MatDialogModule, typeof i10.MatDividerModule, typeof i11.MatFormFieldModule, typeof i12.MatIconModule, typeof i13.MatInputModule, typeof i14.MatMenuModule, typeof i15.MatToolbarModule, typeof i16.MatTooltipModule, typeof i17.NaturalFileModule, typeof i17.NaturalIconModule, typeof i18.ReactiveFormsModule], [typeof i6.CommonModule, typeof i7.MatButtonModule, typeof i8.MatButtonToggleModule, typeof i9.MatDialogModule, typeof i10.MatDividerModule, typeof i11.MatFormFieldModule, typeof i12.MatIconModule, typeof i13.MatInputModule, typeof i14.MatMenuModule, typeof i15.MatToolbarModule, typeof i16.MatTooltipModule, typeof i17.NaturalFileModule, typeof i17.NaturalIconModule, typeof i18.ReactiveFormsModule, typeof i4.NaturalEditorComponent, typeof i5.NaturalCustomCssDirective]>;
|
|
20
23
|
static ɵinj: i0.ɵɵInjectorDeclaration<NaturalEditorModule>;
|
|
21
24
|
}
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { EditorState } from 'prosemirror-state';
|
|
2
|
+
import { MarkType } from 'prosemirror-model';
|
|
3
|
+
import { MenuItem, MenuItemSpec } from 'prosemirror-menu';
|
|
4
|
+
import { Item } from './item';
|
|
5
|
+
import { Command } from 'prosemirror-commands';
|
|
6
|
+
export declare function markActive(state: EditorState, type: MarkType): boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Convert built-in `MenuItem` into our Angular specific `Item`
|
|
9
|
+
*/
|
|
10
|
+
export declare function menuItemToItem(item: MenuItem): Item;
|
|
11
|
+
/**
|
|
12
|
+
* From a `Command`, creates a new `Item` that will have an automatic `enable` spec
|
|
13
|
+
*/
|
|
14
|
+
export declare function cmdToItem(cmd: Command, options?: Partial<MenuItemSpec>): Item;
|
|
15
|
+
/**
|
|
16
|
+
* From a `MarkType`, creates a new `Item` that will have an automatic `active` and `enable` spec
|
|
17
|
+
*/
|
|
18
|
+
export declare function markTypeToItem(markType: MarkType): Item;
|
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
|
-
import { Item } from './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';
|
|
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' | 'paragraphClass';
|
|
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 plain paragraph textblock. Represented in the DOM
|
|
4
|
+
* as a `<p>` element.
|
|
5
|
+
*
|
|
6
|
+
* https://github.com/ProseMirror/prosemirror-schema-basic/blob/master/src/schema-basic.js
|
|
7
|
+
*/
|
|
8
|
+
export declare const paragraphWithAlignment: NodeSpec;
|
|
File without changes
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { TableNodes, TableNodesOptions } from 'prosemirror-tables';
|
|
2
|
+
/**
|
|
3
|
+
* This function creates a set of [node
|
|
4
|
+
* specs](http://prosemirror.net/docs/ref/#model.SchemaSpec.nodes) for
|
|
5
|
+
* `table`, `table_row`, and `table_cell` nodes types.
|
|
6
|
+
*
|
|
7
|
+
* It is very directly inspired by prosemirror-table
|
|
8
|
+
*/
|
|
9
|
+
export declare function tableNodes(options: TableNodesOptions): TableNodes;
|
package/package.json
CHANGED
|
@@ -1,9 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ecodev/natural-editor",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "42.2.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": "github:Ecodev/natural",
|
|
6
6
|
"sideEffects": false,
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"sass": "./theming/_natural-editor.theme.scss",
|
|
10
|
+
"types": "./ecodev-natural-editor.d.ts",
|
|
11
|
+
"esm2020": "./esm2020/ecodev-natural-editor.mjs",
|
|
12
|
+
"es2020": "./fesm2020/ecodev-natural-editor.mjs",
|
|
13
|
+
"es2015": "./fesm2015/ecodev-natural-editor.mjs",
|
|
14
|
+
"node": "./fesm2015/ecodev-natural-editor.mjs",
|
|
15
|
+
"default": "./fesm2020/ecodev-natural-editor.mjs"
|
|
16
|
+
},
|
|
17
|
+
"./package.json": {
|
|
18
|
+
"default": "./package.json"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
7
21
|
"dependencies": {
|
|
8
22
|
"@types/prosemirror-commands": "^1.0.4",
|
|
9
23
|
"@types/prosemirror-dropcursor": "^1.0.3",
|
|
@@ -33,14 +47,14 @@
|
|
|
33
47
|
"tslib": "^2.3.0"
|
|
34
48
|
},
|
|
35
49
|
"peerDependencies": {
|
|
36
|
-
"@angular/common": "^
|
|
37
|
-
"@angular/core": "^
|
|
50
|
+
"@angular/common": "^13.2.0",
|
|
51
|
+
"@angular/core": "^13.2.0",
|
|
38
52
|
"@ecodev/natural": ">40.0"
|
|
39
53
|
},
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"fesm2015": "fesm2015/ecodev-natural-editor.
|
|
54
|
+
"module": "fesm2015/ecodev-natural-editor.mjs",
|
|
55
|
+
"es2020": "fesm2020/ecodev-natural-editor.mjs",
|
|
56
|
+
"esm2020": "esm2020/ecodev-natural-editor.mjs",
|
|
57
|
+
"fesm2020": "fesm2020/ecodev-natural-editor.mjs",
|
|
58
|
+
"fesm2015": "fesm2015/ecodev-natural-editor.mjs",
|
|
45
59
|
"typings": "ecodev-natural-editor.d.ts"
|
|
46
60
|
}
|