words / syllable

Count syllables in an English word
https://words.github.io/syllable/
MIT License
223 stars 23 forks source link

Use div class instead of textarea #44

Closed zerosonesfun closed 4 years ago

zerosonesfun commented 4 years ago

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.

wooorm commented 4 years ago

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!