-
Notifications
You must be signed in to change notification settings - Fork 13
Bold
Makes the selected text bold.
arte.state("bold"); // boolean
arte.state("bold", true);
As a syntactical shortcut, the following can be used as well:
arte.bold(true);
arte.state("bold", false);
As a syntactical shortcut, the following can be used as well:
arte.bold(false);
arte.bold();
This is functionally equivalent to using arte.state("bold", !arte.state("bold"));
Note: When toggling bold using the above method in a run of text that contains bolded and unbolded text, it will first set all text to bold, then function as expected on all subsequent toggles.
In the event that no text has been selected, all of the above methods will apply to the entire editable area. In the event that text has been selected but changes are meant to apply to the entire editable area, all of the above methods can be used with the .all
object.
For example: arte.all.state("bold", true)
will change the entire contents of the editable area to bold regardless of the current selection.