Removes a subtextpart from the collection including all its nested subtextparts.

<void> SubTextPartCollection.remove(<SubTextPart> subTextPart, <Boolean> keepText, <Boolean> keepNested, [<RequestBooleanCallback> callback], [<ErrorCallback> errorCallback])

Parameters

Parameter Description
subTextPart Specifies the subtextpart to remove.
keepText If this parameter is set to true, the subtextpart is removed without deleting its visible text. Otherwise, the visible text is also removed.
keepNested If this parameter is set to true, nested subtextparts are preserved. When the keepText parameter is set to false, this parameter is ignored.
callback Optional. Receives a value which indicates whether the remove was succesful.
errorCallback Optional. Is called when the operation failed with an error.