Selection Word Count in Writely

November 14, 2006

Quick note: I’ve been playing around with Writely for a while, and recently decided to use it to write out one of my midterms. Everything’s working great, with the exception of a word count per selection – which is necessary when you have per-answer word count limits. Here’s a bookmarklet that will do per-selection word count (an estimate, but not a bad one)–

tags: , ,

WordPress doesn’t seem to allow javascript links, so the code itself is after the jump

javascript:(function() {function getSel(win) {if (win.getSelection) return win.getSelection(); else if (win.document.getSelection) return win.document.getSelection(); else if (win.document.selection ) return win.document.selection.createRange().text;} var frame = document.getElementById('wys_frame'); var content = getSel(frame.contentWindow).toString().split(%22 %22); alert(content.length + %22 word(s) in selection%22);})()

Copy paste into a bookmark’s location field (only tested in Firefox; Writely isn’t quite there yet for Opera) and invoke whenever needed. Many thanks to Ben Newman for help with getting text selection.

2 Responses to “Selection Word Count in Writely”

  1. {
    {I have|I’ve} been {surfing|browsing} online more than {three|3|2|4} hours today, yet I never found any interesting article like yours. {It’s|It
    is} pretty worth enough for me. {In my opinion|Personally|In my view}, if all {webmasters|site owners|websi

  2. Tierney acosta Says:

    My name is Tierney Acosta and I thoroughly enjoy your blog. However, being that you are one of the founders/creators of Instagram, I have a complaint. Your representatives had the audacity to take down my account (@natechappellesfanclub) which I am sure you are very familiar with. They took down my account because they said that I was impersonating another person (in this case Nate chappelle). However, it clearly states in the username that I am nate’s avid fan, and not in fact trying to impersonate Nate chappelle. There is a plethora of fan accounts for stars such as Justin Bieber and Kylie Jenner and their accounts are still up and running. I feel that is is discrimination towards the fan accounts of up and coming artists. I would love to hear back from you about how you are going to fix this.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: