This topic describes the API operations that are related to the Ink object of presentation documents.
Ink
ActivePresentation.SlideShowSettings.Ink
Creates a brush object.
This feature is only supported in the SDK for JavaScript 1.1.14 or later.
Syntax
expression.ActivePresentation.SlideShowSettings.InkExpression: the application object of the document type.
Example
async function example() { await instance.ready(); const app = instance.Application; // Brush object. await app.ActivePresentation.SlideShowSettings.Ink; }
Methods
ActivePresentation.SlideShowSettings.Ink.Delete
Deletes a brush object (eraser).
This feature is only supported in the SDK for JavaScript 1.1.14 or later.
Syntax
expression.ActivePresentation.SlideShowSettings.Ink.DeleteExpression: the application object of the document type.
Parameters
Parameter | Data type | Default value | Required | Description |
Type |
| 1 | Not required | The erasure mode. Valid values:
|
Position |
| None | Not required | The erasure coordinates (effective when Type is 0, relative to the viewport position) Format: {clientX: number, clientY: number} |
Example
async function example() { await instance.ready(); const app = instance.Application; // Delete the brush (eraser). await app.ActivePresentation.SlideShowSettings.Ink.Delete; }
Properties
ActivePresentation.SlideShowSettings.Ink.Color
Sets the brush color.
This feature is only supported in the SDK for JavaScript 1.1.14 or later.
Syntax
expression.ActivePresentation.SlideShowSettings.Ink.ColorExpression: the application object of the document type.
Parameters
Parameter
Data type
Default value
Required
Description
Color
stringNone
Yes
The hexadecimal color value. Example: #FFFFFF.
Example
async function example() { await instance.ready(); const app = instance.Application; // Set the color of the brush. await app.ActivePresentation.SlideShowSettings.Ink.Color = '#8bc34a'; }
ActivePresentation.SlideShowSettings.Ink.Width
Sets the brush width.
This feature is only supported in the SDK for JavaScript 1.1.14 or later.
Syntax
expression.ActivePresentation.SlideShowSettings.Ink.WidthExpression: the application object of the document type.
Parameters
Parameter
Data type
Default value
Required
Description
Width
numberNone
Yes
The brush width.
Valid values for PCs: 1 to 16.
Valid values for mobile devices: 1 to 30.
Example
async function example() { await instance.ready(); const app = instance.Application; // Set the brush width to 10. await app.ActivePresentation.SlideShowSettings.Ink.Width = 10; }
ActivePresentation.SlideShowSettings.Ink.Type
Sets the brush type.
This feature is only supported in the SDK for JavaScript 1.1.14 or later.
Syntax
expression.ActivePresentation.SlideShowSettings.Ink.TypeExpression: the application object of the document type.
Parameters
Parameter
Data type
Default value
Required
Description
Type
NumberNone
Yes
The brush type. Valid values:
0: Watercolor brush.
1: Highlighter.
2: Smart pen.
Example
async function example() { await instance.ready(); const app = instance.Application; // Set the brush type to 1 (highlighter). await app.ActivePresentation.SlideShowSettings.Ink.Type = 1; }