XML Spellchecker

Questions on using RSyntaxTextArea should go here.

Moderator: robert

XML Spellchecker

Postby sandeep » Wed Apr 28, 2010 6:36 pm

Is there any way of masking XML elements attributes so that they are not parsed by spellchecker. Currently all XML elements and attributes are reported as misspelled words.
sandeep
 

Re: XML Spellchecker

Postby robert » Wed Apr 28, 2010 7:34 pm

Hmm, it works for me. I assume you're using SyntaxConstants.SYNTAX_STYLE_XML for the XML highlighting? Note that the spell checker currently only spell checks comments, so text nodes won't be parsed, but tag and attribute names should never be spell checked.
User avatar
robert
 
Posts: 802
Joined: Sat May 10, 2008 5:16 pm

Re: XML Spellchecker

Postby sandeep » Thu Apr 29, 2010 4:28 am

Image

In above image u can see spellcheck parses elements, attributes also text, wherein i want just text node to be parsed.
Note: My file is xml file and not java code.
sandeep
 


Re: XML Spellchecker

Postby robert » Thu Apr 29, 2010 11:32 am

Your picture is a little fuzzy, but it looks like you don't have XML highlighting enabled. Is that correct? If you don't, and are just editing plain text, it's going to spell check the entire document. When editing plain text, the entire document is spell checked. When a programming language or markup language is edited, only comments are spell checked. RSTA can't tell just by the content what language is being edited, it goes by the syntax style.

Code: Select all
textArea.setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_XML);
User avatar
robert
 
Posts: 802
Joined: Sat May 10, 2008 5:16 pm

Re: XML Spellchecker

Postby sandeep » Thu Apr 29, 2010 1:42 pm

After enabling xml syntax, spellcheck works only on comments. So i think mite be later you can think of incorporating spellcheck for xml files(only text nodes Like in stylus studio). For now i think i need to incorporate jazzy, and code my own spellcheck GUI to report mispelled words..Anywayz thanks for ur replies.RSTA is amazing....GR8 work done.
sandeep
 


Return to Help

Who is online

Users browsing this forum: No registered users and 3 guests

cron