exclude specific tag from word error

Questions about XML that are not covered by the other forums should go here.
shikhar_472
Posts: 99
Joined: Fri Jul 01, 2022 12:08 pm

exclude specific tag from word error

Post by shikhar_472 »

Hi Team,

For one specific tag we don't want to see red line for any wrong word as we dont to run spell check on one specific tag is there any way to achieve it.
for example - nonjury is a wrong word which is showing red line error i just want to remove it from 1st place from cite.query tag not from the second place.
oxygen.png
oxygen.png (21.97 KiB) Viewed 757 times
Thanks,
Shikhar.
chrispitude
Posts: 907
Joined: Thu May 02, 2019 2:32 pm

Re: exclude specific tag from word error

Post by chrispitude »

Hi Shikhar,

Please see the documentation on spell-checking ignored elements here:

Home > Configuration > Preferences > Editor Preferences > Spell Check Preferences

You should be able to add your indicated element to the list of elements not to check.
cristi_talau
Posts: 496
Joined: Thu Sep 04, 2014 4:22 pm

Re: exclude specific tag from word error

Post by cristi_talau »

Hello,
The approach recommended by Chris is correct. Web Author does not provide a UI to set this option. You will have to manually edit the options.xml [1] file and add a fragment similar with the one below:

Code: Select all

<entry>
  <String>spell.check.options</String>
  <spellCheckOptions>
    <field name="ignoreSpellCheckElements">
      <String-array>
        <String>codeblock</String>
        <String>codeph</String>
        <String>filepath</String>
        <String>screen</String>
        <String>cite.query</String>
      </String-array>
    </field>
  </spellCheckOptions>
</entry>
Note that this fragment also contains the default list of elements which are ignored for spell checking.
Best,
Cristian

[1] https://www.oxygenxml.com/doc/versions/ ... pell.check
Post Reply