Skip to content

Commit

Permalink
Merge branch 'next' into pr/1431
Browse files Browse the repository at this point in the history
  • Loading branch information
khaydarov committed Nov 21, 2020
2 parents d056a0e + bfd0ea1 commit 7144bd7
Show file tree
Hide file tree
Showing 3 changed files with 30,580 additions and 4 deletions.
30,577 changes: 30,575 additions & 2 deletions dist/editor.js

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
- `Fix` - The problem with destroy() method [#1380](https://github.com/codex-team/editor.js/issues/1380).
- `Fix` - add getter keyword to `block.mergeable` method [#1415](https://github.com/codex-team/editor.js/issues/1415).
- `Fix` — Fix problem with entering to Editor.js by Tab key [#1393](https://github.com/codex-team/editor.js/issues/1393)
- `Fix` - Sanitize pasted block data [#1396](https://github.com/codex-team/editor.js/issues/1396).


### 2.19

Expand Down
5 changes: 3 additions & 2 deletions src/components/modules/paste.ts
Original file line number Diff line number Diff line change
Expand Up @@ -760,9 +760,10 @@ export default class Paste extends Module {
* @returns {void}
*/
private insertEditorJSData(blocks: Array<Pick<SavedData, 'data' | 'tool'>>): void {
const { BlockManager, Tools } = this.Editor;
const { BlockManager, Sanitizer, Tools } = this.Editor;
const sanitizedBlocks = Sanitizer.sanitizeBlocks(blocks);

blocks.forEach(({ tool, data }, i) => {
sanitizedBlocks.forEach(({ tool, data }, i) => {
let needToReplaceCurrentBlock = false;

if (i === 0) {
Expand Down

0 comments on commit 7144bd7

Please sign in to comment.