@studysync/draft-js-modifiers 0.4.13 → 0.4.14

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.
@@ -65,7 +65,7 @@ var insertBlockAfter = function insertBlockAfter(editorState, keyBefore, blockPa
65
65
  }
66
66
  });
67
67
 
68
- return modified ? _draftJs.EditorState.push(editorState, _draftJs.ContentState.createFromBlockArray(Array.from(newBlockMap.values())).set('selectionBefore', contentState.getSelectionBefore()).set('selectionAfter', contentState.getSelectionAfter()), 'split-block') : editorState;
68
+ return modified ? _draftJs.EditorState.push(editorState, _draftJs.ContentState.createFromBlockArray(Array.from(newBlockMap.values())).set('selectionBefore', contentState.getSelectionBefore()).set('selectionAfter', contentState.getSelectionAfter()), 'insert-fragment') : editorState;
69
69
  };
70
70
 
71
71
  var _default = insertBlockAfter;
@@ -65,7 +65,7 @@ var insertBlockBefore = function insertBlockBefore(editorState, keyBefore, block
65
65
  }
66
66
  });
67
67
 
68
- return modified ? _draftJs.EditorState.push(editorState, _draftJs.ContentState.createFromBlockArray(Array.from(newBlockMap.values())).set('selectionBefore', contentState.getSelectionBefore()).set('selectionAfter', contentState.getSelectionAfter()), 'split-block') : editorState;
68
+ return modified ? _draftJs.EditorState.push(editorState, _draftJs.ContentState.createFromBlockArray(Array.from(newBlockMap.values())).set('selectionBefore', contentState.getSelectionBefore()).set('selectionAfter', contentState.getSelectionAfter()), 'insert-fragment') : editorState;
69
69
  };
70
70
 
71
71
  var _default = insertBlockBefore;
@@ -65,7 +65,7 @@ var insertBlockAfter = function insertBlockAfter(editorState, keyBefore, blockPa
65
65
  }
66
66
  });
67
67
 
68
- return modified ? _draftJs.EditorState.push(editorState, _draftJs.ContentState.createFromBlockArray(Array.from(newBlockMap.values())).set('selectionBefore', contentState.getSelectionBefore()).set('selectionAfter', contentState.getSelectionAfter()), 'split-block') : editorState;
68
+ return modified ? _draftJs.EditorState.push(editorState, _draftJs.ContentState.createFromBlockArray(Array.from(newBlockMap.values())).set('selectionBefore', contentState.getSelectionBefore()).set('selectionAfter', contentState.getSelectionAfter()), 'insert-fragment') : editorState;
69
69
  };
70
70
 
71
71
  var _default = insertBlockAfter;
@@ -65,7 +65,7 @@ var insertBlockBefore = function insertBlockBefore(editorState, keyBefore, block
65
65
  }
66
66
  });
67
67
 
68
- return modified ? _draftJs.EditorState.push(editorState, _draftJs.ContentState.createFromBlockArray(Array.from(newBlockMap.values())).set('selectionBefore', contentState.getSelectionBefore()).set('selectionAfter', contentState.getSelectionAfter()), 'split-block') : editorState;
68
+ return modified ? _draftJs.EditorState.push(editorState, _draftJs.ContentState.createFromBlockArray(Array.from(newBlockMap.values())).set('selectionBefore', contentState.getSelectionBefore()).set('selectionAfter', contentState.getSelectionAfter()), 'insert-fragment') : editorState;
69
69
  };
70
70
 
71
71
  var _default = insertBlockBefore;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@studysync/draft-js-modifiers",
3
- "version": "0.4.13",
3
+ "version": "0.4.14",
4
4
  "description": "Modular state modifiers for Draft.js",
5
5
  "main": "index.js",
6
6
  "module": "es/index.js",
@@ -34,7 +34,7 @@ const insertBlockAfter = (editorState, keyBefore, blockParams) => {
34
34
  .createFromBlockArray(Array.from(newBlockMap.values()))
35
35
  .set('selectionBefore', contentState.getSelectionBefore())
36
36
  .set('selectionAfter', contentState.getSelectionAfter()),
37
- 'split-block'
37
+ 'insert-fragment'
38
38
  )
39
39
  : editorState
40
40
  }
@@ -34,7 +34,7 @@ const insertBlockBefore = (editorState, keyBefore, blockParams) => {
34
34
  .createFromBlockArray(Array.from(newBlockMap.values()))
35
35
  .set('selectionBefore', contentState.getSelectionBefore())
36
36
  .set('selectionAfter', contentState.getSelectionAfter()),
37
- 'split-block'
37
+ 'insert-fragment'
38
38
  )
39
39
  : editorState
40
40
  }