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

placeholder attribute value with line breaks renders in a single line #1174

Closed
jroy-dialpad opened this issue Nov 9, 2020 · 2 comments
Closed
Labels
bug:ui Bug in UI (trumbowyg.scss)

Comments

@jroy-dialpad
Copy link

PS thank you for a great library.

Description

I'd like to show a placeholder with multiline content, but trumbowyg seems to lose the linebreaks.

How to reproduce?

  • Render a textarea with a placeholder attribute, where the attribute value has line breaks
  • Trumbowygize it. The placeholder is all on a single line.

https://jsfiddle.net/ojf0pmyw/30/

@jroy-dialpad
Copy link
Author

jroy-dialpad commented Nov 9, 2020

This style hack seems to fix it, but not sure what else it may break:

<style>
.trumbowyg-editor[contenteditable=true]:empty:not(:focus)::before {
  white-space: break-spaces;
}
</style>

https://jsfiddle.net/25earns8/1/

@Alex-D Alex-D closed this as completed in 85a9e66 Nov 25, 2020
@Alex-D
Copy link
Owner

Alex-D commented Nov 25, 2020

Thank you for the fix :)

@Alex-D Alex-D added the bug:ui Bug in UI (trumbowyg.scss) label Nov 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug:ui Bug in UI (trumbowyg.scss)
Projects
None yet
Development

No branches or pull requests

2 participants