In general, initialization of WProofreader using inline attributes is a good option if you want to have a single script with the base options. To define an additional option as an inline data attribute, use 'date-wsc-option_name', e.g. 'data-wsc-lang'. You can find the full list of options  here.

<script
	data-wsc-autosearch="true"
	data-wsc-lang="auto"
	data-wsc-enableGrammar="true"
	data-wsc-serviceProtocol="https"
	data-wsc-serviceHost="your_host_name"
	data-wsc-servicePort="443"
	data-wsc-servicePath="virtual_directory/api"
	src="https://your_host_name/virtual_directory/wscbundle/wscbundle.js">
</sctipt>

Consider the following limitation when using inline data attributes for the WProofreader options: as for now, only options which have boolean or string types can be used as data attributes. The options with array or number type are not supported (e.g. actionItems, suggestionsCount, moreSuggestionsCount).

  • No labels