Two questions, How to count the lines in jQuery / javascript and / or How to get hidden text?

advertisements

I'm trying to create a WYSIWYG editor that's custom and spans multiple divs if the div height is matched. Does anyone know a way to do this?

I was thinking you could count the lines first and that's by knowing the line-height. If that's the case, what's a good method to grab the text of a div that makes it over 200px and push it to a new div?

How do I iterate through lines of text in a div that ONLY has the natural breaks?

Another method is to max the height out on a div and set overflow to hidden. But then how do I natural get the text that is hidden from a div?

If anyone knows of an answer or solution, we would greatly appreciate it :P Thanks. If there is even a WYSIWYG editor out there that is as good as Google Docs, also let us know!

Much appreciated. Love StackOverflow!


How about using TinyMCE. Its really good and you can customize and reduce the size suitable to your needs.