Back to reference

init()

init()

Initialize Grammarly. The ClientId must be passed another way.

declare function init(): Promise<void>;

init(clientId, config, win)

Initialize Grammarly and start using EditorSDK to connect editors.

declare function init(clientId: string, config?: Config, win?: Window): Promise<EditorSDK>;

Examples

const Grammarly = await init("YOUR_CLIENT_ID");

Parameters

NameTypeDescription
clientIdstringThe ClientId for authentication
configConfigThe Config for all the editors
winWindowThe browser window where Grammarly will be initialized. It can be used to initialize Grammarly in a child window. It defaults to the current window.
Last Updated: 1/30/2023, 10:49:17 PM