codex-team / codex-team/editor.js

Unexpected behavior with part of inline tools

Open
#2,940 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
31.9k
Forks
2.2k
Avg merge
1d 1h
Merged PRs (30d)
1

Description

Describe a bug. When you use styles (reproduced on underline and strikethrough) from inline toolbar for one text block, then press Shift+Enter (soft line break) or continue typing, then try to type something, it will contain old styles (which is probably fine behavior), but when you choose this part of text and try to disable new styles, it will disable it for all the text block, not only for choosen text. When you use "bold" or "italic" styles it works as expected, but with strikethrough and underline I got problems.

Steps to reproduce:
1. Go to editorjs text block
2. Type any text, for example: "This is my text"
3. Choose everything and cover with underline or strikethrough
4. choose "text" and try to disable strikethrough or underline

Expected behavior:
Choosen part became not underlined, while other contains it styles.

Video with this bug below:

https://github.com/user-attachments/assets/b5208f67-0fae-4009-bdfc-1e2d58f792d1

https://github.com/user-attachments/assets/c4916612-0534-43be-8787-f5c04526f318

PC, Windows, Chrome 137.0.7151.56.

Editor.js version: 2.30.8

Plugins you use with their versions:
@editorjs/paragraph@^2.11.7
@editorjs/underline@^1.2.1
@sotaproject/strikethrough@^1.0.1

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.