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

Edit content of comment after receiving handleNewComment event? #22

Open
PAK90 opened this issue Apr 21, 2016 · 0 comments
Open

Edit content of comment after receiving handleNewComment event? #22

PAK90 opened this issue Apr 21, 2016 · 0 comments

Comments

@PAK90
Copy link

PAK90 commented Apr 21, 2016

This isn't exactly an issue, more of a query. I need to modify the content of a comment after it's been posted, to add icons and hoverable links to the text. For example, someone posts {abc} with the {} delimiters, I want to transform that into <img src="img/abc.png/>. Same goes for something like [] which would become <a> tags with specific classes to allow for a hover.

I've tested this in chrome dev tools, and I can manually add those tags into the <p> tag that holds the comment. However I haven't found a way to do this as a reaction to a comment being posted, since the comment is in an iframe which I can't get with document.getElementById. So, is there a way to get at that comment using your library, or using the comment.id which is given in the handleNewComment callback function? Or not possible?

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

1 participant