Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Line breaker on top of editor uses the wrong type of enter #4895

Open
Klaesy opened this issue Mar 20, 2025 · 0 comments
Open

Line breaker on top of editor uses the wrong type of enter #4895

Klaesy opened this issue Mar 20, 2025 · 0 comments

Comments

@Klaesy
Copy link

Klaesy commented Mar 20, 2025

Scenario:
Have two editors, the first using the option enter: NaN and the second using enter: p. In the second editor we add a new table to the top of the editable field. Now we use the line breaker plugin to insert a new inline above the table.

Expected Behavior:
An empty paragraph is added.

Actual Behavior:
A line break is added.

Analysis:
The default tag to use for the line break is retrieved using editor.html.defaultTag(), however the editor used here is the first editor (using NaN). This is incorrect since we are creating a new line in the editable field of the second editor, which we have access to via the variable instance.

Proposed solution:
Use instance.html.defaultTag() instead of editor.html.defaultTag().

Editor version:
4.4.0

OS:
Windows 11

Browser:
Chrome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant