Skip to content

Commit

Permalink
Change paste function of text/plain (#1014)
Browse files Browse the repository at this point in the history
Co-authored-by: Georgy Berezhnoy <[email protected]>
  • Loading branch information
hata6502 and gohabereg authored Mar 14, 2020
1 parent 8b838bf commit a5513a3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dist/editor.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
- `New` — Add in-house copy-paste support through `application/x-editor-js` mime-type
- `New` Block [lifecycle hook](tools.md#block-lifecycle-hooks) `moved`
- `Deprecated`[`blocks.swap(fromIndex, toIndex)`](api.md) method is deprecated. Use `blocks.move(toIndex, fromIndex)` instead.
- `Fix` — Improve plain text paste [#1012](https://github.com/codex-team/editor.js/issues/1012)

### 2.16.1

Expand Down
2 changes: 1 addition & 1 deletion src/components/modules/paste.ts
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@ export default class Paste extends Module {
.map((text) => {
const content = $.make('div');

content.innerHTML = text;
content.textContent = text;

const event = this.composePasteEvent('tag', {
data: content,
Expand Down

0 comments on commit a5513a3

Please sign in to comment.