Fixed sanitizer on pasting HTML (#1686)

* Fixed pasting sanitizer

* Actualized code

* Update CHANGELOG.md

Co-authored-by: Oleh Kotyay <o.kotyay@ideil.com>
Co-authored-by: Peter Savchenko <specc.dev@gmail.com>
This commit is contained in:
Oleh 2022-04-26 22:42:23 +03:00 committed by GitHub
parent 13b8e11a21
commit 25f7ec2456
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View file

@ -8,6 +8,7 @@
- `Fix``UI` — the Toolbar won't move on hover at mobile viewports. Resolves [#1972](https://github.com/codex-team/editor.js/issues/1972)
- `Fix``OnChange` event invocation after block insertion. [#1997](https://github.com/codex-team/editor.js/issues/1997)
- `Fix``ReadOnly` — the `readonly.isEnabled` API getter now works correctly after `readonly.toggle()` calling. Resolves [#1822](https://github.com/codex-team/editor.js/issues/1822)
- `Fix``Paste` — the inline HTML tags now will be preserved on pasting. [#1686](https://github.com/codex-team/editor.js/pull/1686)
### 2.23.2

View file

@ -662,7 +662,7 @@ export default class Paste extends Module {
/** If there is no pattern substitute - insert string as it is */
if (BlockManager.currentBlock && BlockManager.currentBlock.currentInput) {
const currentToolSanitizeConfig = BlockManager.currentBlock.tool.sanitizeConfig;
const currentToolSanitizeConfig = BlockManager.currentBlock.tool.baseSanitizeConfig;
document.execCommand(
'insertHTML',