-
Notifications
You must be signed in to change notification settings - Fork 51
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
Enter line break into typed text #30
Comments
I've been using |
May be you should add this to your
|
If you're using it this way, it won't work: However, if you insert it as a data property, it works:
Good luck! |
I dont know if anyone is still dealing with this issue, I have written a quick fix to the issue. Its not perfect but does the job. You will run the text through a Method that will auto add in the line breaks automatically.
The reason for the startTypers is because they will run the formatText method before the div has been rendered. Meaning you won't be able to get the clientWidth of the parent div.
The Parameters for formatText are the Text that you want to have the line breaks added in, The name of the ref, and the size of the span(Chars) that is rendered (22 was the default for the font and font-size I used in my use case, yours will vary) Hopefully this helps |
Hello, is there any way to enter a line break into the typed text?
When I use
<br />
, it simply gets printed to the screen.The text was updated successfully, but these errors were encountered: