View Full Version : Removing JSpell style
pkuthari
8th November 2007, 05:59 PM
Hi,
Is there a way to remove the JSpell style from the data (and, add JUST one custom style for incorrect words)? I'm using JSpell with TinyMCE, and the HTML has every word wrapped in a <span> tag with JSpell class.
Thanks.
P
pkuthari
8th November 2007, 06:04 PM
I have already tried -
1. var jspellStyles = [["", ""],
["", ""],
["a.j3", "background: yellow"],
["", ""],
["", ""],
["", ""]];
2. var jspellStyles = [];
in the jspellSettings.js file. But, it still adds the <span> tags for ALL words.
staff
8th November 2007, 09:08 PM
Wrapping each word in span tags is how we are able to selectively highlight incorrect and ignored words. It looks like your approach is on the right track to modify the styles, however, you should leave the original style names intact (e.g. untested):
var jspellStyles = [["a.j1", ""],
["a.j2", ""],
["a.j3", "background: yellow"],
["a.j4", ""],
["a.j5", ""],
["a.j6", ""]];
This should work but you might have to fill in the actual styles you want instead of using the "" characters.
pkuthari
9th November 2007, 11:51 AM
Actually, now we don't mind if each word is wrapped with a span tag...since I found out that by doing a jspellDetach() I can ensure that the tags are not saved in the DB.
The issue is that our editors deal mostly in HTML. So, they do a HTML view in TinyMCE, and then edit the content. It's pretty much impossible for them to work when every word is shown inside a span tag. If there's a way to kinda remove these tags (temporarily) while displaying the actual HTML, that would be great.
Thanks for help.
staff
9th November 2007, 02:27 PM
You would need to detach then reattach when you were editing in raw HTML mode.
pkuthari
27th November 2007, 05:25 PM
I tried doing the attach and detach...and it works great for small text. But for the big amount of text, detach/attach takes forever resulting in a popup messagebox saying "A script is causing IE to run slowly...blah blah".
Any workaround?
staff
29th November 2007, 11:00 AM
How large is the text that you are working with?
pkuthari
29th November 2007, 02:11 PM
Haven't figured out the lower limit yet....but text in upwards of 9K definitely has this problem.
vBulletin® v3.7.3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.