@modusoperandi/licit 0.13.18 → 0.13.20
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/ListItemNodeSpec.js +1 -1
- package/dist/ListItemNodeSpec.js.flow +1 -1
- package/dist/bom.xml +538 -538
- package/dist/convertFromHTML.js +1 -9
- package/dist/convertFromHTML.js.flow +1 -13
- package/licit/server/collab/server.js +6 -1
- package/package.json +3 -3
- package/src/ListItemNodeSpec.js +1 -1
- package/src/convertFromHTML.js +1 -13
package/dist/convertFromHTML.js
CHANGED
|
@@ -15,14 +15,6 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
15
15
|
|
|
16
16
|
function convertFromHTML(html, schema, plugins) {
|
|
17
17
|
const root = document.createElement('html');
|
|
18
|
-
root.innerHTML =
|
|
18
|
+
root.innerHTML = html ? html : ' ';
|
|
19
19
|
return (0, _convertFromDOMElement.default)(root, schema, plugins);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
function unEscape(htmlStr) {
|
|
23
|
-
if (htmlStr) {
|
|
24
|
-
htmlStr = htmlStr.replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"').replace(/'/g, "'").replace(/&/g, '&');
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
return htmlStr;
|
|
28
20
|
}
|
|
@@ -12,18 +12,6 @@ export default function convertFromHTML(
|
|
|
12
12
|
plugins: Array<Plugin>
|
|
13
13
|
): EditorState {
|
|
14
14
|
const root = document.createElement('html');
|
|
15
|
-
root.innerHTML =
|
|
15
|
+
root.innerHTML = html ? html : ' ';
|
|
16
16
|
return convertFromDOMElement(root, schema, plugins);
|
|
17
17
|
}
|
|
18
|
-
|
|
19
|
-
function unEscape(htmlStr) {
|
|
20
|
-
if (htmlStr) {
|
|
21
|
-
htmlStr = htmlStr
|
|
22
|
-
.replace(/</g, '<')
|
|
23
|
-
.replace(/>/g, '>')
|
|
24
|
-
.replace(/"/g, '"')
|
|
25
|
-
.replace(/'/g, "'")
|
|
26
|
-
.replace(/&/g, '&');
|
|
27
|
-
}
|
|
28
|
-
return htmlStr;
|
|
29
|
-
}
|
|
@@ -93,7 +93,12 @@ function readStreamAsJSON(stream, callback) {
|
|
|
93
93
|
stream.on('end', () => {
|
|
94
94
|
let result, error;
|
|
95
95
|
try {
|
|
96
|
-
|
|
96
|
+
if (typeof data === 'string') {
|
|
97
|
+
result = JSON.parse(data);
|
|
98
|
+
}
|
|
99
|
+
else {
|
|
100
|
+
result = data;
|
|
101
|
+
}
|
|
97
102
|
} catch (e) {
|
|
98
103
|
error = e;
|
|
99
104
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@modusoperandi/licit",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.20",
|
|
4
4
|
"subversion": "1",
|
|
5
5
|
"description": "Rich text editor built with React and ProseMirror",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -89,8 +89,8 @@
|
|
|
89
89
|
"write-file-webpack-plugin": "4.5.1"
|
|
90
90
|
},
|
|
91
91
|
"dependencies": {
|
|
92
|
-
"@modusoperandi/licit-doc-attrs-step": "^0.1.
|
|
93
|
-
"@modusoperandi/licit-ui-commands": "^0.1.
|
|
92
|
+
"@modusoperandi/licit-doc-attrs-step": "^0.1.3",
|
|
93
|
+
"@modusoperandi/licit-ui-commands": "^0.1.6",
|
|
94
94
|
"@wojtekmaj/enzyme-adapter-react-17": "^0.6.7",
|
|
95
95
|
"body-parser": "^1.19.0",
|
|
96
96
|
"browserkeymap": "2.0.2",
|
package/src/ListItemNodeSpec.js
CHANGED
|
@@ -29,7 +29,7 @@ const ListItemNodeSpec: NodeSpec = {
|
|
|
29
29
|
// This spec does not support nested lists (e.g. `'paragraph block*'`)
|
|
30
30
|
// as content because of the complexity of dealing with indentation
|
|
31
31
|
// (context: https://github.com/ProseMirror/prosemirror/issues/92).
|
|
32
|
-
content: 'paragraph',
|
|
32
|
+
content: '(bullet_list|paragraph)+',
|
|
33
33
|
|
|
34
34
|
parseDOM: [{ tag: 'li', getAttrs }],
|
|
35
35
|
|
package/src/convertFromHTML.js
CHANGED
|
@@ -12,18 +12,6 @@ export default function convertFromHTML(
|
|
|
12
12
|
plugins: Array<Plugin>
|
|
13
13
|
): EditorState {
|
|
14
14
|
const root = document.createElement('html');
|
|
15
|
-
root.innerHTML =
|
|
15
|
+
root.innerHTML = html ? html : ' ';
|
|
16
16
|
return convertFromDOMElement(root, schema, plugins);
|
|
17
17
|
}
|
|
18
|
-
|
|
19
|
-
function unEscape(htmlStr) {
|
|
20
|
-
if (htmlStr) {
|
|
21
|
-
htmlStr = htmlStr
|
|
22
|
-
.replace(/</g, '<')
|
|
23
|
-
.replace(/>/g, '>')
|
|
24
|
-
.replace(/"/g, '"')
|
|
25
|
-
.replace(/'/g, "'")
|
|
26
|
-
.replace(/&/g, '&');
|
|
27
|
-
}
|
|
28
|
-
return htmlStr;
|
|
29
|
-
}
|