Instruction set reference
HIPE_OP_EDIT_ACTION
Performs a cut/copy/paste or other edit action on text the user has selected.
This operation can only be carried out at the level of an entire frame hierarchy (meaning a top level frame and all child frames). For the instruction to produce an action, it must be carried out on a top level frame. It will affect focuesed or selected text regardless of whether it is in the top level frame or a child frame - due to a limitation in webkit and hipecore, there is currently no way to scope these actions to a particular child frame.
- location: 0 to act on current frame and child frame hierarchy
- arg[0]: The "action code" character for the function required. See below
Action codes
Character | Editing operation |
---|---|
z | Undo |
Z | Redo |
a | Select all |
x | Cut selected text to clipboard |
c | Copy selected text to clipboard |
v | Paste selected text from clipboard, matching destination formatting |
V | Paste selected text from clipboard, preserving source formatting if applicable |
b | Toggles bold if applicable |
i | Toggles italic if applicable |
u | Toggles underline if applicable |
k | Toggles strikethrough if applicable |
l | Align left if applicable |
C | Align center if applicable |
r | Align right if applicable |
j | Align justified if applicable |
d | Set text direction default |
> | Set text direction left to right |
< | Set text direction right to left |
Notes
- This operation will succeed or fail silently. There is no response from the server.
- The undo/redo functionality from QtWebKit may be problematic due to the limitation of acting broadly on the entire frame including sub-frames. It may invisibly undo an operation that has happened on an inactive frame that is not currently visible on the screen, without the user knowing, rather than the last operation in the curently focused element. This is usually not what the user wants and might lead to the user accidentally undoing several minutes of work in another app without realising it!