words/syllable

Use div class instead of textarea

Closed this issue · 1 comments

I'm using a wysiwyg editor and it doesn't use textarea. Your index.js code works great if I target a textarea, but as soon as I change the querySelector to a class, like .myeditor, then E is no longer a function according to my console error.

The index.js file I'm trying to use is from the demo: https://words.github.io/syllable/index.js

I know this isn't an "issue" and github isn't necessarily meant for support like this but I thought I'd give this a shot.

That file is specifically made for the website, for a text area.
See the source here: https://github.com/words/syllable/tree/website.
Feel free to modify it for your needs!