Skip to main content
This API supports undo/redo in NOTE.This API modifies lasso document title data. Therefore, you must lasso a title before calling it, and the lasso selection must contain exactly one title. If the lasso selection is not a title, or contains multiple titles, the call will fail. It is recommended to call this API from the plugin UI entered via a lasso toolbar button.
static modifyLassoTitle(params: { style: number }): Promise<APIResponse<boolean>>;
Parameters
ParameterTypeDescription
params.stylenumberTitle style: 0 remove title, 1 black background, 2 gray-white, 3 gray-black, 4 shadow
Returns

Example

import { PluginNoteAPI } from 'sn-plugin-lib';

/**
 * Example: modify title style for the lasso-selected title.
 */
export async function exampleModifyLassoTitle() {
 const res = await PluginNoteAPI.modifyLassoTitle({ style: 2 });
 if (!res.success) {
 throw new Error(res.error?.message ?? 'modifyLassoTitle call failed');
 }
 return res.result;
}