Instruction set reference
HIPE_OP_EDIT_STATUS
Used to determine which edit actions are available, i.e. applicable to the currently selected content or fucused element. This is useful for creating an 'Edit' menu with unavailable options removed.
This operation can only be carried out at the level of an entire frame, and affects child frames and their descendents within the current or selected frame.
Further to this, only a top-level frame is permitted to manage editing functions. Due to a limitation in webkit and hipecore, there is currently no way to scope editing actions to a particular frame and are instead dictated by which element within the entire frame hierarchy currently has focus.
If the instruction is run on anything other than a top-level frame, a response is produced indicating no editing functions are available.
- location: 0 to act on current frame, or the location of a child frame. If a non-frame location is specified, the operation is applied to the current frame.
- arg[0]: A string of "action code" characters for the functions that may be 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 takes a string of action codes, e.g. "xcv" and the server responds with the same opcode containing a string with unavailable actions removed.