mirror of
https://github.com/codex-team/editor.js
synced 2026-03-14 14:45:47 +01:00
fix(inline-tool-link): use defaultValue to prevent selectionchange event (#2993)
* fix(inline-tool-link): use defaultValue to prevent selectionchange event * fix(link-tool): handle formatted linked text clicks * fix test errors * Revert "fix test errors" This reverts commit582e137b77. * Revert "fix(link-tool): handle formatted linked text clicks" This reverts commitae90e03c60.
This commit is contained in:
parent
a89f3d0eda
commit
b69aa1ed25
3 changed files with 6 additions and 2 deletions
|
|
@ -1,5 +1,9 @@
|
|||
# Changelog
|
||||
|
||||
### 2.31.4
|
||||
|
||||
- `Fix` - Prevent inline-toolbar re-renders when linked text is selected
|
||||
|
||||
### 2.31.3
|
||||
|
||||
- `Fix` - Prevent text formatting removal when applying link
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@editorjs/editorjs",
|
||||
"version": "2.31.3",
|
||||
"version": "2.31.4",
|
||||
"description": "Editor.js — open source block-style WYSIWYG editor with JSON output",
|
||||
"main": "dist/editorjs.umd.js",
|
||||
"module": "dist/editorjs.mjs",
|
||||
|
|
|
|||
|
|
@ -212,7 +212,7 @@ export default class LinkInlineTool implements InlineTool {
|
|||
*/
|
||||
const hrefAttr = anchorTag.getAttribute('href');
|
||||
|
||||
this.nodes.input.value = hrefAttr !== 'null' ? hrefAttr : '';
|
||||
this.nodes.input.defaultValue = hrefAttr !== 'null' ? hrefAttr : '';
|
||||
|
||||
this.selection.save();
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue