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

In WYSIWYG editor, you can't insert a paragraph between code blocks, tables #2008

Closed
ebinary opened this issue Nov 10, 2021 · 2 comments
Closed
Labels
Milestone

Comments

@ebinary
Copy link

ebinary commented Nov 10, 2021

Describe the bug

Because the cursor is positioned to edit the content of the markdown in the case of tables and code-blocks, there is no way to move the cursor outside of the block to insert a paragraph (unless a intervening line already exists). Hence you have to return to markdown in order to continue typing between code blocks (or tables). Tables actually have a micro-second (after pressing END key from the last cell) where you can sometimes press return and create a new paragraph... but if you miss it, you will end up inside the last cell, adding a paragraph there instead.

It seems that the WYSIWYG editor needs to provide a neutral cursor position at the end of a line after backspace-from-previous-line and press-END-on-current line that will accept a return to begin an unformatted paragraph.

To Reproduce

Steps to reproduce the behavior:
On your current landing page (v3.1.1), enter the following markdown:

fred
barney
col1 col2
1 2
wilma

Now, In the WYSIWYG tab, attempt to begin a new paragraph between any of those blocks. Try to continue typing after the last block. I can't find a way to do it (without first adding a blank line in markdown), can you?

  1. See error

Expected behavior

As you move you cursor backward from previous line or jump to END OF LINE, the cursor should land in a empty out-of-block area that will accept new typing, primarily a paragraph.

Screenshots

everything looks fine, you just can't actually create new context outside the blocks in WYSIWYG

Desktop (please complete the following information):

  • version 3.1.1 of tui-editor
  • Windows 10 - Chrome latest
@ebinary ebinary added the Bug label Nov 10, 2021
@ebinary ebinary changed the title In WYSIWYG editor, you can't insert a paragraph between code blocks, tabls In WYSIWYG editor, you can't insert a paragraph between code blocks, tables Nov 10, 2021
@js87zz
Copy link
Contributor

js87zz commented Nov 18, 2021

@ebinary
I checked that it was impossible to insert paragraphs between consecutive code blocks. I will fix it.

  • Notes
    The table and the last code block can be controlled by moving the cursor as below. I'm attaching an image because I think this content will help a little.
    2021-11-18 21-32-28 2021-11-18 21_39_10

@js87zz js87zz added this to the v3.1.3 milestone Feb 10, 2022
@js87zz
Copy link
Contributor

js87zz commented Feb 10, 2022

@ebinary
Thanks for long wating.
The bug has been fixed in v3.1.3(#2250)
You can exit code block or table using Command + Enter(mac), Ctrl + Enter(other platform).

@js87zz js87zz closed this as completed Feb 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants