@modusoperandi/licit 0.13.20 → 0.13.21

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/.eslintrc.js CHANGED
@@ -42,6 +42,8 @@ module.exports = {
42
42
  Document: true,
43
43
  Element: false,
44
44
  Event: false,
45
+ FormData: false,
46
+ fetch: false,
45
47
  HTMLElement: false,
46
48
  HTMLTableCellElement: false,
47
49
  HTMLButtonElement: false,
@@ -69,6 +71,7 @@ module.exports = {
69
71
  require: false,
70
72
  requestAnimationFrame: false,
71
73
  setTimeout: false,
74
+ URL: false,
72
75
  window: false,
73
76
  },
74
77
  overrides: [
package/README.md CHANGED
@@ -11,6 +11,7 @@
11
11
 
12
12
 
13
13
 
14
+
14
15
  <h1 align="center">Licit Editor</h1>
15
16
 
16
17
  <div align="center">
@@ -67,6 +68,7 @@ npm install
67
68
 
68
69
  In order to upload image work correctly, "images" folder is expected outside the root folder 'licit'.
69
70
 
71
+
70
72
  ### Start the collaboration server
71
73
  ```
72
74
  In Windows
@@ -198,7 +200,7 @@ Please refer *licit\client\index.js* for getting more detailed idea on passing p
198
200
  | embedded|To disable/enable inline behavior of the editor|false
199
201
  | fitToContent|To disable/enable fit to content behavior of the editor|false
200
202
  | runtime|To pass runtime to the editor. No value means default EditorRuntime | Expects a post method '*saveimage?fn=*' in the server with input parameters *File name and File object*, and this post method parse the form data and return response in JSON format (*{id: string, height: < height of the image>, src: <relative/full_path_of_the_image>, width: < width_of_the_image>}*). Please refer *licit\utils\build_web_server.js* for '*saveimage*' method sample.To configure style service to licit expects methods to saveStyle(),getStyles(),renameStyle() and removeStyle(). Please refer *licit\src\client\LicitRuntime.js* for getting more detailed idea.
201
- | plugins| Array of prosemirror plugin object to pass external prosemirror plugins to the editor. No value means no external plugins | Expects a method '*getEffectiveSchema*' in the prosemirror plugin object that returns new schema object which is the effective schema modified with the current editor schema, that is passed as the input parameter to this method.
203
+ | plugins| Array of prosemirror plugin object to pass external prosemirror plugins to the editor. No value means no external plugins | Expects a method '*getEffectiveSchema*' in the prosemirror plugin object that returns new schema object which is the effective schema modified with the current editor schema, that is passed as the input parameter to this method. Also must follow a order for adding the plugins in the plugin array. And the order is the licit-plugin-contrib-styles plugin and objectId plugin should be the last items in that pluigin array.The reason for this is: Style should be handled after all the other plugins handle their own rendering. And ObjectID is required for all artifacts.
202
204
 
203
205
  |Event Name| Description|Parameter|
204
206
  |--|--|--|
@@ -89,15 +89,6 @@ class LinkTooltipView {
89
89
  return;
90
90
  }
91
91
 
92
- let {
93
- tr
94
- } = state;
95
-
96
- const linkSelection = _prosemirrorState.TextSelection.create(tr.doc, result.from.pos, result.to.pos + 1);
97
-
98
- tr = tr.setSelection(linkSelection);
99
- tr = (0, _SelectionPlaceholderPlugin.showSelectionPlaceholder)(state, tr);
100
- view.dispatch(tr);
101
92
  const href = result.mark.attrs.href;
102
93
  this._editor = (0, _licitUiCommands.createPopUp)(_LinkURLEditor.default, {
103
94
  href
@@ -7,7 +7,6 @@ import { EditorView } from 'prosemirror-view';
7
7
  import { MARK_LINK } from './MarkNames';
8
8
  import {
9
9
  hideSelectionPlaceholder,
10
- showSelectionPlaceholder,
11
10
  } from './SelectionPlaceholderPlugin';
12
11
  import { applyMark } from '@modusoperandi/licit-ui-commands';
13
12
  import { findNodesWithSameMark } from '@modusoperandi/licit-ui-commands';
@@ -127,16 +126,6 @@ class LinkTooltipView {
127
126
  if (!result) {
128
127
  return;
129
128
  }
130
- let { tr } = state;
131
- const linkSelection = TextSelection.create(
132
- tr.doc,
133
- result.from.pos,
134
- result.to.pos + 1
135
- );
136
-
137
- tr = tr.setSelection(linkSelection);
138
- tr = showSelectionPlaceholder(state, tr);
139
- view.dispatch(tr);
140
129
 
141
130
  const href = result.mark.attrs.href;
142
131
  this._editor = createPopUp(
@@ -38,7 +38,8 @@ const ListItemNodeSpec = {
38
38
  // This spec does not support nested lists (e.g. `'paragraph block*'`)
39
39
  // as content because of the complexity of dealing with indentation
40
40
  // (context: https://github.com/ProseMirror/prosemirror/issues/92).
41
- content: '(bullet_list|paragraph)+',
41
+ // content: '(bullet_list|paragraph)+',
42
+ content: 'paragraph block*',
42
43
  parseDOM: [{
43
44
  tag: 'li',
44
45
  getAttrs
@@ -29,7 +29,8 @@ 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: '(bullet_list|paragraph)+',
32
+ // content: '(bullet_list|paragraph)+',
33
+ content: 'paragraph block*',
33
34
 
34
35
  parseDOM: [{ tag: 'li', getAttrs }],
35
36