dn-react-text-editor 0.3.9 → 0.3.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -987,7 +987,7 @@ var TextEditorController = class {
987
987
  this.view.dispatch(tr);
988
988
  }
989
989
  constructor(props = {}) {
990
- this.schema = createSchema();
990
+ this.schema = props.schema || createSchema();
991
991
  this.props = props;
992
992
  this.subject = new import_rxjs2.Subject();
993
993
  this.prosemirrorParser = import_prosemirror_model3.DOMParser.fromSchema(this.schema);
package/dist/index.mjs CHANGED
@@ -954,7 +954,7 @@ var TextEditorController = class {
954
954
  this.view.dispatch(tr);
955
955
  }
956
956
  constructor(props = {}) {
957
- this.schema = createSchema();
957
+ this.schema = props.schema || createSchema();
958
958
  this.props = props;
959
959
  this.subject = new Subject();
960
960
  this.prosemirrorParser = DOMParser.fromSchema(this.schema);
@@ -979,7 +979,7 @@ var TextEditorController = class {
979
979
  this.view.dispatch(tr);
980
980
  }
981
981
  constructor(props = {}) {
982
- this.schema = createSchema();
982
+ this.schema = props.schema || createSchema();
983
983
  this.props = props;
984
984
  this.subject = new import_rxjs2.Subject();
985
985
  this.prosemirrorParser = import_prosemirror_model3.DOMParser.fromSchema(this.schema);
@@ -954,7 +954,7 @@ var TextEditorController = class {
954
954
  this.view.dispatch(tr);
955
955
  }
956
956
  constructor(props = {}) {
957
- this.schema = createSchema();
957
+ this.schema = props.schema || createSchema();
958
958
  this.props = props;
959
959
  this.subject = new Subject();
960
960
  this.prosemirrorParser = DOMParser.fromSchema(this.schema);
@@ -8,6 +8,7 @@ import './schema.mjs';
8
8
  import 'orderedmap';
9
9
 
10
10
  type TextEditorControllerProps = {
11
+ schema?: Schema;
11
12
  mode?: "html" | "text";
12
13
  state?: Partial<EditorStateConfig>;
13
14
  editor?: Partial<DirectEditorProps>;
@@ -8,6 +8,7 @@ import './schema.js';
8
8
  import 'orderedmap';
9
9
 
10
10
  type TextEditorControllerProps = {
11
+ schema?: Schema;
11
12
  mode?: "html" | "text";
12
13
  state?: Partial<EditorStateConfig>;
13
14
  editor?: Partial<DirectEditorProps>;
@@ -945,7 +945,7 @@ var TextEditorController = class {
945
945
  this.view.dispatch(tr);
946
946
  }
947
947
  constructor(props = {}) {
948
- this.schema = createSchema();
948
+ this.schema = props.schema || createSchema();
949
949
  this.props = props;
950
950
  this.subject = new import_rxjs.Subject();
951
951
  this.prosemirrorParser = import_prosemirror_model3.DOMParser.fromSchema(this.schema);
@@ -912,7 +912,7 @@ var TextEditorController = class {
912
912
  this.view.dispatch(tr);
913
913
  }
914
914
  constructor(props = {}) {
915
- this.schema = createSchema();
915
+ this.schema = props.schema || createSchema();
916
916
  this.props = props;
917
917
  this.subject = new Subject();
918
918
  this.prosemirrorParser = DOMParser.fromSchema(this.schema);
package/package.json CHANGED
@@ -1,59 +1,59 @@
1
1
  {
2
- "name": "dn-react-text-editor",
3
- "version": "0.3.9",
4
- "types": "./dist/index.d.ts",
5
- "main": "./dist/index.mjs",
6
- "module": "./dist/index.js",
7
- "sideEffects": false,
8
- "exports": {
9
- ".": {
10
- "types": "./dist/index.d.ts",
11
- "import": "./dist/index.mjs",
12
- "require": "./dist/index.js"
13
- },
14
- "./prosemirror": {
15
- "types": "./dist/prosemirror/index.d.ts",
16
- "import": "./dist/prosemirror/index.mjs",
17
- "require": "./dist/prosemirror/index.js"
18
- }
2
+ "name": "dn-react-text-editor",
3
+ "version": "0.3.10",
4
+ "types": "./dist/index.d.ts",
5
+ "main": "./dist/index.mjs",
6
+ "module": "./dist/index.js",
7
+ "sideEffects": false,
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.mjs",
12
+ "require": "./dist/index.js"
19
13
  },
20
- "scripts": {
21
- "build": "NODE_OPTIONS='--max-old-space-size=16384' tsup",
22
- "dev": "tsup --watch"
23
- },
24
- "repository": {
25
- "type": "git",
26
- "url": "git+https://github.com/dndnsoft/dn-react-text-editor.git"
27
- },
28
- "author": "",
29
- "license": "MIT",
30
- "bugs": {
31
- "url": "https://github.com/dndnsoft/dn-react-text-editor/issues"
32
- },
33
- "homepage": "https://github.com/dndnsoft/dn-react-text-editor#readme",
34
- "description": "",
35
- "devDependencies": {
36
- "@types/node": "^24.10.1",
37
- "@types/react": "^19",
38
- "@types/react-dom": "^19",
39
- "tsup": "^8.5.1",
40
- "typescript": "^5.7.3"
41
- },
42
- "peerDependencies": {
43
- "react": "^19",
44
- "react-dom": "^19"
45
- },
46
- "dependencies": {
47
- "highlight.js": "^11.11.1",
48
- "html-entities": "^2.6.0",
49
- "prosemirror-commands": "^1.7.1",
50
- "prosemirror-highlightjs": "^0.9.1",
51
- "prosemirror-history": "^1.5.0",
52
- "prosemirror-keymap": "^1.2.3",
53
- "prosemirror-model": "^1.25.4",
54
- "prosemirror-schema-list": "^1.5.1",
55
- "prosemirror-state": "^1.4.4",
56
- "prosemirror-view": "^1.41.3",
57
- "rxjs": "^7.8.2"
14
+ "./prosemirror": {
15
+ "types": "./dist/prosemirror/index.d.ts",
16
+ "import": "./dist/prosemirror/index.mjs",
17
+ "require": "./dist/prosemirror/index.js"
58
18
  }
59
- }
19
+ },
20
+ "scripts": {
21
+ "build": "NODE_OPTIONS='--max-old-space-size=16384' tsup",
22
+ "dev": "tsup --watch"
23
+ },
24
+ "repository": {
25
+ "type": "git",
26
+ "url": "git+https://github.com/dndnsoft/dn-react-text-editor.git"
27
+ },
28
+ "author": "",
29
+ "license": "MIT",
30
+ "bugs": {
31
+ "url": "https://github.com/dndnsoft/dn-react-text-editor/issues"
32
+ },
33
+ "homepage": "https://github.com/dndnsoft/dn-react-text-editor#readme",
34
+ "description": "",
35
+ "devDependencies": {
36
+ "@types/node": "^24.10.1",
37
+ "@types/react": "^19",
38
+ "@types/react-dom": "^19",
39
+ "tsup": "^8.5.1",
40
+ "typescript": "^5.7.3"
41
+ },
42
+ "peerDependencies": {
43
+ "react": "^19",
44
+ "react-dom": "^19"
45
+ },
46
+ "dependencies": {
47
+ "highlight.js": "^11.11.1",
48
+ "html-entities": "^2.6.0",
49
+ "prosemirror-commands": "^1.7.1",
50
+ "prosemirror-highlightjs": "^0.9.1",
51
+ "prosemirror-history": "^1.5.0",
52
+ "prosemirror-keymap": "^1.2.3",
53
+ "prosemirror-model": "^1.25.4",
54
+ "prosemirror-schema-list": "^1.5.1",
55
+ "prosemirror-state": "^1.4.4",
56
+ "prosemirror-view": "^1.41.3",
57
+ "rxjs": "^7.8.2"
58
+ }
59
+ }