codex-team / editor.js

A block-style editor with clean JSON output
https://editorjs.io
Apache License 2.0
28.18k stars 2.06k forks source link

[Bug] #1800

Open thopaw opened 2 years ago

thopaw commented 2 years ago

When using an inline tool the editor worked not correct when the inline tag is removed completely (e.g. using backspace) and then you type again.

I created my own version of the mark-inline-tool which adds some data attributes to the mark-tag. When I remove the highlighted tag and re-type again, it inserts a tag with some styling.

The bold and italic tool is working but I guess that is only the case as it is not adding some classes or other attributes to the inserted tag. The official mark inline tool has this bug also.

Steps to reproduce:

  1. use an inline tool to mark some text
  2. delete all marked characters with backspace
  3. start to type new characters

Expected behavior:

One of these:

after deleting all inline marked characters and typing new characters

  • the new characters are not marked by the used inline tool
  • the new characters are marked exactly as the removed ones. With the same tag with the same attributes

Screenshots:

Peek 2021-10-13 20-48-editorjs

Device, Browser, OS: Chrome (Chromium: 90.0.4430.212), Ubuntu 04.2021

Editor.js version: "@editorjs/editorjs": "^2.22.2",

Plugins you use with their versions: own version of inline tool

neSpecc commented 2 years ago

The issue title is not descriptive