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: 10/12/2022, 8:08:40 PM