SetShd
Specifies the shading applied to the contents of the current text run.
Syntax
expression.SetShd(type, color);
expression - A variable that represents a ApiRun class.
Parameters
| Name | Required/Optional | Data type | Default | Description |
|---|---|---|---|---|
| type | Required | ShdType | The shading type applied to the contents of the current text run. | |
| color | Required | ApiColor | No description provided. |
Returns
Example
This example specifies the shading applied to the contents of the current text run.
- Code
- Result
// How to add shading to the text.
// Create a new text run and apply shading to it.
let doc = Api.GetDocument();
let paragraph = doc.GetElement(0);
let run = Api.CreateRun();
run.AddText("This is just a sample text. ");
paragraph.AddElement(run);
run = Api.CreateRun();
run.SetShd("clear", Api.HexColor('#FF6F3D'));
run.AddText("This is a text run with the text shading set to orange.");
paragraph.AddElement(run);