Daniel Jalkut wrote:

For context, the situation I'm in is my application, MarsEdit, allows users to edit HTML source code in a regular NSTextView. In a nutshell, I want to spell-check the users plain-text "content" but avoid triggering spell-check false positives inside the HTML markup.

I'm already colorizing the markup text, so it would be reasonably easy for me to "do something" in that colorizing pass that identifies the off-limits nature of the markup text. I could for instance easily maintain an array of ranges for a document that should not be spell- checked.

Maybe add the colorized words to a dynamic dictionary, which you then pass to the spell-checker. Since the markup words are in the dictionary, they won't be considered misspelled.

  -- GG

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to