Spellcheck implementation in Visualforce

11 views
Skip to first unread message

kami...@gmail.com

unread,
Feb 5, 2017, 6:44:40 PM2/5/17
to JavaScriptSpellCheck
Hi,
I am trying to implement the spellcheck in a Visualforce page.
I tried both, JavaScript and jQuery with no luck.

I include the script as a static resource:
<apex:includeScript value="{!URLFOR($Resource.JavaScriptSpellCheck, 'JavaScriptSpellCheck/include.js')}"/>

then I tried following options (separately):
<script>
$j('[id$=staffNotes]').spellAsYouType();
$j("textarea[id$='incidentDetails']").spellAsYouType();
</script>
They both gave me error: 'Uanble to get NodeName from Undefined'

finally I tried:
document.getElementById('thePage:theForm:incidentDetails').spellAsYouType();

It doesn't give an error, but it also does not underline errors.

Also, when I try to use a button:
<input type="button" value="Spellcheck" onclick="$j([id$='incidentDetails']).spellCheckInDialog()"/>

The spell check window I get is empty except for buttons, which seem to be missing proper labels. What they have is BTN_OPTIONS, OPT_SENTENCE_AWARE or BTN_CHNANGE.

Any advice on how I might get it to work?

Regards,
Kamil

Live Spell

unread,
Feb 14, 2017, 4:49:04 AM2/14/17
to kami...@gmail.com, JavaScriptSpellCheck
Sounds like a cross domain or cross port issue.

Try this before adding include.js:
<script>
     livespell.installPath ='http://exact/path/to/spellchecker/folder/'
</script>


--
You received this message because you are subscribed to the Google Groups "JavaScriptSpellCheck" group.
To unsubscribe from this group and stop receiving emails from it, send an email to javascriptspellc...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages