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 Multiline Issue #111

Open
msultanic opened this issue Jun 27, 2023 · 2 comments
Open

Placeholder Multiline Issue #111

msultanic opened this issue Jun 27, 2023 · 2 comments

Comments

@msultanic
Copy link

The placeholder attribute in the library component fails to handle line breaks correctly, resulting in component crashes. When using line breaks, such as "placeholder="This\nis\nplaceholder"," the component becomes non-functional.

Steps to Reproduce:

  1. Add the library component to a project.
  2. Set the placeholder attribute with line breaks.
  3. Run the project and observe the component crash.

Impact:
The inability to use line breaks in the placeholder attribute limits customization options and hinders user experience.

const placeholderText = "This\nis an\nexample";
...
quill={{
 modules: {
   toolbar: false,
 },
   placeholder: placeholderText,
}}
@jakehasler
Copy link

Hey @msultanic, my PR fixes this, #117.

If you use a template string (backticks), then this will render properly in conjunction with my PR.

`What's happening today?\nStart typing...`

@msultanic
Copy link
Author

Thanks @jakehasler!

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

2 participants