Replies: 1 comment
-
What happens if you setText with html tags? My expectation would be that they are escaped. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I understood that SetText() call in etherpad API will be able to set the text all at once in a single span tag.
But I have a requirement of streaming text into Etherpad where in which I need every word in a given sentence to be set under individual span tags.
Ex. Currently etherpad sets the complete text as follows in single span tag upon using setText({padID: "pad_id", text: "Hello World, Happy coding"});:
Output:
<span class>Hello World, Happy coding</span>
Expectation: Instead of setting complete sentence in a single span tag, I need to create individual span tags for every word in the sentence thus making it look like a streaming text.
Required output:
<span class>Hello</span>
<span class>World</span>
<span class>,</span>
<span class>Happy</span>
<span class>coding</span>
The question is: How can I programmatically set multiple words into etherpad in their own span tags?
I already tried appendText() API call but the text is getting appended to text under the same span tag.
Please let me know your thoughts.
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions