Forum closed. New forum available at http://community.wymeditor.org/

Length of the content

Discuss features, code, contributions, ideas, suggestions, ...
For bugs, patches and feature requests, please post on the Trac:
http://trac.wymeditor.org/

Length of the content

Postby igorp on Sun May 18, 2008 1:22 pm

Hallo.

I would like to know how can i write a plugin which count the length of the content (number of letters).

Or exists maybe a plugin which i can use.

Thanks.
igorp
 
Posts: 1
Joined: Sun May 18, 2008 1:18 pm

Re: Length of the content

Postby mr_lundis on Tue Jun 03, 2008 5:25 pm

The easiest way to do this would probably be to get the generated xhtml from you current wym instance (using the xhtml method), clean that code from all html tags using a regular expression. By doings so you will get the get the content in text only, witch you quite easily can perform all kinds of counting operations on.

For more information regarding plug-in development checkout the wiki.
Jonatan Lundin - designer, developer and forum moderator. You should follow me on Twitter!
mr_lundis
 
Posts: 335
Joined: Sun Dec 02, 2007 10:59 am
Location: Sweden


Return to Developers

Who is online

Users browsing this forum: No registered users and 2 guests