Skip to content

Documentation / joplin-plugin-api / ContentScriptContext

Interface: ContentScriptContext

When a content script is initialised, it receives a context object.

Properties

contentScriptId

contentScriptId: string

The content script ID, which may be necessary to post messages

Defined in

types.ts:516


pluginId

pluginId: string

The plugin ID that registered this content script

Defined in

types.ts:511


postMessage

postMessage: PostMessageHandler

Can be used by CodeMirror content scripts to post a message to the plugin

Defined in

types.ts:521

Released under the MIT License.