react-native-cn-quill
react-native-cn-quill copied to clipboard
Placeholder Multiline Issue
trafficstars
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:
- Add the library component to a project.
- Set the placeholder attribute with line breaks.
- 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,
}}
Hey @msultanic, my PR fixes this, https://github.com/imnapo/react-native-cn-quill/pull/117.
If you use a template string (backticks), then this will render properly in conjunction with my PR.
`What's happening today?\nStart typing...`
Thanks @jakehasler!