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

What should be done with linebreaks/softbreaks in Slate transform? #100

Closed
jeromesimeon opened this issue Oct 28, 2019 · 3 comments
Closed

Comments

@jeromesimeon
Copy link
Member

I'm unclear that this is what should be happening?

case 'Linebreak':
result = {
'object': 'block',
'type': 'paragraph',
'nodes': []
};
break;
case 'Softbreak':
result = {
'object': 'block',
'type': 'paragraph',
'nodes': []
};
break;

@jeromesimeon jeromesimeon added the Type: Question ❓ Further information is requested label Oct 28, 2019
@dselman dselman self-assigned this Nov 7, 2019
@dselman
Copy link
Contributor

dselman commented Nov 7, 2019

Interesting thread on this, including when to use <br/>
ckeditor/ckeditor5#4542

@jeromesimeon
Copy link
Member Author

Note on this thread:

  • Line breaks are two spaces followed by a new line within a paragraph
This is a line break  
with something after it
  • Softbreaks are just a new line
This is a softbreak
With something after it

In Dingus:
Screenshot 2019-11-07 at 2 01 14 PM

@dselman
Copy link
Contributor

dselman commented Nov 8, 2019

Resolved: linebreaks and soft breaks are both represented as inlines in the Slate DOM.

@dselman dselman closed this as completed Nov 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants