This page explains how to insert, read, and modify TextBox data in NOTE, covering three APIs:
- Insert a TextBox:
PluginNoteAPI.insertText
- Get lasso TextBox elements:
PluginNoteAPI.getLassoText
- Modify a lasso TextBox:
PluginNoteAPI.modifyLassoText
Insert a TextBox
Call insertText to insert a TextBox into the current page and current layer of the currently opened note.
Make sure the note is opened and the current page is loaded; otherwise it returns an error.
textRect must be a non-zero-area rectangle (right > left and bottom > top), otherwise it throws a parameter error.
Get Lasso TextBox Elements
Call getLassoText to get TextBox data in the current lasso selection.
You must create a lasso selection before calling this API; otherwise it returns an error. If there are no TextBox elements in the lasso selection, the returned array is empty.
Modify a Lasso TextBox
Call modifyLassoText to modify the TextBox selected by the current lasso selection.
You must ensure the lasso selection contains exactly one TextBox; otherwise the modification will fail. Calling it with no lasso selection or multiple TextBox elements returns an error.