WebKitEditorState: WebKit2GTK+ Reference Manual

## WebKitEditorState WebKitEditorState — Web editor state |

## Functions

guint | webkit_editor_state_get_typing_attributes ()
gboolean | webkit_editor_state_is_cut_available ()
gboolean | webkit_editor_state_is_copy_available ()
gboolean | webkit_editor_state_is_paste_available ()
gboolean | webkit_editor_state_is_undo_available ()
gboolean | webkit_editor_state_is_redo_available ()

## Properties

guint | typing-attributes | Read

## Types and Values

struct | WebKitEditorState
enum | WebKitEditorTypingAttributes

## Object Hierarchy

        GObject
        ╰── WebKitEditorState

## Description

WebKitEditorState represents the state of a WebKitWebView editor. Use `webkit_web_view_get_editor_state()` to get the WebKitEditorState of a WebKitWebView.

## Functions

### webkit_editor_state_get_typing_attributes ()

    guint
    webkit_editor_state_get_typing_attributes
                                   (WebKitEditorState *editor_state);

Gets the typing attributes at the current cursor position. If there is a selection, this returns the typing attributes of the selected text. Note that in case of a selection, typing attributes are considered active only when they are present throughout the selection.

#### Parameters

editor_state | a WebKitEditorState |

#### Returns

a bitmask of WebKitEditorTypingAttributes flags

Since: 2.10

### webkit_editor_state_is_cut_available ()

    gboolean
    webkit_editor_state_is_cut_available (WebKitEditorState *editor_state);

Gets whether a cut command can be issued.

#### Parameters

editor_state | a WebKitEditorState |

#### Returns

`TRUE` if cut is currently available

Since: 2.20

### webkit_editor_state_is_copy_available ()

    gboolean
    webkit_editor_state_is_copy_available (WebKitEditorState *editor_state);

Gets whether a copy command can be issued.

#### Parameters

editor_state | a WebKitEditorState |

#### Returns

`TRUE` if copy is currently available

Since: 2.20

### webkit_editor_state_is_paste_available ()

    gboolean
    webkit_editor_state_is_paste_available
                                   (WebKitEditorState *editor_state);

Gets whether a paste command can be issued.

#### Parameters

editor_state | a WebKitEditorState |

#### Returns

`TRUE` if paste is currently available

Since: 2.20

### webkit_editor_state_is_undo_available ()

    gboolean
    webkit_editor_state_is_undo_available (WebKitEditorState *editor_state);

Gets whether an undo command can be issued.

#### Parameters

editor_state | a WebKitEditorState |

#### Returns

`TRUE` if undo is currently available

Since: 2.20

### webkit_editor_state_is_redo_available ()

    gboolean
    webkit_editor_state_is_redo_available (WebKitEditorState *editor_state);

Gets whether a redo command can be issued.

#### Parameters

editor_state | a WebKitEditorState |

#### Returns

`TRUE` if redo is currently available

Since: 2.20

## Types and Values

### struct WebKitEditorState

    struct WebKitEditorState;

### enum WebKitEditorTypingAttributes

Enum values with flags representing typing attributes.

#### Members

WEBKIT_EDITOR_TYPING_ATTRIBUTE_NONE | No typing attributes. |
WEBKIT_EDITOR_TYPING_ATTRIBUTE_BOLD | Bold typing attribute. |
WEBKIT_EDITOR_TYPING_ATTRIBUTE_ITALIC | Italic typing attribute. |
WEBKIT_EDITOR_TYPING_ATTRIBUTE_UNDERLINE | Underline typing attribute. |
WEBKIT_EDITOR_TYPING_ATTRIBUTE_STRIKETHROUGH | Strikethrough typing attribute. |

Since: 2.10

## Property Details

### The `“typing-attributes”` property

      “typing-attributes”        guint

Bitmask of WebKitEditorTypingAttributes flags. See `webkit_editor_state_get_typing_attributes()` for more information.

Flags: Read

Default value: 0

Since: 2.10

## See Also

WebKitWebView