mirror of
https://github.com/codex-team/editor.js
synced 2024-05-15 21:06:52 +02:00
Fix: check for Files substitutions before handling files paste (#1928)
* FIX: Paste text from MS Word instead of image * changelog added * Update CHANGELOG.md * rm submodule change Co-authored-by: Peter Savchenko <specc.dev@gmail.com>
This commit is contained in:
parent
0d0f9e8de2
commit
811a41366b
|
@ -12,6 +12,7 @@
|
|||
- `Fix` — Wrong element not highlighted anymore when popover opened.
|
||||
- `Fix` — When Tunes Menu open keydown events can not be handled inside plugins.
|
||||
- `Fix` — If a Tool specifies some tags to substitute on paste, all attributes of that tags will be removed before passing them to the tool. Possible XSS vulnerability fixed.
|
||||
- `Fix` — Pasting from Microsoft Word to Chrome (Mac OS) fixed. Now if there is no image-tools connected, regular text content will be pasted.
|
||||
- `Fix` — Workaround for the HTMLJanitor bug with Tables (https://github.com/guardian/html-janitor/issues/3) added
|
||||
- `Improvement` — *Tools API* — `pasteConfig().tags` now support sanitizing configuration. It allows you to leave some explicitly specified attributes for pasted content.
|
||||
- `Improvement` — *CodeStyle* — [CodeX ESLint Config](https://github.com/codex-team/eslint-config) has bee updated. All ESLint/Spelling issues resolved
|
||||
|
|
|
@ -174,7 +174,7 @@ export default class Paste extends Module {
|
|||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
const includesFiles = types.includes ? types.includes('Files') : (types as any).contains('Files');
|
||||
|
||||
if (includesFiles) {
|
||||
if (includesFiles && !_.isEmpty(this.toolsFiles)) {
|
||||
await this.processFiles(dataTransfer.files);
|
||||
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue