Clipboard Operations
The JadeRichText control supports standard clipboard operations and multiple levels of undo and redo operations, to a maximum of 100 undo or redo operations.
The output parameters of the getRedoAndUndoState method indicate whether a paste, redo, or an undo operation can be performed. The getRedoAndUndoState method also indicates the type of undo or redo action that can be performed.
You can call the undo or redo method to undo an action or reapply the last edit operation dynamically at run time.
From release 2020.0.01, you can programmatically paste from the Windows clipboard into a JadeRichText control.
-
The canPaste_ method returns whether there is content such as text or an image in the Windows clipboard that can be pasted into the JadeRichText control. (You can also obtain this status by calling the JadeRichText class getRedoAndUndoState method.)
-
If there is suitable content such as text or an image in the Windows clipboard, the paste_ method pastes that content into the JadeRichText control at the current cursor position. If the clipboard does not contain suitable content, the method does not result in any change. (This method is equivalent to selecting the Paste command in the context menu of the JadeRichText control at run time.)
Before you call the paste_ method, call the canPaste_ method to confirm there is suitable content available.