@getdraft/plugin 1.17.0 → 1.17.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/plugin.ts CHANGED
@@ -393,6 +393,14 @@ export class PluginInstance {
393
393
  this.postEvent('toggleInvisibleCharacters', { state });
394
394
  }
395
395
 
396
+ async isInvisibleCharactersVisible() {
397
+ const { state } = await this.promisedIframeMethod<{ state: boolean }>(
398
+ 'getInvisibleCharactersVisibility',
399
+ );
400
+
401
+ return state;
402
+ }
403
+
396
404
  togglePreview(state?: boolean) {
397
405
  this.postEvent('togglePreview', { state });
398
406
  }