[evolution/wip/webkit2] Cleanup a bit the EContentEditor interface



commit 7fe6745a5d3b2613237761bc026daed2045dac16
Author: Milan Crha <mcrha redhat com>
Date:   Thu Jun 9 14:40:42 2016 +0200

    Cleanup a bit the EContentEditor interface

 e-util/Makefile.am                                 |    1 -
 e-util/e-content-editor-enums.h                    |  303 ----
 e-util/e-content-editor.c                          | 1580 ++++++++++----------
 e-util/e-content-editor.h                          |  273 +---
 e-util/e-html-editor-replace-dialog.c              |    2 +-
 e-util/e-html-editor-selection.h                   |    2 +-
 e-util/e-html-editor-text-dialog.c                 |   11 +-
 e-util/e-html-editor-view.c                        |    2 +-
 e-util/e-html-editor.c                             |    2 +-
 e-util/e-util-enums.h                              |  382 +++++
 e-util/e-util.h                                    |    1 -
 modules/settings/e-settings-content-editor.c       |    2 +-
 .../e-webkit-content-editor.c                      |  358 ++---
 13 files changed, 1380 insertions(+), 1539 deletions(-)
---
diff --git a/e-util/Makefile.am b/e-util/Makefile.am
index 526fce4..43cd869 100644
--- a/e-util/Makefile.am
+++ b/e-util/Makefile.am
@@ -173,7 +173,6 @@ evolution_util_include_HEADERS =  \
        e-conflict-search-selector.h \
        e-contact-store.h \
        e-content-editor.h \
-       e-content-editor-enums.h \
        e-content-request.h \
        e-data-capture.h \
        e-dateedit.h \
diff --git a/e-util/e-content-editor.c b/e-util/e-content-editor.c
index 87ae722..b126da6 100644
--- a/e-util/e-content-editor.c
+++ b/e-util/e-content-editor.c
@@ -24,6 +24,7 @@
 
 #include <libedataserver/libedataserver.h>
 
+#include "e-util-enumtypes.h"
 #include "e-content-editor.h"
 
 G_DEFINE_INTERFACE (EContentEditor, e_content_editor, GTK_TYPE_WIDGET);
@@ -125,6 +126,22 @@ e_content_editor_default_init (EContentEditorInterface *iface)
                        G_PARAM_STATIC_STRINGS));
 
        /**
+        * EContentEditor:editable
+        *
+        * Determines whether the editor is editable or read-only.
+        **/
+       g_object_interface_install_property (
+               iface,
+               g_param_spec_boolean (
+                       "editable",
+                       _("Editable"),
+                       _("Wheter editor is editable"),
+                       TRUE,
+                       G_PARAM_READWRITE |
+                       G_PARAM_CONSTRUCT |
+                       G_PARAM_STATIC_STRINGS));
+
+       /**
         * EContentEditor:changed
         *
         * Determines whether document has been modified
@@ -156,35 +173,17 @@ e_content_editor_default_init (EContentEditorInterface *iface)
                        G_PARAM_STATIC_STRINGS));
 
        /**
-        * EContentEditor:editable
-        *
-        * Determines whether the editor is editable or read-only.
-        **/
-       g_object_interface_install_property (
-               iface,
-               g_param_spec_boolean (
-                       "editable",
-                       _("Editable"),
-                       _("Wheter editor is editable"),
-                       TRUE,
-                       G_PARAM_READWRITE |
-                       G_PARAM_CONSTRUCT |
-                       G_PARAM_STATIC_STRINGS));
-
-       /**
         * EContentEditor:alignment
         *
         * Holds alignment of current paragraph.
         */
-       /* FIXME: Convert the enum to a proper type */
        g_object_interface_install_property (
                iface,
-               g_param_spec_int (
+               g_param_spec_enum (
                        "alignment",
                        NULL,
                        NULL,
-                       E_CONTENT_EDITOR_ALIGNMENT_LEFT,
-                       E_CONTENT_EDITOR_ALIGNMENT_RIGHT,
+                       E_TYPE_CONTENT_EDITOR_ALIGNMENT,
                        E_CONTENT_EDITOR_ALIGNMENT_LEFT,
                        G_PARAM_READWRITE));
 
@@ -196,11 +195,11 @@ e_content_editor_default_init (EContentEditorInterface *iface)
         */
        g_object_interface_install_property (
                iface,
-               g_param_spec_string (
+               g_param_spec_boxed (
                        "background-color",
                        NULL,
                        NULL,
-                       NULL,
+                       GDK_TYPE_RGBA,
                        G_PARAM_READWRITE));
 
        /**
@@ -209,19 +208,15 @@ e_content_editor_default_init (EContentEditorInterface *iface)
         * Holds block format of current paragraph. See
         * #EContentEditorBlockFormat for valid values.
         */
-       /* FIXME Convert the EContentEditorBlockFormat
-        *       enum to a proper type. */
        g_object_interface_install_property (
                iface,
-               g_param_spec_int (
+               g_param_spec_enum (
                        "block-format",
                        NULL,
                        NULL,
-                       0,
-                       G_MAXINT,
-                       0,
-                       G_PARAM_READWRITE |
-                       G_PARAM_STATIC_STRINGS));
+                       E_TYPE_CONTENT_EDITOR_BLOCK_FORMAT,
+                       E_CONTENT_EDITOR_BLOCK_FORMAT_NONE,
+                       G_PARAM_READWRITE));
 
        /**
         * EContentEditor:bold
@@ -503,6 +498,715 @@ e_content_editor_default_init (EContentEditorInterface *iface)
                G_TYPE_UINT);
 }
 
+gboolean
+e_content_editor_can_cut (EContentEditor *editor)
+{
+       gboolean value = FALSE;
+
+       g_return_val_if_fail (E_IS_CONTENT_EDITOR (editor), FALSE);
+
+       g_object_get (G_OBJECT (editor), "can-cut", &value, NULL);
+
+       return value;
+}
+
+gboolean
+e_content_editor_can_copy (EContentEditor *editor)
+{
+       gboolean value = FALSE;
+
+       g_return_val_if_fail (E_IS_CONTENT_EDITOR (editor), FALSE);
+
+       g_object_get (G_OBJECT (editor), "can-copy", &value, NULL);
+
+       return value;
+}
+
+gboolean
+e_content_editor_can_paste (EContentEditor *editor)
+{
+       gboolean value = FALSE;
+
+       g_return_val_if_fail (E_IS_CONTENT_EDITOR (editor), FALSE);
+
+       g_object_get (G_OBJECT (editor), "can-paste", &value, NULL);
+
+       return value;
+}
+
+gboolean
+e_content_editor_can_undo (EContentEditor *editor)
+{
+       gboolean value = FALSE;
+
+       g_return_val_if_fail (E_IS_CONTENT_EDITOR (editor), FALSE);
+
+       g_object_get (G_OBJECT (editor), "can-undo", &value, NULL);
+
+       return value;
+}
+
+gboolean
+e_content_editor_can_redo (EContentEditor *editor)
+{
+       gboolean value = FALSE;
+
+       g_return_val_if_fail (E_IS_CONTENT_EDITOR (editor), FALSE);
+
+       g_object_get (G_OBJECT (editor), "can-redo", &value, NULL);
+
+       return value;
+}
+
+/**
+ * e_content_editor_is_indented:
+ * @editor: an #EContentEditor
+ *
+ * Returns whether the current paragraph is indented. This does not include
+ * citations.
+ *
+ * Returns: %TRUE when current paragraph is indented, %FALSE otherwise.
+ *
+ * Since: 3.22
+ **/
+gboolean
+e_content_editor_is_indented (EContentEditor *editor)
+{
+       gboolean value = FALSE;
+
+       g_return_val_if_fail (E_IS_CONTENT_EDITOR (editor), FALSE);
+
+       g_object_get (G_OBJECT (editor), "indented", &value, NULL);
+
+       return value;
+}
+
+gboolean
+e_content_editor_is_editable (EContentEditor *editor)
+{
+       gboolean value = FALSE;
+
+       g_return_val_if_fail (E_IS_CONTENT_EDITOR (editor), FALSE);
+
+       g_object_get (G_OBJECT (editor), "editable", &value, NULL);
+
+       return value;
+}
+
+void
+e_content_editor_set_editable (EContentEditor *editor,
+                              gboolean editable)
+{
+       g_return_if_fail (E_IS_CONTENT_EDITOR (editor));
+
+       g_object_set (G_OBJECT (editor), "editable", editable, NULL);
+}
+
+gboolean
+e_content_editor_get_changed (EContentEditor *editor)
+{
+       gboolean value = FALSE;
+
+       g_return_val_if_fail (E_IS_CONTENT_EDITOR (editor), FALSE);
+
+       g_object_get (G_OBJECT (editor), "changed", &value, NULL);
+
+       return value;
+}
+
+void
+e_content_editor_set_changed (EContentEditor *editor,
+                             gboolean changed)
+{
+       g_return_if_fail (E_IS_CONTENT_EDITOR (editor));
+
+       g_object_set (G_OBJECT (editor), "changed", changed, NULL);
+}
+
+gboolean
+e_content_editor_get_html_mode (EContentEditor *editor)
+{
+       gboolean value = FALSE;
+
+       g_return_val_if_fail (E_IS_CONTENT_EDITOR (editor), FALSE);
+
+       g_object_get (G_OBJECT (editor), "html-mode", &value, NULL);
+
+       return value;
+}
+
+void
+e_content_editor_set_html_mode (EContentEditor *editor,
+                               gboolean html_mode)
+{
+       g_return_if_fail (E_IS_CONTENT_EDITOR (editor));
+
+       g_object_set (G_OBJECT (editor), "html-mode", html_mode, NULL);
+}
+
+/**
+ * e_content_editor_set_alignment:
+ * @editor: an #EContentEditor
+ * @value: an #EContentEditorAlignment value to apply
+ *
+ * Sets alignment of current paragraph to @value.
+ *
+ * Since: 3.22
+ **/
+void
+e_content_editor_set_alignment (EContentEditor *editor,
+                               EContentEditorAlignment value)
+{
+       g_return_if_fail (E_IS_CONTENT_EDITOR (editor));
+
+       g_object_set (G_OBJECT (editor), "alignment", value, NULL);
+}
+
+/**
+ * e_content_editor_get_alignment:
+ * @editor: #an EContentEditor
+ *
+ * Returns alignment of the current paragraph.
+ *
+ * Returns: #EContentEditorAlignment
+ *
+ * Since: 3.22
+ **/
+EContentEditorAlignment
+e_content_editor_get_alignment (EContentEditor *editor)
+{
+       EContentEditorAlignment value = E_CONTENT_EDITOR_ALIGNMENT_LEFT;
+
+       g_return_val_if_fail (E_IS_CONTENT_EDITOR (editor), E_CONTENT_EDITOR_ALIGNMENT_LEFT);
+
+       g_object_get (G_OBJECT (editor), "alignment", &value, NULL);
+
+       return value;
+}
+
+/**
+ * e_content_editor_set_background_color:
+ * @editor: an #EContentEditor
+ * @value: a #GdkRGBA
+ *
+ * Sets the background color of the current selection or letter at the current cursor position to
+ * a color defined by @value.
+ *
+ * Since: 3.22
+ **/
+void
+e_content_editor_set_background_color (EContentEditor *editor,
+                                      const GdkRGBA *value)
+{
+       g_return_if_fail (E_IS_CONTENT_EDITOR (editor));
+       g_return_if_fail (value != NULL);
+
+       g_object_set (G_OBJECT (editor), "background-color", value, NULL);
+}
+
+/**
+ * e_content_editor_dup_background_color:
+ * @editor: an #EContentEditor
+ *
+ * Returns the background color used in the current selection or at letter
+ * at the current cursor position.
+ *
+ * Returns: (transfer-full): A newly allocated #GdkRGBA structure with
+ *   the current background color. Free the returned value with gdk_rgba_free()
+ *   when done with it.
+ *
+ * Since: 3.22
+ **/
+GdkRGBA *
+e_content_editor_dup_background_color (EContentEditor *editor)
+{
+       GdkRGBA *value = NULL;
+
+       g_return_val_if_fail (E_IS_CONTENT_EDITOR (editor), NULL);
+
+       g_object_get (G_OBJECT (editor), "background-color", &value, NULL);
+
+       return value;
+}
+
+/**
+ * e_content_editor_set_font_color:
+ * @editor: an #EContentEditor
+ * @value: a #GdkRGBA
+ *
+ * Sets the font color of the current selection or letter at the current cursor position to
+ * a color defined by @value.
+ *
+ * Since: 3.22
+ **/
+void
+e_content_editor_set_font_color (EContentEditor *editor,
+                                const GdkRGBA *value)
+{
+       g_return_if_fail (E_IS_CONTENT_EDITOR (editor));
+       g_return_if_fail (value != NULL);
+
+       g_object_set (G_OBJECT (editor), "font-color", value, NULL);
+}
+
+/**
+ * e_content_editor_dup_font_color:
+ * @editor: an #EContentEditor
+ *
+ * Returns the font color used in the current selection or at letter
+ * at the current cursor position.
+ *
+ * Returns: (transfer-full): A newly allocated #GdkRGBA structure with
+ *   the current font color. Free the returned value with gdk_rgba_free()
+ *   when done with it.
+ *
+ * Since: 3.22
+ **/
+GdkRGBA *
+e_content_editor_dup_font_color (EContentEditor *editor)
+{
+       GdkRGBA *value = NULL;
+
+       g_return_val_if_fail (E_IS_CONTENT_EDITOR (editor), NULL);
+
+       g_object_get (G_OBJECT (editor), "font-color", &value, NULL);
+
+       return value;
+}
+
+/**
+ * e_content_editor_set_font_name:
+ * @editor: an #EContentEditor
+ * @value: a font name to apply
+ *
+ * Sets font name of current selection or of letter at current cursor position
+ * to @value.
+ *
+ * Since: 3.22
+ **/
+void
+e_content_editor_set_font_name (EContentEditor *editor,
+                               const gchar *value)
+{
+       g_return_if_fail (E_IS_CONTENT_EDITOR (editor));
+       g_return_if_fail (value != NULL);
+
+       g_object_set (G_OBJECT (editor), "font-name", value, NULL);
+}
+
+/**
+ * e_content_editor_dup_font_name:
+ * @editor: an #EContentEditor
+ *
+ * Returns a name of the font used in the current selection or at letter
+ * at the current cursor position.
+ *
+ * Returns: (transfer-full): A newly allocated string with the font name.
+ *    Free it with g_free() when done with it.
+ *
+ * Since: 3.22
+ **/
+gchar *
+e_content_editor_dup_font_name (EContentEditor *editor)
+{
+       gchar *value = NULL;
+
+       g_return_val_if_fail (E_IS_CONTENT_EDITOR (editor), NULL);
+
+       g_object_get (G_OBJECT (editor), "font-name", &value, NULL);
+
+       return value;
+}
+
+/**
+ * e_content_editor_set_font_size:
+ * @editor: an #EContentEditor
+ * @value: font size to apply
+ *
+ * Sets font size of current selection or of letter at current cursor position
+ * to @value.
+ *
+ * Since: 3.22
+ **/
+void
+e_content_editor_set_font_size (EContentEditor *editor,
+                               gint value)
+{
+       g_return_if_fail (E_IS_CONTENT_EDITOR (editor));
+
+       g_object_set (G_OBJECT (editor), "font-size", value, NULL);
+}
+
+/**
+ * e_content_editor_get_font_size:
+ * @editor: an #EContentEditor
+ *
+ * Returns fotn size of the current selection or letter at the current
+ * cursor position.
+ *
+ * Returns: Current font size.
+ *
+ * Since: 3.22
+ **/
+gint
+e_content_editor_get_font_size (EContentEditor *editor)
+{
+       gint value = -1;
+
+       g_return_val_if_fail (E_IS_CONTENT_EDITOR (editor), -1);
+
+       g_object_get (G_OBJECT (editor), "font-size", &value, NULL);
+
+       return value;
+}
+
+/**
+ * e_content_editor_set_block_format:
+ * @editor: an #EContentEditor
+ * @value: an #EContentEditorBlockFormat value
+ *
+ * Changes block format of the current paragraph to @value.
+ *
+ * Since: 3.22
+ **/
+void
+e_content_editor_set_block_format (EContentEditor *editor,
+                                  EContentEditorBlockFormat value)
+{
+       g_return_if_fail (E_IS_CONTENT_EDITOR (editor));
+
+       g_object_set (G_OBJECT (editor), "block-format", value, NULL);
+}
+
+/**
+ * e_content_editor_get_block_format:
+ * @editor: an #EContentEditor
+ *
+ * Returns block format of the current paragraph.
+ *
+ * Returns: #EContentEditorBlockFormat
+ *
+ * Since: 3.22
+ **/
+EContentEditorBlockFormat
+e_content_editor_get_block_format (EContentEditor *editor)
+{
+       EContentEditorBlockFormat value = E_CONTENT_EDITOR_BLOCK_FORMAT_NONE;
+
+       g_return_val_if_fail (E_IS_CONTENT_EDITOR (editor), E_CONTENT_EDITOR_BLOCK_FORMAT_NONE);
+
+       g_object_get (G_OBJECT (editor), "block-format", &value, NULL);
+
+       return value;
+}
+
+/**
+ * e_content_editor_set_bold:
+ * @editor: an #EContentEditor
+ * @bold: %TRUE to enable bold, %FALSE to disable
+ *
+ * Changes bold formatting of current selection or letter at current
+ * cursor position.
+ *
+ * Since: 3.22
+ **/
+void
+e_content_editor_set_bold (EContentEditor *editor,
+                          gboolean bold)
+{
+       g_return_if_fail (E_IS_CONTENT_EDITOR (editor));
+
+       g_object_set (G_OBJECT (editor), "bold", bold, NULL);
+}
+
+/**
+ * e_content_editor_is_bold:
+ * @editor: an #EContentEditor
+ *
+ * Returns whether current selection or letter at current cursor position is bold.
+ *
+ * Returns: %TRUE when selection is bold, %FALSE otherwise.
+ *
+ * Since: 3.22
+ **/
+gboolean
+e_content_editor_is_bold (EContentEditor *editor)
+{
+       gboolean value = FALSE;
+
+       g_return_val_if_fail (E_IS_CONTENT_EDITOR (editor), FALSE);
+
+       g_object_get (G_OBJECT (editor), "bold", &value, NULL);
+
+       return value;
+}
+
+/**
+ * e_content_editor_set_italic:
+ * @editor: an #EContentEditor
+ * @italic: %TRUE to enable italic, %FALSE to disable
+ *
+ * Changes italic formatting of current selection or letter at current
+ * cursor position.
+ *
+ * Since: 3.22
+ **/
+void
+e_content_editor_set_italic (EContentEditor *editor,
+                            gboolean italic)
+{
+       g_return_if_fail (E_IS_CONTENT_EDITOR (editor));
+
+       g_object_set (G_OBJECT (editor), "italic", italic, NULL);
+}
+
+/**
+ * e_content_editor_is_italic:
+ * @editor: an #EContentEditor
+ *
+ * Returns whether current selection or letter at current cursor position
+ * is italic.
+ *
+ * Returns: %TRUE when selection is italic, %FALSE otherwise.
+ *
+ * Since: 3.22
+ **/
+gboolean
+e_content_editor_is_italic (EContentEditor *editor)
+{
+       gboolean value = FALSE;
+
+       g_return_val_if_fail (E_IS_CONTENT_EDITOR (editor), FALSE);
+
+       g_object_get (G_OBJECT (editor), "italic", &value, NULL);
+
+       return value;
+}
+
+/**
+ * e_content_editor_set_monospaced:
+ * @editor: an #EContentEditor
+ * @monospaced: %TRUE to enable monospaced, %FALSE to disable
+ *
+ * Changes monospaced formatting of current selection or letter
+ * at current cursor position.
+ *
+ * Since: 3.22
+ **/
+void
+e_content_editor_set_monospaced (EContentEditor *editor,
+                                gboolean monospaced)
+{
+       g_return_if_fail (E_IS_CONTENT_EDITOR (editor));
+
+       g_object_set (G_OBJECT (editor), "monospaced", monospaced, NULL);
+}
+
+/**
+ * e_content_editor_is_monospaced:
+ * @editor: an #EContentEditor
+ *
+ * Returns whether current selection or letter at current cursor position
+ * is monospaced.
+ *
+ * Returns: %TRUE when selection is monospaced, %FALSE otherwise.
+ *
+ * Since: 3.22
+ **/
+gboolean
+e_content_editor_is_monospaced (EContentEditor *editor)
+{
+       gboolean value = FALSE;
+
+       g_return_val_if_fail (E_IS_CONTENT_EDITOR (editor), FALSE);
+
+       g_object_get (G_OBJECT (editor), "monospaced", &value, NULL);
+
+       return value;
+}
+
+/**
+ * e_content_editor_set_strikethrough:
+ * @editor: an #EContentEditor
+ * @strikethrough: %TRUE to enable strikethrough, %FALSE to disable
+ *
+ * Changes strike through formatting of current selection or letter at current
+ * cursor position.
+ *
+ * Since: 3.22
+ **/
+void
+e_content_editor_set_strikethrough (EContentEditor *editor,
+                                   gboolean strikethrough)
+{
+       g_return_if_fail (E_IS_CONTENT_EDITOR (editor));
+
+       g_object_set (G_OBJECT (editor), "strikethrough", strikethrough, NULL);
+}
+
+/**
+ * e_content_editor_is_strikethrough:
+ * @editor: an #EContentEditor
+ *
+ * Returns whether current selection or letter at current cursor position
+ * is striked through.
+ *
+ * Returns: %TRUE when selection is striked through, %FALSE otherwise.
+ *
+ * Since: 3.22
+ **/
+gboolean
+e_content_editor_is_strikethrough (EContentEditor *editor)
+{
+       gboolean value = FALSE;
+
+       g_return_val_if_fail (E_IS_CONTENT_EDITOR (editor), FALSE);
+
+       g_object_get (G_OBJECT (editor), "strikethrough", &value, NULL);
+
+       return value;
+}
+
+/**
+ * e_content_editor_set_subscript:
+ * @editor: an #EContentEditor
+ * @subscript: %TRUE to enable subscript, %FALSE to disable
+ *
+ * Changes subscript of current selection or letter at current
+ * cursor position.
+ *
+ * Since: 3.22
+ **/
+void
+e_content_editor_set_subscript (EContentEditor *editor,
+                               gboolean subscript)
+{
+       g_return_if_fail (E_IS_CONTENT_EDITOR (editor));
+
+       g_object_set (G_OBJECT (editor), "subscript", subscript, NULL);
+}
+
+/**
+ * e_content_editor_is_subscript:
+ * @editor: an #EContentEditor
+ *
+ * Returns whether current selection or letter at current cursor position
+ * is in subscript.
+ *
+ * Returns: %TRUE when selection is in subscript, %FALSE otherwise.
+ *
+ * Since: 3.22
+ **/
+gboolean
+e_content_editor_is_subscript (EContentEditor *editor)
+{
+       gboolean value = FALSE;
+
+       g_return_val_if_fail (E_IS_CONTENT_EDITOR (editor), FALSE);
+
+       g_object_get (G_OBJECT (editor), "subscript", &value, NULL);
+
+       return value;
+}
+
+/**
+ * e_content_editor_set_superscript:
+ * @editor: an #EContentEditor
+ * @superscript: %TRUE to enable superscript, %FALSE to disable
+ *
+ * Changes superscript of the current selection or letter at current
+ * cursor position.
+ *
+ * Since: 3.22
+ **/
+void
+e_content_editor_set_superscript (EContentEditor *editor,
+                                 gboolean superscript)
+{
+       g_return_if_fail (E_IS_CONTENT_EDITOR (editor));
+
+       g_object_set (G_OBJECT (editor), "superscript", superscript, NULL);
+}
+
+/**
+ * e_content_editor_is_superscript:
+ * @editor: an #EContentEditor
+ *
+ * Returns whether current selection or letter at current cursor position
+ * is in superscript.
+ *
+ * Returns: %TRUE when selection is in superscript, %FALSE otherwise.
+ *
+ * Since: 3.22
+ **/
+gboolean
+e_content_editor_is_superscript (EContentEditor *editor)
+{
+       gboolean value = FALSE;
+
+       g_return_val_if_fail (E_IS_CONTENT_EDITOR (editor), FALSE);
+
+       g_object_get (G_OBJECT (editor), "superscript", &value, NULL);
+
+       return value;
+}
+
+/**
+ * e_content_editor_set_underline:
+ * @editor: an #EContentEditor
+ * @underline: %TRUE to enable underline, %FALSE to disable
+ *
+ * Changes underline formatting of current selection or letter
+ * at current cursor position.
+ *
+ * Since: 3.22
+ **/
+void
+e_content_editor_set_underline (EContentEditor *editor,
+                               gboolean underline)
+{
+       g_return_if_fail (E_IS_CONTENT_EDITOR (editor));
+
+       g_object_set (G_OBJECT (editor), "underline", underline, NULL);
+}
+
+/**
+ * e_content_editor_is_underline:
+ * @editor: an #EContentEditor
+ *
+ * Returns whether current selection or letter at current cursor position
+ * is underlined.
+ *
+ * Returns: %TRUE when selection is underlined, %FALSE otherwise.
+ *
+ * Since: 3.22
+ **/
+gboolean
+e_content_editor_is_underline (EContentEditor *editor)
+{
+       gboolean value = FALSE;
+
+       g_return_val_if_fail (E_IS_CONTENT_EDITOR (editor), FALSE);
+
+       g_object_get (G_OBJECT (editor), "underline", &value, NULL);
+
+       return value;
+}
+
+void
+e_content_editor_update_styles (EContentEditor *editor)
+{
+       EContentEditorInterface *iface;
+
+       g_return_if_fail (E_IS_CONTENT_EDITOR (editor));
+
+       iface = E_CONTENT_EDITOR_GET_IFACE (editor);
+       g_return_if_fail (iface != NULL);
+       g_return_if_fail (iface->update_styles != NULL);
+
+       iface->update_styles (editor);
+}
+
 void
 e_content_editor_insert_content (EContentEditor *editor,
                                  const gchar *content,
@@ -561,7 +1265,9 @@ e_content_editor_insert_image_from_mime_part (EContentEditor *editor,
  *
  * Inserts image at current cursor position using @uri as source. When a
  * text range is selected, it will be replaced by the image.
- */
+ *
+ * Since: 3.22
+ **/
 void
 e_content_editor_insert_image (EContentEditor *editor,
                                const gchar *uri)
@@ -643,35 +1349,6 @@ e_content_editor_move_caret_on_coordinates (EContentEditor *editor,
 }
 
 void
-e_content_editor_set_changed (EContentEditor *editor,
-                              gboolean changed)
-{
-       EContentEditorInterface *iface;
-
-       g_return_if_fail (E_IS_CONTENT_EDITOR (editor));
-
-       iface = E_CONTENT_EDITOR_GET_IFACE (editor);
-       g_return_if_fail (iface != NULL);
-       g_return_if_fail (iface->set_changed != NULL);
-
-       iface->set_changed (editor, changed);
-}
-
-gboolean
-e_content_editor_get_changed (EContentEditor *editor)
-{
-       EContentEditorInterface *iface;
-
-       g_return_val_if_fail (E_IS_CONTENT_EDITOR (editor), FALSE);
-
-       iface = E_CONTENT_EDITOR_GET_IFACE (editor);
-       g_return_val_if_fail (iface != NULL, FALSE);
-       g_return_val_if_fail (iface->get_changed != NULL, FALSE);
-
-       return iface->get_changed (editor);
-}
-
-void
 e_content_editor_cut (EContentEditor *editor)
 {
        EContentEditorInterface *iface;
@@ -741,20 +1418,6 @@ e_content_editor_reconnect_paste_clipboard_signals (EContentEditor *editor)
        iface->reconnect_paste_clipboard_signals (editor);
 }
 
-gboolean
-e_content_editor_can_undo (EContentEditor *editor)
-{
-       EContentEditorInterface *iface;
-
-       g_return_val_if_fail (E_IS_CONTENT_EDITOR (editor), FALSE);
-
-       iface = E_CONTENT_EDITOR_GET_IFACE (editor);
-       g_return_val_if_fail (iface != NULL, FALSE);
-       g_return_val_if_fail (iface->can_undo != NULL, FALSE);
-
-       return iface->can_undo (editor);
-}
-
 void
 e_content_editor_undo (EContentEditor *editor)
 {
@@ -769,20 +1432,6 @@ e_content_editor_undo (EContentEditor *editor)
        iface->undo (editor);
 }
 
-gboolean
-e_content_editor_can_redo (EContentEditor *editor)
-{
-       EContentEditorInterface *iface;
-
-       g_return_val_if_fail (E_IS_CONTENT_EDITOR (editor), FALSE);
-
-       iface = E_CONTENT_EDITOR_GET_IFACE (editor);
-       g_return_val_if_fail (iface != NULL, FALSE);
-       g_return_val_if_fail (iface->can_redo != NULL, FALSE);
-
-       return iface->can_redo (editor);
-}
-
 void
 e_content_editor_redo (EContentEditor *editor)
 {
@@ -811,35 +1460,6 @@ e_content_editor_clear_undo_redo_history (EContentEditor *editor)
        iface->clear_undo_redo_history (editor);
 }
 
-void
-e_content_editor_set_html_mode (EContentEditor *editor,
-                                gboolean html_mode)
-{
-       EContentEditorInterface *iface;
-
-       g_return_if_fail (E_IS_CONTENT_EDITOR (editor));
-
-       iface = E_CONTENT_EDITOR_GET_IFACE (editor);
-       g_return_if_fail (iface != NULL);
-       g_return_if_fail (iface->set_html_mode != NULL);
-
-       iface->set_html_mode (editor, html_mode);
-}
-
-gboolean
-e_content_editor_get_html_mode (EContentEditor *editor)
-{
-       EContentEditorInterface *iface;
-
-       g_return_val_if_fail (E_IS_CONTENT_EDITOR (editor), FALSE);
-
-       iface = E_CONTENT_EDITOR_GET_IFACE (editor);
-       g_return_val_if_fail (iface != NULL, FALSE);
-       g_return_val_if_fail (iface->get_html_mode != NULL, FALSE);
-
-       return iface->get_html_mode (editor);
-}
-
 ESpellChecker *
 e_content_editor_get_spell_checker (EContentEditor *editor)
 {
@@ -913,16 +1533,17 @@ e_content_editor_select_all (EContentEditor *editor)
 }
 
 /**
- * e_content_editor_selection_get_text:
+ * e_content_editor_get_selected_text:
  * @editor: an #EContentEditor
  *
  * Returns currently selected string.
  *
- * Returns: A newly allocated string with the content of current selection.
- * [transfer-full].
- */
+ * Returns: (transfer-full): A newly allocated string with the content of current selection.
+ *
+ * Since: 3.22
+ **/
 gchar *
-e_content_editor_selection_get_text (EContentEditor *editor)
+e_content_editor_get_selected_text (EContentEditor *editor)
 {
        EContentEditorInterface *iface;
 
@@ -930,9 +1551,9 @@ e_content_editor_selection_get_text (EContentEditor *editor)
 
        iface = E_CONTENT_EDITOR_GET_IFACE (editor);
        g_return_val_if_fail (iface != NULL, NULL);
-       g_return_val_if_fail (iface->selection_get_text != NULL, NULL);
+       g_return_val_if_fail (iface->get_selected_text != NULL, NULL);
 
-       return iface->selection_get_text (editor);
+       return iface->get_selected_text (editor);
 }
 
 /**
@@ -941,9 +1562,11 @@ e_content_editor_selection_get_text (EContentEditor *editor)
  *
  * Returns word under cursor.
  *
- * Returns: A newly allocated string with current caret word or @NULL when there
- * is no text under cursor or when selection is active. [transfer-full].
- */
+ * Returns: (transfer-full): A newly allocated string with current caret word or %NULL
+ * when there is no text under cursor or when selection is active.
+ *
+ * Since: 3.22
+ **/
 gchar *
 e_content_editor_get_caret_word (EContentEditor *editor)
 {
@@ -964,7 +1587,9 @@ e_content_editor_get_caret_word (EContentEditor *editor)
  * @replacement: a string to replace current caret word with
  *
  * Replaces current word under cursor with @replacement.
- */
+ *
+ * Since: 3.22
+ **/
 void
 e_content_editor_replace_caret_word (EContentEditor *editor,
                                      const gchar *replacement)
@@ -981,29 +1606,6 @@ e_content_editor_replace_caret_word (EContentEditor *editor,
        iface->replace_caret_word (editor, replacement);
 }
 
-/**
- * e_content_editor_is_indented:
- * @editor: an #EContentEditor
- *
- * Returns whether current paragraph is indented. This does not include
- * citations.
- *
- * Returns: @TRUE when current paragraph is indented, @FALSE otherwise.
- */
-gboolean
-e_content_editor_selection_is_indented (EContentEditor *editor)
-{
-       EContentEditorInterface *iface;
-
-       g_return_val_if_fail (E_IS_CONTENT_EDITOR (editor), FALSE);
-
-       iface = E_CONTENT_EDITOR_GET_IFACE (editor);
-       g_return_val_if_fail (iface != NULL, FALSE);
-       g_return_val_if_fail (iface->selection_is_indented != NULL, FALSE);
-
-       return iface->selection_is_indented (editor);
-}
-
 void
 e_content_editor_selection_indent (EContentEditor *editor)
 {
@@ -1038,7 +1640,9 @@ e_content_editor_selection_unindent (EContentEditor *editor)
  * @uri: destination of the new link
  *
  * Converts current selection into a link pointing to @url.
- */
+ *
+ * Since: 3.22
+ **/
 void
 e_content_editor_selection_create_link (EContentEditor *editor,
                                         const gchar *uri)
@@ -1061,7 +1665,9 @@ e_content_editor_selection_create_link (EContentEditor *editor,
  *
  * Removes any links (&lt;A&gt; elements) from current selection or at current
  * cursor position.
- */
+ *
+ * Since: 3.22
+ **/
 void
 e_content_editor_selection_unlink (EContentEditor *editor)
 {
@@ -1088,6 +1694,8 @@ e_content_editor_selection_unlink (EContentEditor *editor)
  *
  * Once the search is done, the "find-done" signal should be
  * emitted, by using e_content_editor_emit_find_done().
+ *
+ * Since: 3.22
  **/
 void
 e_content_editor_find (EContentEditor *editor,
@@ -1107,15 +1715,17 @@ e_content_editor_find (EContentEditor *editor,
 }
 
 /**
- * e_content_editor_selection_replace:
+ * e_content_editor_replace:
  * @editor: an #EContentEditor
  * @replacement: a string to replace current selection with
  *
  * Replaces currently selected text with @replacement.
- */
+ *
+ * Since: 3.22
+ **/
 void
-e_content_editor_selection_replace (EContentEditor *editor,
-                                    const gchar *replacement)
+e_content_editor_replace (EContentEditor *editor,
+                         const gchar *replacement)
 {
        EContentEditorInterface *iface;
 
@@ -1124,9 +1734,9 @@ e_content_editor_selection_replace (EContentEditor *editor,
 
        iface = E_CONTENT_EDITOR_GET_IFACE (editor);
        g_return_if_fail (iface != NULL);
-       g_return_if_fail (iface->selection_replace != NULL);
+       g_return_if_fail (iface->replace != NULL);
 
-       iface->selection_replace (editor, replacement);
+       iface->replace (editor, replacement);
 }
 
 /**
@@ -1142,6 +1752,8 @@ e_content_editor_selection_replace (EContentEditor *editor,
  *
  * Once the replace is done, the "replace-all-done" signal should be
  * emitted, by using e_content_editor_emit_replace_all_done().
+ *
+ * Since: 3.22
  **/
 void
 e_content_editor_replace_all (EContentEditor *editor,
@@ -1183,7 +1795,9 @@ e_content_editor_replace_all (EContentEditor *editor,
  * It is recommended to use this method only when you are not planning to make
  * bigger changes to content or structure of the document (formatting changes
  * are usually OK).
- */
+ *
+ * Since: 3.22
+ **/
 void
 e_content_editor_selection_save (EContentEditor *editor)
 {
@@ -1207,7 +1821,9 @@ e_content_editor_selection_save (EContentEditor *editor)
  *
  * Note that calling this function without calling e_content_editor_selection_save()
  * before is a programming error and the behavior is undefined.
- */
+ *
+ * Since: 3.22
+ **/
 void
 e_content_editor_selection_restore (EContentEditor *editor)
 {
@@ -1278,49 +1894,6 @@ e_content_editor_get_caret_offset (EContentEditor *editor)
        return iface->get_caret_offset (editor);
 }
 
-void
-e_content_editor_update_fonts (EContentEditor *editor)
-{
-       EContentEditorInterface *iface;
-
-       g_return_if_fail (E_IS_CONTENT_EDITOR (editor));
-
-       iface = E_CONTENT_EDITOR_GET_IFACE (editor);
-       g_return_if_fail (iface != NULL);
-       g_return_if_fail (iface->update_fonts != NULL);
-
-       iface->update_fonts (editor);
-}
-
-gboolean
-e_content_editor_is_editable (EContentEditor *editor)
-{
-       EContentEditorInterface *iface;
-
-       g_return_val_if_fail (E_IS_CONTENT_EDITOR (editor), FALSE);
-
-       iface = E_CONTENT_EDITOR_GET_IFACE (editor);
-       g_return_val_if_fail (iface != NULL, FALSE);
-       g_return_val_if_fail (iface->is_editable != NULL, FALSE);
-
-       return iface->is_editable (editor);
-}
-
-void
-e_content_editor_set_editable (EContentEditor *editor,
-                               gboolean editable)
-{
-       EContentEditorInterface *iface;
-
-       g_return_if_fail (E_IS_CONTENT_EDITOR (editor));
-
-       iface = E_CONTENT_EDITOR_GET_IFACE (editor);
-       g_return_if_fail (iface != NULL);
-       g_return_if_fail (iface->set_editable != NULL);
-
-       iface->set_editable (editor, editable);
-}
-
 gchar *
 e_content_editor_get_current_signature_uid (EContentEditor *editor)
 {
@@ -1376,605 +1949,6 @@ e_content_editor_insert_signature (EContentEditor *editor,
                ignore_next_signature_change);
 }
 
-/**
- * e_content_editor_set_alignment:
- * @editor: an #EContentEditor
- * @alignment: an #EContentEditorAlignment value to apply
- *
- * Sets alignment of current paragraph to @alignment.
- */
-void
-e_content_editor_set_alignment (EContentEditor *editor,
-                                EContentEditorAlignment value)
-{
-       EContentEditorInterface *iface;
-
-       g_return_if_fail (E_IS_CONTENT_EDITOR (editor));
-
-       iface = E_CONTENT_EDITOR_GET_IFACE (editor);
-       g_return_if_fail (iface != NULL);
-       g_return_if_fail (iface->set_alignment != NULL);
-
-       iface->set_alignment (editor, value);
-}
-
-/**
- * e_content_editor_get_alignment:
- * @editor: #an EContentEditor
- *
- * Returns alignment of the current paragraph.
- *
- * Returns: #EContentEditorAlignment
- */
-EContentEditorAlignment
-e_content_editor_get_alignment (EContentEditor *editor)
-{
-       EContentEditorInterface *iface;
-
-       g_return_val_if_fail (
-               E_IS_CONTENT_EDITOR (editor), E_CONTENT_EDITOR_ALIGNMENT_LEFT);
-
-       iface = E_CONTENT_EDITOR_GET_IFACE (editor);
-       g_return_val_if_fail (iface != NULL, E_CONTENT_EDITOR_ALIGNMENT_LEFT);
-       g_return_val_if_fail (iface->get_alignment != NULL, E_CONTENT_EDITOR_ALIGNMENT_LEFT);
-
-       return iface->get_alignment (editor);
-}
-
-/**
- * e_content_editor_set_block_format:
- * @editor: an #EContentEditor
- * @format: an #EContentEditorBlockFormat value
- *
- * Changes block format of current paragraph to @format.
- */
-void
-e_content_editor_set_block_format (EContentEditor *editor,
-                                   EContentEditorBlockFormat value)
-{
-       EContentEditorInterface *iface;
-
-       g_return_if_fail (E_IS_CONTENT_EDITOR (editor));
-
-       iface = E_CONTENT_EDITOR_GET_IFACE (editor);
-       g_return_if_fail (iface != NULL);
-       g_return_if_fail (iface->set_block_format != NULL);
-
-       iface->set_block_format (editor, value);
-}
-
-/**
- * e_content_editor_get_block_format:
- * @editor: an #EContentEditor
- *
- * Returns block format of current paragraph.
- *
- * Returns: #EContentEditorBlockFormat
- */
-EContentEditorBlockFormat
-e_content_editor_get_block_format (EContentEditor *editor)
-{
-       EContentEditorInterface *iface;
-
-       g_return_val_if_fail (
-               E_IS_CONTENT_EDITOR (editor),
-               E_CONTENT_EDITOR_BLOCK_FORMAT_PARAGRAPH);
-
-       iface = E_CONTENT_EDITOR_GET_IFACE (editor);
-       g_return_val_if_fail (
-               iface != NULL, E_CONTENT_EDITOR_BLOCK_FORMAT_PARAGRAPH);
-       g_return_val_if_fail (
-               iface->get_block_format != NULL,
-               E_CONTENT_EDITOR_BLOCK_FORMAT_PARAGRAPH);
-
-       return iface->get_block_format (editor);
-}
-
-/**
- * e_content_editor_set_font_color:
- * @editor: an #EContentEditor
- * @rgba: a #GdkRGBA
- *
- * Sets font color of current selection or letter at current cursor position to
- * color defined in @rgba.
- */
-void
-e_content_editor_set_background_color (EContentEditor *editor,
-                                       const GdkRGBA *value)
-{
-       EContentEditorInterface *iface;
-
-       g_return_if_fail (E_IS_CONTENT_EDITOR (editor));
-       g_return_if_fail (value != NULL);
-
-       iface = E_CONTENT_EDITOR_GET_IFACE (editor);
-       g_return_if_fail (iface != NULL);
-       g_return_if_fail (iface->set_background_color != NULL);
-
-       iface->set_background_color (editor, value);
-}
-
-/**
- * e_content_editor_get_font_color:
- * @editor: an #EContentEditor
- * @rgba: a #GdkRGBA object to be set to current font color
- *
- * Returns: A color of current text selection or letter at current cursor
- * position. [transfer-none]
- */
-const GdkRGBA *
-e_content_editor_get_background_color (EContentEditor *editor)
-{
-       EContentEditorInterface *iface;
-
-       g_return_val_if_fail (E_IS_CONTENT_EDITOR (editor), NULL);
-
-       iface = E_CONTENT_EDITOR_GET_IFACE (editor);
-       g_return_val_if_fail (iface != NULL, NULL);
-       g_return_val_if_fail (iface->get_background_color != NULL, NULL);
-
-       return iface->get_background_color (editor);
-}
-
-/**
- * e_content_editor_set_font_name:
- * @editor: an #EContentEditor
- * @font_name: a font name to apply
- *
- * Sets font name of current selection or of letter at current cursor position
- * to @font_name.
- */
-void
-e_content_editor_set_font_name (EContentEditor *editor,
-                                const gchar *value)
-{
-       EContentEditorInterface *iface;
-
-       g_return_if_fail (E_IS_CONTENT_EDITOR (editor));
-
-       iface = E_CONTENT_EDITOR_GET_IFACE (editor);
-       g_return_if_fail (iface != NULL);
-       g_return_if_fail (iface->set_font_name != NULL);
-
-       iface->set_font_name (editor, value);
-}
-
-/**
- * e_content_editor_get_font_name:
- * @editor: an #EContentEditor
- *
- * Returns name of font used in current selection or at letter at current cursor
- * position.
- *
- * Returns: A string with font name. [transfer-none]
- */
-const gchar *
-e_content_editor_get_font_name (EContentEditor *editor)
-{
-       EContentEditorInterface *iface;
-
-       g_return_val_if_fail (E_IS_CONTENT_EDITOR (editor), NULL);
-
-       iface = E_CONTENT_EDITOR_GET_IFACE (editor);
-       g_return_val_if_fail (iface != NULL, NULL);
-       g_return_val_if_fail (iface->get_font_name != NULL, NULL);
-
-       return iface->get_font_name (editor);
-}
-
-/**
- * e_content_editor_set_font_color:
- * @editor: an #EContentEditor
- * @rgba: a #GdkRGBA
- *
- * Sets font color of current selection or letter at current cursor position to
- * color defined in @rgba.
- *
- */
-void
-e_content_editor_set_font_color (EContentEditor *editor,
-                                 const GdkRGBA *value)
-{
-       EContentEditorInterface *iface;
-
-       g_return_if_fail (E_IS_CONTENT_EDITOR (editor));
-
-       iface = E_CONTENT_EDITOR_GET_IFACE (editor);
-       g_return_if_fail (iface != NULL);
-       g_return_if_fail (iface->set_font_color != NULL);
-
-       iface->set_font_color (editor, value);
-}
-
-/**
- * e_content_editor_get_font_color:
- * @editor: an #EContentEditor
- *
- * Returns color of font used in current selection or at letter at current cursor
- * position.
- *
- * Returns: A #GdkRGBA object with current font color. [transfer-none]
- */
-const GdkRGBA *
-e_content_editor_get_font_color (EContentEditor *editor)
-{
-       EContentEditorInterface *iface;
-
-       g_return_val_if_fail (E_IS_CONTENT_EDITOR (editor), NULL);
-
-       iface = E_CONTENT_EDITOR_GET_IFACE (editor);
-       g_return_val_if_fail (iface != NULL, NULL);
-       g_return_val_if_fail (iface->get_font_color != NULL, NULL);
-
-       return iface->get_font_color (editor);
-}
-
-/**
- * e_content_editor_set_font_size:
- * @editor: an #EContentEditor
- * @font_size: point size to apply
- *
- * Sets font size of current selection or of letter at current cursor position
- * to @font_size.
- */
-void
-e_content_editor_set_font_size (EContentEditor *editor,
-                                guint value)
-{
-       EContentEditorInterface *iface;
-
-       g_return_if_fail (E_IS_CONTENT_EDITOR (editor));
-
-       iface = E_CONTENT_EDITOR_GET_IFACE (editor);
-       g_return_if_fail (iface != NULL);
-       g_return_if_fail (iface->set_font_size != NULL);
-
-       iface->set_font_size (editor, value);
-}
-
-/**
- * e_content_editor_is_citation:
- * @editor: an #EContentEditor
- *
- * Returns whether current paragraph is a citation.
- *
- * Returns: @TRUE when current paragraph is a citation, @FALSE otherwise.
- */
-guint
-e_content_editor_get_font_size (EContentEditor *editor)
-{
-       EContentEditorInterface *iface;
-
-       g_return_val_if_fail (E_IS_CONTENT_EDITOR (editor), 3);
-
-       iface = E_CONTENT_EDITOR_GET_IFACE (editor);
-       g_return_val_if_fail (iface != NULL, 3);
-       g_return_val_if_fail (iface->get_font_size != NULL, 3);
-
-       return iface->get_font_size (editor);
-}
-
-/**
- * e_content_editor_set_bold:
- * @editor: an #EContentEditor
- * @bold: @TRUE to enable bold, @FALSE to disable
- *
- * Toggles bold formatting of current selection or letter at current cursor
- * position, depending on whether @bold is @TRUE or @FALSE.
- */
-void
-e_content_editor_set_bold (EContentEditor *editor,
-                           gboolean bold)
-{
-       EContentEditorInterface *iface;
-
-       g_return_if_fail (E_IS_CONTENT_EDITOR (editor));
-
-       iface = E_CONTENT_EDITOR_GET_IFACE (editor);
-       g_return_if_fail (iface != NULL);
-       g_return_if_fail (iface->set_bold != NULL);
-
-       iface->set_bold (editor, bold);
-}
-
-/**
- * e_content_editor_is_bold:
- * @editor: an #EContentEditor
- *
- * Returns whether current selection or letter at current cursor position is bold.
- *
- * Returns @TRUE when selection is bold, @FALSE otherwise.
- */
-gboolean
-e_content_editor_is_bold (EContentEditor *editor)
-{
-       EContentEditorInterface *iface;
-
-       g_return_val_if_fail (E_IS_CONTENT_EDITOR (editor), FALSE);
-
-       iface = E_CONTENT_EDITOR_GET_IFACE (editor);
-       g_return_val_if_fail (iface != NULL, FALSE);
-       g_return_val_if_fail (iface->is_bold != NULL, FALSE);
-
-       return iface->is_bold (editor);
-}
-
-/**
- * e_content_editor_set_bold:
- * @editor: an #EContentEditor
- * @bold: @TRUE to enable bold, @FALSE to disable
- *
- * Toggles bold formatting of current editor or letter at current cursor
- * position, depending on whether @bold is @TRUE or @FALSE.
- */
-void
-e_content_editor_set_italic (EContentEditor *editor,
-                             gboolean italic)
-{
-       EContentEditorInterface *iface;
-
-       g_return_if_fail (E_IS_CONTENT_EDITOR (editor));
-
-       iface = E_CONTENT_EDITOR_GET_IFACE (editor);
-       g_return_if_fail (iface != NULL);
-       g_return_if_fail (iface->set_italic != NULL);
-
-       iface->set_italic (editor, italic);
-}
-
-/**
- * e_content_editor_is_italic:
- * @editor: an #EContentEditor
- *
- * Returns whether current selection or letter at current cursor position
- * is italic.
- *
- * Returns @TRUE when selection is italic, @FALSE otherwise.
- */
-gboolean
-e_content_editor_is_italic (EContentEditor *editor)
-{
-       EContentEditorInterface *iface;
-
-       g_return_val_if_fail (E_IS_CONTENT_EDITOR (editor), FALSE);
-
-       iface = E_CONTENT_EDITOR_GET_IFACE (editor);
-       g_return_val_if_fail (iface != NULL, FALSE);
-       g_return_val_if_fail (iface->is_italic != NULL, FALSE);
-
-       return iface->is_italic (editor);
-}
-
-/**
- * e_content_editor_set_monospaced:
- * @editor: an #EContentEditor
- * @monospaced: @TRUE to enable monospaced, @FALSE to disable
- *
- * Toggles monospaced formatting of current selection or letter at current cursor
- * position, depending on whether @monospaced is @TRUE or @FALSE.
- */
-void
-e_content_editor_set_monospaced (EContentEditor *editor,
-                                 gboolean monospaced)
-{
-       EContentEditorInterface *iface;
-
-       g_return_if_fail (E_IS_CONTENT_EDITOR (editor));
-
-       iface = E_CONTENT_EDITOR_GET_IFACE (editor);
-       g_return_if_fail (iface != NULL);
-       g_return_if_fail (iface->set_monospaced != NULL);
-
-       iface->set_monospaced (editor, monospaced);
-}
-
-/**
- * e_content_editor_is_monospaced:
- * @editor: an #EContentEditor
- *
- * Returns whether current selection or letter at current cursor position
- * is monospaced.
- *
- * Returns @TRUE when selection is monospaced, @FALSE otherwise.
- */
-gboolean
-e_content_editor_is_monospaced (EContentEditor *editor)
-{
-       EContentEditorInterface *iface;
-
-       g_return_val_if_fail (E_IS_CONTENT_EDITOR (editor), FALSE);
-
-       iface = E_CONTENT_EDITOR_GET_IFACE (editor);
-       g_return_val_if_fail (iface != NULL, FALSE);
-       g_return_val_if_fail (iface->is_monospaced != NULL, FALSE);
-
-       return iface->is_monospaced (editor);
-}
-
-/**
- * e_content_editor_set_strikethrough:
- * @editor: an #EContentEditor
- * @strikethrough: @TRUE to enable strikethrough, @FALSE to disable
- *
- * Toggles strike through formatting of current selection or letter at current
- * cursor position, depending on whether @strikethrough is @TRUE or @FALSE.
- */
-void
-e_content_editor_set_strikethrough (EContentEditor *editor,
-                                    gboolean strikethrough)
-{
-       EContentEditorInterface *iface;
-
-       g_return_if_fail (E_IS_CONTENT_EDITOR (editor));
-
-       iface = E_CONTENT_EDITOR_GET_IFACE (editor);
-       g_return_if_fail (iface != NULL);
-       g_return_if_fail (iface->set_strikethrough != NULL);
-
-       iface->set_strikethrough (editor, strikethrough);
-}
-
-/**
- * e_content_editor_is_strikethrough:
- * @editor: an #EContentEditor
- *
- * Returns whether current selection or letter at current cursor position
- * is striked through.
- *
- * Returns @TRUE when selection is striked through, @FALSE otherwise.
- */
-gboolean
-e_content_editor_is_strikethrough (EContentEditor *editor)
-{
-       EContentEditorInterface *iface;
-
-       g_return_val_if_fail (E_IS_CONTENT_EDITOR (editor), FALSE);
-
-       iface = E_CONTENT_EDITOR_GET_IFACE (editor);
-       g_return_val_if_fail (iface != NULL, FALSE);
-       g_return_val_if_fail (iface->is_strikethrough != NULL, FALSE);
-
-       return iface->is_strikethrough (editor);
-}
-
-/**
- * e_content_editor_set_subscript:
- * @editor: an #EContentEditor
- * @subscript: @TRUE to enable subscript, @FALSE to disable
- *
- * Toggles subscript of current selection or letter at current cursor position,
- * depending on whether @subscript is @TRUE or @FALSE.
- */
-void
-e_content_editor_set_subscript (EContentEditor *editor,
-                                gboolean subscript)
-{
-       EContentEditorInterface *iface;
-
-       g_return_if_fail (E_IS_CONTENT_EDITOR (editor));
-
-       iface = E_CONTENT_EDITOR_GET_IFACE (editor);
-       g_return_if_fail (iface != NULL);
-       g_return_if_fail (iface->set_subscript != NULL);
-
-       iface->set_subscript (editor, subscript);
-}
-
-/**
- * e_content_editor_is_subscript:
- * @editor: an #EContentEditor
- *
- * Returns whether current selection or letter at current cursor position
- * is in subscript.
- *
- * Returns @TRUE when selection is in subscript, @FALSE otherwise.
- */
-gboolean
-e_content_editor_is_subscript (EContentEditor *editor)
-{
-       EContentEditorInterface *iface;
-
-       g_return_val_if_fail (E_IS_CONTENT_EDITOR (editor), FALSE);
-
-       iface = E_CONTENT_EDITOR_GET_IFACE (editor);
-       g_return_val_if_fail (iface != NULL, FALSE);
-       g_return_val_if_fail (iface->is_subscript != NULL, FALSE);
-
-       return iface->is_subscript (editor);
-}
-
-/**
- * e_content_editor_set_superscript:
- * @editor: an #EContentEditor
- * @superscript: @TRUE to enable superscript, @FALSE to disable
- *
- * Toggles superscript of current selection or letter at current cursor position,
- * depending on whether @superscript is @TRUE or @FALSE.
- */
-void
-e_content_editor_set_superscript (EContentEditor *editor,
-                                  gboolean superscript)
-{
-       EContentEditorInterface *iface;
-
-       g_return_if_fail (E_IS_CONTENT_EDITOR (editor));
-
-       iface = E_CONTENT_EDITOR_GET_IFACE (editor);
-       g_return_if_fail (iface != NULL);
-       g_return_if_fail (iface->set_superscript != NULL);
-
-       iface->set_superscript (editor, superscript);
-}
-
-/**
- * e_content_editor_is_superscript:
- * @editor: an #EContentEditor
- *
- * Returns whether current selection or letter at current cursor position
- * is in superscript.
- *
- * Returns @TRUE when selection is in superscript, @FALSE otherwise.
- */
-gboolean
-e_content_editor_is_superscript (EContentEditor *editor)
-{
-       EContentEditorInterface *iface;
-
-       g_return_val_if_fail (E_IS_CONTENT_EDITOR (editor), FALSE);
-
-       iface = E_CONTENT_EDITOR_GET_IFACE (editor);
-       g_return_val_if_fail (iface != NULL, FALSE);
-       g_return_val_if_fail (iface->is_superscript != NULL, FALSE);
-
-       return iface->is_superscript (editor);
-}
-
-/**
- * e_content_editor_set_underline:
- * @editor: an #EContentEditor
- * @underline: @TRUE to enable underline, @FALSE to disable
- *
- * Toggles underline formatting of current editor or letter at current cursor
- * position, depending on whether @underline is @TRUE or @FALSE.
- */
-void
-e_content_editor_set_underline (EContentEditor *editor,
-                                gboolean underline)
-{
-       EContentEditorInterface *iface;
-
-       g_return_if_fail (E_IS_CONTENT_EDITOR (editor));
-
-       iface = E_CONTENT_EDITOR_GET_IFACE (editor);
-       g_return_if_fail (iface != NULL);
-       g_return_if_fail (iface->set_underline != NULL);
-
-       iface->set_underline (editor, underline);
-}
-
-/**
- * e_content_editor_is_underline:
- * @editor: an #EContentEditor
- *
- * Returns whether current selection or letter at current cursor position
- * is underlined.
- *
- * Returns @TRUE when selection is underlined, @FALSE otherwise.
- */
-gboolean
-e_content_editor_is_underline (EContentEditor *editor)
-{
-       EContentEditorInterface *iface;
-
-       g_return_val_if_fail (E_IS_CONTENT_EDITOR (editor), FALSE);
-
-       iface = E_CONTENT_EDITOR_GET_IFACE (editor);
-       g_return_val_if_fail (iface != NULL, FALSE);
-       g_return_val_if_fail (iface->is_underline != NULL, FALSE);
-
-       return iface->is_underline (editor);
-}
-
 void
 e_content_editor_delete_cell_contents (EContentEditor *editor)
 {
diff --git a/e-util/e-content-editor.h b/e-util/e-content-editor.h
index fbd4dd5..dc08780 100644
--- a/e-util/e-content-editor.h
+++ b/e-util/e-content-editor.h
@@ -26,9 +26,9 @@
 
 #include <camel/camel.h>
 
-#include <e-util/e-content-editor-enums.h>
 #include <e-util/e-emoticon.h>
 #include <e-util/e-spell-checker.h>
+#include <e-util/e-util-enums.h>
 
 #define DEFAULT_CONTENT_EDITOR_NAME "WebKit"
 
@@ -45,6 +45,7 @@ typedef struct {
 struct _EContentEditorInterface {
        GTypeInterface parent_interface;
 
+       void            (*update_styles)                (EContentEditor *editor);
        void            (*insert_content)               (EContentEditor *editor,
                                                         const gchar *content,
                                                         EContentEditorInsertContentFlags flags);
@@ -74,11 +75,6 @@ struct _EContentEditorInterface {
                                                         gint y,
                                                         gboolean cancel_if_not_collapsed);
 
-       void            (*set_changed)                  (EContentEditor *editor,
-                                                        gboolean changed);
-
-       gboolean        (*get_changed)                  (EContentEditor *editor);
-
        void            (*cut)                          (EContentEditor *editor);
 
        void            (*copy)                         (EContentEditor *editor);
@@ -90,21 +86,12 @@ struct _EContentEditorInterface {
        void            (*reconnect_paste_clipboard_signals)
                                                        (EContentEditor *editor);
 
-       gboolean        (*can_undo)                     (EContentEditor *editor);
-
        void            (*undo)                         (EContentEditor *editor);
 
-       gboolean        (*can_redo)                     (EContentEditor *editor);
-
        void            (*redo)                         (EContentEditor *editor);
 
        void            (*clear_undo_redo_history)      (EContentEditor *editor);
 
-       void            (*set_html_mode)                (EContentEditor *editor,
-                                                        gboolean html_mode);
-
-       gboolean        (*get_html_mode)                (EContentEditor *editor);
-
        ESpellChecker * (*get_spell_checker)            (EContentEditor *editor);
 
        void            (*set_spell_checking_languages) (EContentEditor *editor,
@@ -115,7 +102,7 @@ struct _EContentEditorInterface {
 
        gboolean        (*get_spell_check)              (EContentEditor *editor);
 
-       gchar *         (*selection_get_text)           (EContentEditor *editor);
+       gchar *         (*get_selected_text)            (EContentEditor *editor);
 
        gchar *         (*get_caret_word)               (EContentEditor *editor);
 
@@ -124,8 +111,6 @@ struct _EContentEditorInterface {
 
        void            (*select_all)                   (EContentEditor *editor);
 
-       gboolean        (*selection_is_indented)        (EContentEditor *editor);
-
        void            (*selection_indent)             (EContentEditor *editor);
 
        void            (*selection_unindent)           (EContentEditor *editor);
@@ -139,7 +124,7 @@ struct _EContentEditorInterface {
                                                         guint32 flags,
                                                         const gchar *text);
 
-       void            (*selection_replace)            (EContentEditor *editor,
+       void            (*replace)                      (EContentEditor *editor,
                                                         const gchar *replacement);
 
        void            (*replace_all)                  (EContentEditor *editor,
@@ -159,13 +144,6 @@ struct _EContentEditorInterface {
 
        guint           (*get_caret_offset)             (EContentEditor *editor);
 
-       void            (*update_fonts)                 (EContentEditor *editor);
-
-       gboolean        (*is_editable)                  (EContentEditor *editor);
-
-       void            (*set_editable)                 (EContentEditor *editor,
-                                                        gboolean editable);
-
        gchar *         (*get_current_signature_uid)    (EContentEditor *editor);
 
        gboolean        (*is_ready)                     (EContentEditor *editor);
@@ -178,73 +156,6 @@ struct _EContentEditorInterface {
                                                         gboolean *check_if_signature_is_changed,
                                                         gboolean *ignore_next_signature_change);
 
-       void            (*set_alignment)                (EContentEditor *editor,
-                                                        EContentEditorAlignment value);
-
-       EContentEditorAlignment
-                       (*get_alignment)                (EContentEditor *editor);
-
-       void            (*set_block_format)             (EContentEditor *editor,
-                                                        EContentEditorBlockFormat value);
-
-       EContentEditorBlockFormat
-                       (*get_block_format)             (EContentEditor *editor);
-
-       void            (*set_background_color)         (EContentEditor *editor,
-                                                        const GdkRGBA *value);
-
-       const GdkRGBA * (*get_background_color)         (EContentEditor *editor);
-
-       void            (*set_font_name)                (EContentEditor *editor,
-                                                        const gchar *value);
-
-       const gchar *   (*get_font_name)                (EContentEditor *editor);
-
-       void            (*set_font_color)               (EContentEditor *editor,
-                                                        const GdkRGBA *value);
-
-       const GdkRGBA * (*get_font_color)               (EContentEditor *editor);
-
-       void            (*set_font_size)                (EContentEditor *editor,
-                                                        guint value);
-
-       guint           (*get_font_size)                (EContentEditor *editor);
-
-       void            (*set_bold)                     (EContentEditor *editor,
-                                                        gboolean bold);
-
-       gboolean        (*is_bold)                      (EContentEditor *editor);
-
-       void            (*set_italic)                   (EContentEditor *editor,
-                                                        gboolean italic);
-
-       gboolean        (*is_italic)                    (EContentEditor *editor);
-
-       void            (*set_monospaced)               (EContentEditor *editor,
-                                                        gboolean monospaced);
-
-       gboolean        (*is_monospaced)                (EContentEditor *editor);
-
-       void            (*set_strikethrough)            (EContentEditor *editor,
-                                                        gboolean strikethrough);
-
-       gboolean        (*is_strikethrough)             (EContentEditor *editor);
-
-       void            (*set_subscript)                (EContentEditor *editor,
-                                                        gboolean subscript);
-
-       gboolean        (*is_subscript)                 (EContentEditor *editor);
-
-       void            (*set_superscript)              (EContentEditor *editor,
-                                                        gboolean superscript);
-
-       gboolean        (*is_superscript)               (EContentEditor *editor);
-
-       void            (*set_underline)                (EContentEditor *editor,
-                                                        gboolean underline);
-
-       gboolean        (*is_underline)                 (EContentEditor *editor);
-
        void            (*delete_cell_contents)         (EContentEditor *editor);
 
        void            (*delete_column)                (EContentEditor *editor);
@@ -536,6 +447,76 @@ struct _EContentEditorInterface {
                                                         guint replaced_count);
 };
 
+/* Properties */
+
+gboolean       e_content_editor_can_cut        (EContentEditor *editor);
+gboolean       e_content_editor_can_copy       (EContentEditor *editor);
+gboolean       e_content_editor_can_paste      (EContentEditor *editor);
+gboolean       e_content_editor_can_undo       (EContentEditor *editor);
+gboolean       e_content_editor_can_redo       (EContentEditor *editor);
+gboolean       e_content_editor_is_indented    (EContentEditor *editor);
+gboolean       e_content_editor_is_editable    (EContentEditor *editor);
+void           e_content_editor_set_editable   (EContentEditor *editor,
+                                                gboolean editable);
+gboolean       e_content_editor_get_changed    (EContentEditor *editor);
+void           e_content_editor_set_changed    (EContentEditor *editor,
+                                                gboolean changed);
+gboolean       e_content_editor_get_html_mode  (EContentEditor *editor);
+void           e_content_editor_set_html_mode  (EContentEditor *editor,
+                                                gboolean html_mode);
+void           e_content_editor_set_alignment  (EContentEditor *editor,
+                                                EContentEditorAlignment value);
+EContentEditorAlignment
+               e_content_editor_get_alignment  (EContentEditor *editor);
+void           e_content_editor_set_background_color
+                                               (EContentEditor *editor,
+                                                const GdkRGBA *value);
+GdkRGBA *      e_content_editor_dup_background_color
+                                               (EContentEditor *editor);
+void           e_content_editor_set_font_color (EContentEditor *editor,
+                                                const GdkRGBA *value);
+GdkRGBA *      e_content_editor_dup_font_color (EContentEditor *editor);
+void           e_content_editor_set_font_name  (EContentEditor *editor,
+                                                const gchar *value);
+gchar *                e_content_editor_dup_font_name  (EContentEditor *editor);
+void           e_content_editor_set_font_size  (EContentEditor *editor,
+                                                gint value);
+gint           e_content_editor_get_font_size  (EContentEditor *editor);
+void           e_content_editor_set_block_format
+                                               (EContentEditor *editor,
+                                                EContentEditorBlockFormat value);
+EContentEditorBlockFormat
+               e_content_editor_get_block_format
+                                               (EContentEditor *editor);
+void           e_content_editor_set_bold       (EContentEditor *editor,
+                                                gboolean bold);
+gboolean       e_content_editor_is_bold        (EContentEditor *editor);
+void           e_content_editor_set_italic     (EContentEditor *editor,
+                                                gboolean italic);
+gboolean       e_content_editor_is_italic      (EContentEditor *editor);
+void           e_content_editor_set_monospaced (EContentEditor *editor,
+                                                gboolean monospaced);
+gboolean       e_content_editor_is_monospaced (EContentEditor *editor);
+void           e_content_editor_set_strikethrough
+                                               (EContentEditor *editor,
+                                                gboolean strikethrough);
+gboolean       e_content_editor_is_strikethrough
+                                               (EContentEditor *editor);
+void           e_content_editor_set_subscript  (EContentEditor *editor,
+                                                gboolean subscript);
+gboolean       e_content_editor_is_subscript   (EContentEditor *editor);
+void           e_content_editor_set_superscript
+                                               (EContentEditor *editor,
+                                                gboolean superscript);
+gboolean       e_content_editor_is_superscript
+                                               (EContentEditor *editor);
+void           e_content_editor_set_underline  (EContentEditor *editor,
+                                                gboolean underline);
+gboolean       e_content_editor_is_underline   (EContentEditor *editor);
+
+/* Methods */
+
+void           e_content_editor_update_styles  (EContentEditor *editor);
 void           e_content_editor_insert_content (EContentEditor *editor,
                                                 const gchar *content,
                                                 EContentEditorInsertContentFlags flags);
@@ -569,11 +550,6 @@ void               e_content_editor_move_caret_on_coordinates
                                                 gint y,
                                                 gboolean cancel_if_not_collapsed);
 
-void           e_content_editor_set_changed    (EContentEditor *editor,
-                                                gboolean changed);
-
-gboolean       e_content_editor_get_changed    (EContentEditor *editor);
-
 void           e_content_editor_cut            (EContentEditor *editor);
 
 void           e_content_editor_copy           (EContentEditor *editor);
@@ -586,22 +562,13 @@ gboolean  e_content_editor_paste_prefer_text_html
 void           e_content_editor_reconnect_paste_clipboard_signals
                                                (EContentEditor *editor);
 
-gboolean       e_content_editor_can_undo       (EContentEditor *editor);
-
 void           e_content_editor_undo           (EContentEditor *editor);
 
-gboolean       e_content_editor_can_redo       (EContentEditor *editor);
-
 void           e_content_editor_redo           (EContentEditor *editor);
 
 void           e_content_editor_clear_undo_redo_history
                                                (EContentEditor *editor);
 
-void           e_content_editor_set_html_mode  (EContentEditor *editor,
-                                                gboolean html_mode);
-
-gboolean       e_content_editor_get_html_mode  (EContentEditor *editor);
-
 ESpellChecker *        e_content_editor_get_spell_checker
                                                (EContentEditor *editor);
 
@@ -618,7 +585,7 @@ gboolean    e_content_editor_get_spell_check
 
 void           e_content_editor_select_all     (EContentEditor *editor);
 
-gchar *                e_content_editor_selection_get_text
+gchar *                e_content_editor_get_selected_text
                                                (EContentEditor *editor);
 
 gchar *                e_content_editor_get_caret_word (EContentEditor *editor);
@@ -627,9 +594,6 @@ void                e_content_editor_replace_caret_word
                                                (EContentEditor *editor,
                                                 const gchar *replacement);
 
-gboolean       e_content_editor_selection_is_indented
-                                               (EContentEditor *editor);
-
 void           e_content_editor_selection_indent
                                                (EContentEditor *editor);
 
@@ -647,8 +611,7 @@ void                e_content_editor_find           (EContentEditor *editor,
                                                 guint32 flags,
                                                 const gchar *text);
 
-void           e_content_editor_selection_replace
-                                               (EContentEditor *editor,
+void           e_content_editor_replace        (EContentEditor *editor,
                                                 const gchar *replacement);
 
 void           e_content_editor_replace_all    (EContentEditor *editor,
@@ -671,13 +634,6 @@ guint              e_content_editor_get_caret_position
 guint          e_content_editor_get_caret_offset
                                                (EContentEditor *editor);
 
-void           e_content_editor_update_fonts   (EContentEditor *editor);
-
-gboolean       e_content_editor_is_editable    (EContentEditor *editor);
-
-void           e_content_editor_set_editable   (EContentEditor *editor,
-                                                gboolean editable);
-
 gchar *                e_content_editor_get_current_signature_uid
                                                (EContentEditor *editor);
 
@@ -692,81 +648,6 @@ gchar *            e_content_editor_insert_signature
                                                 gboolean *check_if_signature_is_changed,
                                                 gboolean *ignore_next_signature_change);
 
-void           e_content_editor_set_alignment  (EContentEditor *editor,
-                                                EContentEditorAlignment value);
-
-EContentEditorAlignment
-               e_content_editor_get_alignment  (EContentEditor *editor);
-
-void           e_content_editor_set_block_format
-                                               (EContentEditor *editor,
-                                                EContentEditorBlockFormat value);
-
-EContentEditorBlockFormat
-               e_content_editor_get_block_format
-                                               (EContentEditor *editor);
-
-void           e_content_editor_set_background_color
-                                               (EContentEditor *editor,
-                                                const GdkRGBA *value);
-
-const GdkRGBA *        e_content_editor_get_background_color
-                                               (EContentEditor *editor);
-
-void           e_content_editor_set_font_name  (EContentEditor *editor,
-                                                const gchar *value);
-
-const gchar *  e_content_editor_get_font_name  (EContentEditor *editor);
-
-void           e_content_editor_set_font_color (EContentEditor *editor,
-                                                const GdkRGBA *value);
-
-const GdkRGBA *        e_content_editor_get_font_color (EContentEditor *editor);
-
-void           e_content_editor_set_font_size  (EContentEditor *editor,
-                                                guint value);
-
-guint          e_content_editor_get_font_size  (EContentEditor *editor);
-
-void           e_content_editor_set_bold       (EContentEditor *editor,
-                                                gboolean bold);
-
-gboolean       e_content_editor_is_bold        (EContentEditor *editor);
-
-void           e_content_editor_set_italic     (EContentEditor *editor,
-                                                gboolean italic);
-
-gboolean       e_content_editor_is_italic      (EContentEditor *editor);
-
-void           e_content_editor_set_monospaced (EContentEditor *editor,
-                                                gboolean monospaced);
-
-gboolean       e_content_editor_is_monospaced (EContentEditor *editor);
-
-void           e_content_editor_set_strikethrough
-                                               (EContentEditor *editor,
-                                                gboolean strikethrough);
-
-gboolean       e_content_editor_is_strikethrough
-                                               (EContentEditor *editor);
-
-void           e_content_editor_set_subscript  (EContentEditor *editor,
-                                                gboolean subscript);
-
-gboolean       e_content_editor_is_subscript   (EContentEditor *editor);
-
-void           e_content_editor_set_superscript
-                                               (EContentEditor *editor,
-                                                gboolean superscript);
-
-gboolean       e_content_editor_is_superscript
-                                               (EContentEditor *editor);
-
-void           e_content_editor_set_underline  (EContentEditor *editor,
-                                                gboolean underline);
-
-gboolean       e_content_editor_is_underline   (EContentEditor *editor);
-
 void           e_content_editor_delete_cell_contents
                                                (EContentEditor *editor);
 void
@@ -1131,6 +1012,8 @@ void              e_content_editor_on_find_dialog_open
 void           e_content_editor_on_find_dialog_close
                                                (EContentEditor *editor);
 
+/* Signal helpers */
+
 void           e_content_editor_emit_load_finished
                                                (EContentEditor *editor);
 gboolean       e_content_editor_emit_paste_clipboard
diff --git a/e-util/e-html-editor-replace-dialog.c b/e-util/e-html-editor-replace-dialog.c
index c1ee2de..59b69a7 100644
--- a/e-util/e-html-editor-replace-dialog.c
+++ b/e-util/e-html-editor-replace-dialog.c
@@ -77,7 +77,7 @@ replace_occurance (EHTMLEditorReplaceDialog *dialog)
 {
        gtk_widget_hide (dialog->priv->result_label);
 
-       e_content_editor_selection_replace (
+       e_content_editor_replace (
                dialog->priv->cnt_editor,
                gtk_entry_get_text (GTK_ENTRY (dialog->priv->replace_entry)));
 }
diff --git a/e-util/e-html-editor-selection.h b/e-util/e-html-editor-selection.h
index 9d10ba8..a0486c2 100644
--- a/e-util/e-html-editor-selection.h
+++ b/e-util/e-html-editor-selection.h
@@ -26,7 +26,7 @@
 #define E_HTML_EDITOR_SELECTION_H
 
 #include <gtk/gtk.h>
-#include <e-util/e-content-editor-enums.h>
+#include <e-util/e-util-enums.h>
 
 /* Standard GObject macros */
 #define E_TYPE_HTML_EDITOR_SELECTION \
diff --git a/e-util/e-html-editor-text-dialog.c b/e-util/e-html-editor-text-dialog.c
index b859d6a..f944338 100644
--- a/e-util/e-html-editor-text-dialog.c
+++ b/e-util/e-html-editor-text-dialog.c
@@ -142,7 +142,7 @@ html_editor_text_dialog_show (GtkWidget *widget)
        EHTMLEditorTextDialog *dialog;
        EHTMLEditor *editor;
        EContentEditor *cnt_editor;
-       const GdkRGBA *rgba;
+       GdkRGBA *rgba;
 
        dialog = E_HTML_EDITOR_TEXT_DIALOG (widget);
        editor = e_html_editor_dialog_get_editor (E_HTML_EDITOR_DIALOG (dialog));
@@ -165,9 +165,12 @@ html_editor_text_dialog_show (GtkWidget *widget)
                GTK_COMBO_BOX (dialog->priv->size_check),
                e_content_editor_get_font_size (cnt_editor) - 1);
 
-       rgba = e_content_editor_get_font_color (cnt_editor);
-       e_color_combo_set_current_color (
-               E_COLOR_COMBO (dialog->priv->color_check), rgba);
+       rgba = e_content_editor_dup_font_color (cnt_editor);
+       if (rgba) {
+               e_color_combo_set_current_color (
+                       E_COLOR_COMBO (dialog->priv->color_check), rgba);
+               gdk_rgba_free (rgba);
+       }
 
        GTK_WIDGET_CLASS (e_html_editor_text_dialog_parent_class)->show (widget);
 }
diff --git a/e-util/e-html-editor-view.c b/e-util/e-html-editor-view.c
index 6c7acd6..26f4398 100644
--- a/e-util/e-html-editor-view.c
+++ b/e-util/e-html-editor-view.c
@@ -1165,7 +1165,7 @@ e_html_editor_settings_changed_cb (GSettings *settings,
  *
  * Returns a new instance of the editor.
  *
- * Returns: A newly created #EHTMLEditorView. [transfer-full]
+ * Returns: (transfer-full): A newly created #EHTMLEditorView.
  */
 EHTMLEditorView *
 e_html_editor_view_new (void)
diff --git a/e-util/e-html-editor.c b/e-util/e-html-editor.c
index 48b24b8..497403f 100644
--- a/e-util/e-html-editor.c
+++ b/e-util/e-html-editor.c
@@ -879,7 +879,7 @@ e_html_editor_init (EHTMLEditor *editor)
  *
  * Constructs a new #EHTMLEditor.
  *
- * Returns: A newly created widget. [transfer-full]
+ * Returns: (transfer-full): A newly created widget.
  */
 GtkWidget *
 e_html_editor_new (void)
diff --git a/e-util/e-util-enums.h b/e-util/e-util-enums.h
index efa4192..da33985 100644
--- a/e-util/e-util-enums.h
+++ b/e-util/e-util-enums.h
@@ -142,6 +142,388 @@ typedef enum {
        E_IMAGE_LOADING_POLICY_ALWAYS
 } EImageLoadingPolicy;
 
+/**
+ * EContentEditorInsertContentFlags:
+ * @E_CONTENT_EDITOR_INSERT_CONVERT:
+ * @E_CONTENT_EDITOR_INSERT_QUOTE_CONTENT:
+ * @E_CONTENT_EDITOR_INSERT_REPLACE_ALL:
+ * @E_CONTENT_EDITOR_INSERT_TEXT_HTML:
+ * @E_CONTENT_EDITOR_INSERT_TEXT_PLAIN:
+ *
+ * Since: 3.22
+ **/
+typedef enum {
+       E_CONTENT_EDITOR_INSERT_CONVERT = 1 << 0,
+       E_CONTENT_EDITOR_INSERT_QUOTE_CONTENT = 1 << 1,
+       E_CONTENT_EDITOR_INSERT_REPLACE_ALL = 1 << 2,
+       E_CONTENT_EDITOR_INSERT_TEXT_HTML = 1 << 3,
+       E_CONTENT_EDITOR_INSERT_TEXT_PLAIN = 1 << 4,
+} EContentEditorInsertContentFlags;
+
+/**
+ * EContentEditorGetContentFlags:
+ * @E_CONTENT_EDITOR_GET_BODY:
+ * @E_CONTENT_EDITOR_GET_INLINE_IMAGES:
+ * @E_CONTENT_EDITOR_GET_PROCESSED: raw or processed
+ * @E_CONTENT_EDITOR_GET_TEXT_HTML:
+ * @E_CONTENT_EDITOR_GET_TEXT_PLAIN:
+ * @E_CONTENT_EDITOR_GET_EXCLUDE_SIGNATURE:
+ *
+ * Since: 3.22
+ **/
+typedef enum {
+       E_CONTENT_EDITOR_GET_BODY = 1 << 0,
+       E_CONTENT_EDITOR_GET_INLINE_IMAGES = 1 << 1,
+       E_CONTENT_EDITOR_GET_PROCESSED = 1 << 2, /* raw or processed */
+       E_CONTENT_EDITOR_GET_TEXT_HTML = 1 << 3,
+       E_CONTENT_EDITOR_GET_TEXT_PLAIN = 1 << 4,
+       E_CONTENT_EDITOR_GET_EXCLUDE_SIGNATURE = 1 << 5
+} EContentEditorGetContentFlags;
+
+/**
+ * EContentEditorContentFlags:
+ * @E_CONTENT_EDITOR_MESSAGE_DRAFT:
+ * @E_CONTENT_EDITOR_MESSAGE_EDIT_AS_NEW:
+ * @E_CONTENT_EDITOR_MESSAGE_EDITTING:
+ * @E_CONTENT_EDITOR_MESSAGE_FROM_SELECTION:
+ * @E_CONTENT_EDITOR_MESSAGE_NEW:
+ *
+ * Since: 3.22
+ **/
+typedef enum {
+       E_CONTENT_EDITOR_MESSAGE_DRAFT = 1 << 0,
+       E_CONTENT_EDITOR_MESSAGE_EDIT_AS_NEW = 1 << 1,
+       E_CONTENT_EDITOR_MESSAGE_EDITTING = 1 << 2,
+       E_CONTENT_EDITOR_MESSAGE_FROM_SELECTION = 1 << 3,
+       E_CONTENT_EDITOR_MESSAGE_NEW = 1 << 4
+} EContentEditorContentFlags;
+
+/**
+ * EContentEditorNodeFlags:
+ * @E_CONTENT_EDITOR_NODE_IS_ANCHOR:
+ * @E_CONTENT_EDITOR_NODE_IS_H_RULE:
+ * @E_CONTENT_EDITOR_NODE_IS_IMAGE:
+ * @E_CONTENT_EDITOR_NODE_IS_TABLE:
+ * @E_CONTENT_EDITOR_NODE_IS_TABLE_CELL:
+ * @E_CONTENT_EDITOR_NODE_IS_TEXT:
+ * @E_CONTENT_EDITOR_NODE_IS_TEXT_COLLAPSED:
+ *
+ * Since: 3.22
+ **/
+typedef enum {
+       E_CONTENT_EDITOR_NODE_IS_ANCHOR = 1 << 0,
+       E_CONTENT_EDITOR_NODE_IS_H_RULE = 1 << 1,
+       E_CONTENT_EDITOR_NODE_IS_IMAGE = 1 << 2,
+       E_CONTENT_EDITOR_NODE_IS_TABLE = 1 << 3,
+       E_CONTENT_EDITOR_NODE_IS_TABLE_CELL = 1 << 4,
+       E_CONTENT_EDITOR_NODE_IS_TEXT = 1 << 5,
+       E_CONTENT_EDITOR_NODE_IS_TEXT_COLLAPSED = 1 << 6
+} EContentEditorNodeFlags;
+
+/**
+ * EContentEditorBlockFormat:
+ * @E_CONTENT_EDITOR_BLOCK_FORMAT_NONE:
+ * @E_CONTENT_EDITOR_BLOCK_FORMAT_PARAGRAPH:
+ * @E_CONTENT_EDITOR_BLOCK_FORMAT_PRE:
+ * @E_CONTENT_EDITOR_BLOCK_FORMAT_ADDRESS:
+ * @E_CONTENT_EDITOR_BLOCK_FORMAT_H1:
+ * @E_CONTENT_EDITOR_BLOCK_FORMAT_H2:
+ * @E_CONTENT_EDITOR_BLOCK_FORMAT_H3:
+ * @E_CONTENT_EDITOR_BLOCK_FORMAT_H4:
+ * @E_CONTENT_EDITOR_BLOCK_FORMAT_H5:
+ * @E_CONTENT_EDITOR_BLOCK_FORMAT_H6:
+ * @E_CONTENT_EDITOR_BLOCK_FORMAT_UNORDERED_LIST:
+ * @E_CONTENT_EDITOR_BLOCK_FORMAT_ORDERED_LIST:
+ * @E_CONTENT_EDITOR_BLOCK_FORMAT_ORDERED_LIST_ROMAN:
+ * @E_CONTENT_EDITOR_BLOCK_FORMAT_ORDERED_LIST_ALPHA:
+ *
+ * Since: 3.22
+ **/
+typedef enum {
+       E_CONTENT_EDITOR_BLOCK_FORMAT_NONE = 0,
+       E_CONTENT_EDITOR_BLOCK_FORMAT_PARAGRAPH,
+       E_CONTENT_EDITOR_BLOCK_FORMAT_PRE,
+       E_CONTENT_EDITOR_BLOCK_FORMAT_ADDRESS,
+       E_CONTENT_EDITOR_BLOCK_FORMAT_H1,
+       E_CONTENT_EDITOR_BLOCK_FORMAT_H2,
+       E_CONTENT_EDITOR_BLOCK_FORMAT_H3,
+       E_CONTENT_EDITOR_BLOCK_FORMAT_H4,
+       E_CONTENT_EDITOR_BLOCK_FORMAT_H5,
+       E_CONTENT_EDITOR_BLOCK_FORMAT_H6,
+       E_CONTENT_EDITOR_BLOCK_FORMAT_UNORDERED_LIST,
+       E_CONTENT_EDITOR_BLOCK_FORMAT_ORDERED_LIST,
+       E_CONTENT_EDITOR_BLOCK_FORMAT_ORDERED_LIST_ROMAN,
+       E_CONTENT_EDITOR_BLOCK_FORMAT_ORDERED_LIST_ALPHA
+} EContentEditorBlockFormat;
+
+/**
+ * EContentEditorFontSize:
+ * @E_CONTENT_EDITOR_FONT_SIZE_TINY:
+ * @E_CONTENT_EDITOR_FONT_SIZE_SMALL:
+ * @E_CONTENT_EDITOR_FONT_SIZE_NORMAL:
+ * @E_CONTENT_EDITOR_FONT_SIZE_BIG:
+ * @E_CONTENT_EDITOR_FONT_SIZE_BIGGER:
+ * @E_CONTENT_EDITOR_FONT_SIZE_LARGE:
+ * @E_CONTENT_EDITOR_FONT_SIZE_VERY_LARGE:
+ *
+ * Note: The values match the actual size in <font size="n">
+ *
+ * Since: 3.22
+ **/
+typedef enum {
+       E_CONTENT_EDITOR_FONT_SIZE_TINY         = 1,
+       E_CONTENT_EDITOR_FONT_SIZE_SMALL        = 2,
+       E_CONTENT_EDITOR_FONT_SIZE_NORMAL       = 3,
+       E_CONTENT_EDITOR_FONT_SIZE_BIG          = 4,
+       E_CONTENT_EDITOR_FONT_SIZE_BIGGER       = 5,
+       E_CONTENT_EDITOR_FONT_SIZE_LARGE        = 6,
+       E_CONTENT_EDITOR_FONT_SIZE_VERY_LARGE   = 7
+} EContentEditorFontSize;
+
+/**
+ * EContentEditorAlignment:
+ * @E_CONTENT_EDITOR_ALIGNMENT_LEFT:
+ * @E_CONTENT_EDITOR_ALIGNMENT_CENTER:
+ * @E_CONTENT_EDITOR_ALIGNMENT_RIGHT:
+ *
+ * Since: 3.22
+ **/
+typedef enum {
+       E_CONTENT_EDITOR_ALIGNMENT_LEFT = 0,
+       E_CONTENT_EDITOR_ALIGNMENT_CENTER,
+       E_CONTENT_EDITOR_ALIGNMENT_RIGHT
+} EContentEditorAlignment;
+
+/**
+ * EContentEditorGranularity:
+ * @E_CONTENT_EDITOR_GRANULARITY_CHARACTER:
+ * @E_CONTENT_EDITOR_GRANULARITY_WORD:
+ *
+ * Since: 3.22
+ **/
+typedef enum {
+       E_CONTENT_EDITOR_GRANULARITY_CHARACTER = 0,
+       E_CONTENT_EDITOR_GRANULARITY_WORD
+} EContentEditorGranularity;
+
+/**
+ * EContentEditorCommand:
+ * @E_CONTENT_EDITOR_COMMAND_BACKGROUND_COLOR:
+ *   Sets background color to given value.
+ * @E_CONTENT_EDITOR_COMMAND_BOLD:
+ *   Toggles bold formatting of current selection.
+ * @E_CONTENT_EDITOR_COMMAND_COPY:
+ *   Copies current selection to clipboard.
+ * @E_CONTENT_EDITOR_COMMAND_CREATE_LINK:
+ *   Converts current selection to a link that points to URL in value
+ * @E_CONTENT_EDITOR_COMMAND_CUT:
+ *   Cuts current selection to clipboard.
+ * @E_CONTENT_EDITOR_COMMAND_DEFAULT_PARAGRAPH_SEPARATOR:
+ *   (XXX Explain me!)
+ * @E_CONTENT_EDITOR_COMMAND_DELETE:
+ *   Deletes current selection.
+ * @E_CONTENT_EDITOR_COMMAND_FIND_STRING:
+ *   Highlights given string.
+ * @E_CONTENT_EDITOR_COMMAND_FONT_NAME:
+ *   Sets font name to given value.
+ * @E_CONTENT_EDITOR_COMMAND_FONT_SIZE:
+ *   Sets font point size to given value (no units, just number)
+ * @E_CONTENT_EDITOR_COMMAND_FONT_SIZE_DELTA:
+ *   Changes font size by given delta value (no units, just number)
+ * @E_CONTENT_EDITOR_COMMAND_FORE_COLOR:
+ *   Sets font color to given value
+ * @E_CONTENT_EDITOR_COMMAND_FORMAT_BLOCK:
+ *   Sets block type of current paragraph to given format. Allowed formats
+ *   are "BLOCKQUOTE", "H1", "H2", "H3", "H4", "H5", "H6", "P", "PRE" and
+ *   "ADDRESS".
+ * @E_CONTENT_EDITOR_COMMAND_FORWARD_DELETE:
+ *   (XXX Explain me!)
+ * @E_CONTENT_EDITOR_COMMAND_HILITE_COLOR:
+ *   Sets color in which results of "FindString" command should be
+ *   highlighted to given value.
+ * @E_CONTENT_EDITOR_COMMAND_INDENT:
+ *   Indents current paragraph by one level.
+ * @E_CONTENT_EDITOR_COMMAND_INSERT_HTML:
+ *   Inserts give HTML code into document.
+ * @E_CONTENT_EDITOR_COMMAND_INSERT_HORIZONTAL_RULE:
+ *   Inserts a horizontal rule (&lt;HR&gt;) on current line.
+ * @E_CONTENT_EDITOR_COMMAND_INSERT_IMAGE:
+ *   Inserts an image with given source file.
+ * @E_CONTENT_EDITOR_COMMAND_INSERT_LINE_BREAK:
+ *   Breaks line at current cursor position.
+ * @E_CONTENT_EDITOR_COMMAND_INSERT_NEW_LINE_IN_QUOTED_CONTENT:
+ *   Breaks citation at current cursor position.
+ * @E_CONTENT_EDITOR_COMMAND_INSERT_ORDERED_LIST:
+ *   Creates an ordered list environment at current cursor position.
+ * @E_CONTENT_EDITOR_COMMAND_INSERT_PARAGRAPH:
+ *   Inserts a new paragraph at current cursor position.
+ * @E_CONTENT_EDITOR_COMMAND_INSERT_TEXT:
+ *   Inserts given text at current cursor position.
+ * @E_CONTENT_EDITOR_COMMAND_INSERT_UNORDERED_LIST:
+ *   Creates an undordered list environment at current cursor position.
+ * @E_CONTENT_EDITOR_COMMAND_ITALIC:
+ *   Toggles italic formatting of current selection.
+ * @E_CONTENT_EDITOR_COMMAND_JUSTIFY_CENTER:
+ *   Aligns current paragraph to center.
+ * @E_CONTENT_EDITOR_COMMAND_JUSTIFY_FULL:
+ *   Justifies current paragraph to block.
+ * @E_CONTENT_EDITOR_COMMAND_JUSTIFY_NONE:
+ *   Removes any justification or alignment of current paragraph.
+ * @E_CONTENT_EDITOR_COMMAND_JUSTIFY_RIGHT:
+ *   Aligns current paragraph to right.
+ * @E_CONTENT_EDITOR_COMMAND_OUTDENT:
+ *   Outdents current paragraph by one level.
+ * @E_CONTENT_EDITOR_COMMAND_PASTE:
+ *   Pastes clipboard content at current cursor position.
+ * @E_CONTENT_EDITOR_COMMAND_PASTE_AND_MATCH_STYLE:
+ *   Pastes clipboard content and matches its style to style at current
+ *   cursor position.
+ * @E_CONTENT_EDITOR_COMMAND_PASTE_AS_PLAIN_TEXT:
+ *   Pastes clipboard content at current cursor position removing any HTML
+ *   formatting.
+ * @E_CONTENT_EDITOR_COMMAND_PRINT:
+ *   Print current document.
+ * @E_CONTENT_EDITOR_COMMAND_REDO:
+ *   Redoes last action.
+ * @E_CONTENT_EDITOR_COMMAND_REMOVE_FORMAT:
+ *   Removes any formatting of current selection.
+ * @E_CONTENT_EDITOR_COMMAND_SELECT_ALL:
+ *   Extends selects to the entire document.
+ * @E_CONTENT_EDITOR_COMMAND_STRIKETHROUGH:
+ *   Toggles strikethrough formatting.
+ * @E_CONTENT_EDITOR_COMMAND_STYLE_WITH_CSS:
+ *   Toggles whether style should be defined in CSS "style" attribute of
+ *   elements or whether to use deprecated &lt;FONT&gt; tags. Depends on
+ *   whether given value is "true" or "false".
+ * @E_CONTENT_EDITOR_COMMAND_SUBSCRIPT:
+ *   Toggles subscript of current selection.
+ * @E_CONTENT_EDITOR_COMMAND_SUPERSCRIPT:
+ *   Toggles superscript of current selection.
+ * @E_CONTENT_EDITOR_COMMAND_TRANSPOSE:
+ *   (XXX Explain me!)
+ * @E_CONTENT_EDITOR_COMMAND_UNDERLINE:
+ *   Toggles underline formatting of current selection.
+ * @E_CONTENT_EDITOR_COMMAND_UNDO:
+ *   Undoes last action.
+ * @E_CONTENT_EDITOR_COMMAND_UNLINK:
+ *   Removes active links (&lt;A&gt;) from current selection (if there's any).
+ * @E_CONTENT_EDITOR_COMMAND_UNSELECT:
+ *   Cancels current selection.
+ * @E_CONTENT_EDITOR_COMMAND_USE_CSS:
+ *   Whether to allow use of CSS or not depending on whether given value is
+ *   "true" or "false".
+ *
+ * Specifies the DOM command to execute in e_editor_widget_exec_command().
+ * Some commands require value to be passed in, which is always stated in the
+ * documentation.
+ *
+ * Since: 3.22
+ **/
+typedef enum {
+       E_CONTENT_EDITOR_COMMAND_BACKGROUND_COLOR,
+       E_CONTENT_EDITOR_COMMAND_BOLD,
+       E_CONTENT_EDITOR_COMMAND_COPY,
+       E_CONTENT_EDITOR_COMMAND_CREATE_LINK,
+       E_CONTENT_EDITOR_COMMAND_CUT,
+       E_CONTENT_EDITOR_COMMAND_DEFAULT_PARAGRAPH_SEPARATOR,
+       E_CONTENT_EDITOR_COMMAND_DELETE,
+       E_CONTENT_EDITOR_COMMAND_FIND_STRING,
+       E_CONTENT_EDITOR_COMMAND_FONT_NAME,
+       E_CONTENT_EDITOR_COMMAND_FONT_SIZE,
+       E_CONTENT_EDITOR_COMMAND_FONT_SIZE_DELTA,
+       E_CONTENT_EDITOR_COMMAND_FORE_COLOR,
+       E_CONTENT_EDITOR_COMMAND_FORMAT_BLOCK,
+       E_CONTENT_EDITOR_COMMAND_FORWARD_DELETE,
+       E_CONTENT_EDITOR_COMMAND_HILITE_COLOR,
+       E_CONTENT_EDITOR_COMMAND_INDENT,
+       E_CONTENT_EDITOR_COMMAND_INSERT_HTML,
+       E_CONTENT_EDITOR_COMMAND_INSERT_HORIZONTAL_RULE,
+       E_CONTENT_EDITOR_COMMAND_INSERT_IMAGE,
+       E_CONTENT_EDITOR_COMMAND_INSERT_LINE_BREAK,
+       E_CONTENT_EDITOR_COMMAND_INSERT_NEW_LINE_IN_QUOTED_CONTENT,
+       E_CONTENT_EDITOR_COMMAND_INSERT_ORDERED_LIST,
+       E_CONTENT_EDITOR_COMMAND_INSERT_PARAGRAPH,
+       E_CONTENT_EDITOR_COMMAND_INSERT_TEXT,
+       E_CONTENT_EDITOR_COMMAND_INSERT_UNORDERED_LIST,
+       E_CONTENT_EDITOR_COMMAND_ITALIC,
+       E_CONTENT_EDITOR_COMMAND_JUSTIFY_CENTER,
+       E_CONTENT_EDITOR_COMMAND_JUSTIFY_FULL,
+       E_CONTENT_EDITOR_COMMAND_JUSTIFY_LEFT,
+       E_CONTENT_EDITOR_COMMAND_JUSTIFY_NONE,
+       E_CONTENT_EDITOR_COMMAND_JUSTIFY_RIGHT,
+       E_CONTENT_EDITOR_COMMAND_OUTDENT,
+       E_CONTENT_EDITOR_COMMAND_PASTE,
+       E_CONTENT_EDITOR_COMMAND_PASTE_AND_MATCH_STYLE,
+       E_CONTENT_EDITOR_COMMAND_PASTE_AS_PLAIN_TEXT,
+       E_CONTENT_EDITOR_COMMAND_PRINT,
+       E_CONTENT_EDITOR_COMMAND_REDO,
+       E_CONTENT_EDITOR_COMMAND_REMOVE_FORMAT,
+       E_CONTENT_EDITOR_COMMAND_SELECT_ALL,
+       E_CONTENT_EDITOR_COMMAND_STRIKETHROUGH,
+       E_CONTENT_EDITOR_COMMAND_STYLE_WITH_CSS,
+       E_CONTENT_EDITOR_COMMAND_SUBSCRIPT,
+       E_CONTENT_EDITOR_COMMAND_SUPERSCRIPT,
+       E_CONTENT_EDITOR_COMMAND_TRANSPOSE,
+       E_CONTENT_EDITOR_COMMAND_UNDERLINE,
+       E_CONTENT_EDITOR_COMMAND_UNDO,
+       E_CONTENT_EDITOR_COMMAND_UNLINK,
+       E_CONTENT_EDITOR_COMMAND_UNSELECT,
+       E_CONTENT_EDITOR_COMMAND_USE_CSS
+} EContentEditorCommand;
+
+/**
+ * EContentEditorScope:
+ * @E_CONTENT_EDITOR_SCOPE_CELL:
+ * @E_CONTENT_EDITOR_SCOPE_ROW:
+ * @E_CONTENT_EDITOR_SCOPE_COLUMN:
+ * @E_CONTENT_EDITOR_SCOPE_TABLE:
+ *
+ * Since: 3.22
+ **/
+typedef enum {
+       E_CONTENT_EDITOR_SCOPE_CELL = 0,
+       E_CONTENT_EDITOR_SCOPE_ROW,
+       E_CONTENT_EDITOR_SCOPE_COLUMN,
+       E_CONTENT_EDITOR_SCOPE_TABLE
+} EContentEditorScope;
+
+/**
+ * EContentEditorUnit:
+ * @E_CONTENT_EDITOR_UNIT_AUTO:
+ * @E_CONTENT_EDITOR_UNIT_PIXEL:
+ * @E_CONTENT_EDITOR_UNIT_PERCENTAGE:
+ *
+ * Since: 3.22
+ **/
+typedef enum {
+       E_CONTENT_EDITOR_UNIT_AUTO = 0,
+       E_CONTENT_EDITOR_UNIT_PIXEL,
+       E_CONTENT_EDITOR_UNIT_PERCENTAGE
+} EContentEditorUnit;
+
+/**
+ * EContentEditorCommand:
+ * @E_CONTENT_EDITOR_FIND_NEXT: Search for the next occurrence of the text.
+ *    This is the default. It's mutually exclusive with @E_CONTENT_EDITOR_FIND_PREVIOUS.
+ * @E_CONTENT_EDITOR_FIND_PREVIOUS: Search for the previous occurrence of the text.
+ *    It's mutually exclusive with @E_CONTENT_EDITOR_FIND_NEXT.
+ * @E_CONTENT_EDITOR_FIND_MODE_BACKWARDS: The search mode is backwards. If not set,
+ *    then the mode is forward.
+ * @E_CONTENT_EDITOR_FIND_CASE_INSENSITIVE: Search case insensitively.
+ * @E_CONTENT_EDITOR_FIND_WRAP_AROUND: Wrap around when searching.
+ *
+ * Flags to use to modify behaviour of the search for the text.
+ *
+ * Since: 3.22
+ **/
+typedef enum {
+       E_CONTENT_EDITOR_FIND_NEXT              = (1 << 0),
+       E_CONTENT_EDITOR_FIND_PREVIOUS          = (1 << 1),
+       E_CONTENT_EDITOR_FIND_MODE_BACKWARDS    = (1 << 2),
+       E_CONTENT_EDITOR_FIND_CASE_INSENSITIVE  = (1 << 3),
+       E_CONTENT_EDITOR_FIND_WRAP_AROUND       = (1 << 4)
+} EContentEditorFindFlags;
+
 G_END_DECLS
 
 #endif /* E_UTIL_ENUMS_H */
diff --git a/e-util/e-util.h b/e-util/e-util.h
index f531219..885f475 100644
--- a/e-util/e-util.h
+++ b/e-util/e-util.h
@@ -86,7 +86,6 @@
 #include <e-util/e-conflict-search-selector.h>
 #include <e-util/e-contact-store.h>
 #include <e-util/e-content-editor.h>
-#include <e-util/e-content-editor-enums.h>
 #include <e-util/e-content-request.h>
 #include <e-util/e-data-capture.h>
 #include <e-util/e-dateedit.h>
diff --git a/modules/settings/e-settings-content-editor.c b/modules/settings/e-settings-content-editor.c
index 3ae9ad1..4dc0068 100644
--- a/modules/settings/e-settings-content-editor.c
+++ b/modules/settings/e-settings-content-editor.c
@@ -49,7 +49,7 @@ settings_content_editor_load_style (ESettingsContentEditor *extension)
 
        extensible = e_extension_get_extensible (E_EXTENSION (extension));
        cnt_editor = e_html_editor_get_content_editor (E_HTML_EDITOR (extensible));
-       e_content_editor_update_fonts (cnt_editor);
+       e_content_editor_update_styles (cnt_editor);
 }
 
 static void
diff --git a/modules/webkit-content-editor/e-webkit-content-editor.c 
b/modules/webkit-content-editor/e-webkit-content-editor.c
index 80cd3eb..1ef5223 100644
--- a/modules/webkit-content-editor/e-webkit-content-editor.c
+++ b/modules/webkit-content-editor/e-webkit-content-editor.c
@@ -184,6 +184,8 @@ webkit_content_editor_can_paste_cb (WebKitWebView *view,
 static gboolean
 webkit_content_editor_can_paste (EWebKitContentEditor *wk_editor)
 {
+       g_return_val_if_fail (E_IS_WEBKIT_CONTENT_EDITOR (wk_editor), FALSE);
+
        return wk_editor->priv->can_paste;
 }
 
@@ -205,6 +207,8 @@ webkit_content_editor_can_cut_cb (WebKitWebView *view,
 static gboolean
 webkit_content_editor_can_cut (EWebKitContentEditor *wk_editor)
 {
+       g_return_val_if_fail (E_IS_WEBKIT_CONTENT_EDITOR (wk_editor), FALSE);
+
        return wk_editor->priv->can_cut;
 }
 
@@ -231,26 +235,24 @@ webkit_content_editor_can_copy_cb (WebKitWebView *view,
 static gboolean
 webkit_content_editor_can_copy (EWebKitContentEditor *wk_editor)
 {
+       g_return_val_if_fail (E_IS_WEBKIT_CONTENT_EDITOR (wk_editor), FALSE);
+
        return wk_editor->priv->can_copy;
 }
 
 static gboolean
-webkit_content_editor_get_changed (EContentEditor *editor)
+webkit_content_editor_get_changed (EWebKitContentEditor *wk_editor)
 {
-       EWebKitContentEditor *wk_editor;
-
-       wk_editor = E_WEBKIT_CONTENT_EDITOR (editor);
+       g_return_val_if_fail (E_IS_WEBKIT_CONTENT_EDITOR (wk_editor), FALSE);
 
        return wk_editor->priv->changed;
 }
 
 static void
-webkit_content_editor_set_changed (EContentEditor *editor,
+webkit_content_editor_set_changed (EWebKitContentEditor *wk_editor,
                                    gboolean changed)
 {
-       EWebKitContentEditor *wk_editor;
-
-       wk_editor = E_WEBKIT_CONTENT_EDITOR (editor);
+       g_return_if_fail (E_IS_WEBKIT_CONTENT_EDITOR (wk_editor));
 
        if (wk_editor->priv->changed == changed)
                return;
@@ -272,7 +274,7 @@ web_extension_content_changed_cb (GDBusConnection *connection,
        if (g_strcmp0 (signal_name, "ContentChanged") != 0)
                return;
 
-       webkit_content_editor_set_changed (E_CONTENT_EDITOR (wk_editor), TRUE);
+       webkit_content_editor_set_changed (wk_editor, TRUE);
 }
 
 static void
@@ -626,7 +628,7 @@ webkit_content_editor_set_format_string (EWebKitContentEditor *wk_editor,
        if (!wk_editor->priv->html_mode)
                return;
 
-       webkit_content_editor_set_changed (E_CONTENT_EDITOR (wk_editor), TRUE);
+       webkit_content_editor_set_changed (wk_editor, TRUE);
 
        g_dbus_proxy_call (
                wk_editor->priv->web_extension,
@@ -665,7 +667,7 @@ webkit_content_editor_queue_post_reload_operation (EWebKitContentEditor *wk_edit
 }
 
 static void
-webkit_content_editor_update_fonts (EContentEditor *editor)
+webkit_content_editor_update_styles (EContentEditor *editor)
 {
        EWebKitContentEditor *wk_editor;
        gboolean mark_citations, use_custom_font;
@@ -1108,12 +1110,8 @@ webkit_content_editor_update_fonts (EContentEditor *editor)
 }
 
 static gboolean
-webkit_content_editor_get_html_mode (EContentEditor *editor)
+webkit_content_editor_get_html_mode (EWebKitContentEditor *wk_editor)
 {
-       EWebKitContentEditor *wk_editor;
-
-       wk_editor = E_WEBKIT_CONTENT_EDITOR (editor);
-
        return wk_editor->priv->html_mode;
 }
 
@@ -1143,14 +1141,13 @@ show_lose_formatting_dialog (EWebKitContentEditor *wk_editor)
 }
 
 static void
-webkit_content_editor_set_html_mode (EContentEditor *editor,
+webkit_content_editor_set_html_mode (EWebKitContentEditor *wk_editor,
                                      gboolean html_mode)
 {
-       EWebKitContentEditor *wk_editor;
        gboolean convert = FALSE;
        GVariant *result;
 
-       wk_editor = E_WEBKIT_CONTENT_EDITOR (editor);
+       g_return_if_fail (E_IS_WEBKIT_CONTENT_EDITOR (wk_editor));
 
        if (!wk_editor->priv->web_extension)
                return;
@@ -1191,7 +1188,7 @@ webkit_content_editor_set_html_mode (EContentEditor *editor,
                NULL);
 
        /* Update fonts - in plain text we only want monospaced */
-       webkit_content_editor_update_fonts (editor);
+       webkit_content_editor_update_styles (E_CONTENT_EDITOR (wk_editor));
 
        g_object_notify (G_OBJECT (wk_editor), "html-mode");
 }
@@ -1294,7 +1291,7 @@ webkit_content_editor_insert_content (EContentEditor *editor,
                if (!(wk_editor->priv->html_mode)) {
                        if (strstr (content, "<!-- text/html -->")) {
                                if (!show_lose_formatting_dialog (wk_editor)) {
-                                       webkit_content_editor_set_html_mode (editor, TRUE);
+                                       webkit_content_editor_set_html_mode (wk_editor, TRUE);
                                        webkit_web_view_load_html (
                                                WEBKIT_WEB_VIEW (wk_editor), content, "file://");
                                        return;
@@ -1499,11 +1496,9 @@ webkit_content_editor_get_content (EContentEditor *editor,
 }
 
 static gboolean
-webkit_content_editor_can_undo (EContentEditor *editor)
+webkit_content_editor_can_undo (EWebKitContentEditor *wk_editor)
 {
-       EWebKitContentEditor *wk_editor;
-
-       wk_editor = E_WEBKIT_CONTENT_EDITOR (editor);
+       g_return_val_if_fail (E_IS_WEBKIT_CONTENT_EDITOR (wk_editor), FALSE);
 
        return wk_editor->priv->can_undo;
 }
@@ -1519,11 +1514,9 @@ webkit_content_editor_undo (EContentEditor *editor)
 }
 
 static gboolean
-webkit_content_editor_can_redo (EContentEditor *editor)
+webkit_content_editor_can_redo (EWebKitContentEditor *wk_editor)
 {
-       EWebKitContentEditor *wk_editor;
-
-       wk_editor = E_WEBKIT_CONTENT_EDITOR (editor);
+       g_return_val_if_fail (E_IS_WEBKIT_CONTENT_EDITOR (wk_editor), FALSE);
 
        return wk_editor->priv->can_redo;
 }
@@ -1533,6 +1526,8 @@ webkit_content_editor_redo (EContentEditor *editor)
 {
        EWebKitContentEditor *wk_editor;
 
+       g_return_if_fail (E_IS_WEBKIT_CONTENT_EDITOR (editor));
+
        wk_editor = E_WEBKIT_CONTENT_EDITOR (editor);
 
        webkit_content_editor_call_simple_extension_function (wk_editor, "DOMRedo");
@@ -1708,11 +1703,9 @@ webkit_content_editor_selection_wrap (EContentEditor *editor)
 }
 
 static gboolean
-webkit_content_editor_selection_is_indented (EContentEditor *editor)
+webkit_content_editor_selection_is_indented (EWebKitContentEditor *wk_editor)
 {
-       EWebKitContentEditor *wk_editor;
-
-       wk_editor = E_WEBKIT_CONTENT_EDITOR (editor);
+       g_return_val_if_fail (E_IS_WEBKIT_CONTENT_EDITOR (wk_editor), FALSE);
 
        return wk_editor->priv->is_indented;
 }
@@ -1874,22 +1867,18 @@ webkit_content_editor_get_spell_check (EContentEditor *editor)
 }
 
 static gboolean
-webkit_content_editor_is_editable (EContentEditor *editor)
+webkit_content_editor_is_editable (EWebKitContentEditor *wk_editor)
 {
-       EWebKitContentEditor *wk_editor;
-
-       wk_editor = E_WEBKIT_CONTENT_EDITOR (editor);
+       g_return_val_if_fail (E_IS_WEBKIT_CONTENT_EDITOR (wk_editor), FALSE);
 
        return webkit_web_view_is_editable (WEBKIT_WEB_VIEW (wk_editor));
 }
 
 static void
-webkit_content_editor_set_editable (EContentEditor *editor,
+webkit_content_editor_set_editable (EWebKitContentEditor *wk_editor,
                                     gboolean editable)
 {
-       EWebKitContentEditor *wk_editor;
-
-       wk_editor = E_WEBKIT_CONTENT_EDITOR (editor);
+       g_return_if_fail (E_IS_WEBKIT_CONTENT_EDITOR (wk_editor));
 
        return webkit_web_view_set_editable (WEBKIT_WEB_VIEW (wk_editor), editable);
 }
@@ -2220,8 +2209,8 @@ webkit_content_editor_find (EContentEditor *editor,
 }
 
 static void
-webkit_content_editor_selection_replace (EContentEditor *editor,
-                                         const gchar *replacement)
+webkit_content_editor_replace (EContentEditor *editor,
+                              const gchar *replacement)
 {
        EWebKitContentEditor *wk_editor;
 
@@ -3208,57 +3197,48 @@ webkit_content_editor_link_get_values (EContentEditor *editor,
 }
 
 static void
-webkit_content_editor_set_alignment (EContentEditor *editor,
+webkit_content_editor_set_alignment (EWebKitContentEditor *wk_editor,
                                      EContentEditorAlignment value)
 {
-       EWebKitContentEditor *wk_editor;
-
-       wk_editor = E_WEBKIT_CONTENT_EDITOR (editor);
+       g_return_if_fail (E_IS_WEBKIT_CONTENT_EDITOR (wk_editor));
 
        webkit_content_editor_set_format_int (
                wk_editor, "DOMSelectionSetAlignment", (gint32) value);
 }
 
 static EContentEditorAlignment
-webkit_content_editor_get_alignment (EContentEditor *editor)
+webkit_content_editor_get_alignment (EWebKitContentEditor *wk_editor)
 {
-       EWebKitContentEditor *wk_editor;
-
-       wk_editor = E_WEBKIT_CONTENT_EDITOR (editor);
+       g_return_val_if_fail (E_IS_WEBKIT_CONTENT_EDITOR (wk_editor), E_CONTENT_EDITOR_ALIGNMENT_LEFT);
 
        return wk_editor->priv->alignment;
 }
 
 static void
-webkit_content_editor_set_block_format (EContentEditor *editor,
+webkit_content_editor_set_block_format (EWebKitContentEditor *wk_editor,
                                         EContentEditorBlockFormat value)
 {
-       EWebKitContentEditor *wk_editor;
-
-       wk_editor = E_WEBKIT_CONTENT_EDITOR (editor);
+       g_return_if_fail (E_IS_WEBKIT_CONTENT_EDITOR (wk_editor));
 
        webkit_content_editor_set_format_int (
                wk_editor, "DOMSelectionSetBlockFormat", (gint32) value);
 }
 
 static EContentEditorBlockFormat
-webkit_content_editor_get_block_format (EContentEditor *editor)
+webkit_content_editor_get_block_format (EWebKitContentEditor *wk_editor)
 {
-       EWebKitContentEditor *wk_editor;
-
-       wk_editor = E_WEBKIT_CONTENT_EDITOR (editor);
+       g_return_val_if_fail (E_IS_WEBKIT_CONTENT_EDITOR (wk_editor), E_CONTENT_EDITOR_BLOCK_FORMAT_NONE);
 
        return wk_editor->priv->block_format;
 }
 
 static void
-webkit_content_editor_set_background_color (EContentEditor *editor,
+webkit_content_editor_set_background_color (EWebKitContentEditor *wk_editor,
                                             const GdkRGBA *value)
 {
-       EWebKitContentEditor *wk_editor;
        gchar *color;
 
-       wk_editor = E_WEBKIT_CONTENT_EDITOR (editor);
+       g_return_if_fail (E_IS_WEBKIT_CONTENT_EDITOR (wk_editor));
 
        if (gdk_rgba_equal (value, wk_editor->priv->background_color))
                return;
@@ -3280,11 +3260,9 @@ webkit_content_editor_set_background_color (EContentEditor *editor,
 }
 
 static const GdkRGBA *
-webkit_content_editor_get_background_color (EContentEditor *editor)
+webkit_content_editor_get_background_color (EWebKitContentEditor *wk_editor)
 {
-       EWebKitContentEditor *wk_editor;
-
-       wk_editor = E_WEBKIT_CONTENT_EDITOR (editor);
+       g_return_val_if_fail (E_IS_WEBKIT_CONTENT_EDITOR (wk_editor), NULL);
 
        if (!wk_editor->priv->web_extension)
                return NULL;
@@ -3296,12 +3274,10 @@ webkit_content_editor_get_background_color (EContentEditor *editor)
 }
 
 static void
-webkit_content_editor_set_font_name (EContentEditor *editor,
+webkit_content_editor_set_font_name (EWebKitContentEditor *wk_editor,
                                      const gchar *value)
 {
-       EWebKitContentEditor *wk_editor;
-
-       wk_editor = E_WEBKIT_CONTENT_EDITOR (editor);
+       g_return_if_fail (E_IS_WEBKIT_CONTENT_EDITOR (wk_editor));
 
        wk_editor->priv->font_name = g_strdup (value);
 
@@ -3310,23 +3286,20 @@ webkit_content_editor_set_font_name (EContentEditor *editor,
 }
 
 static const gchar *
-webkit_content_editor_get_font_name (EContentEditor *editor)
+webkit_content_editor_get_font_name (EWebKitContentEditor *wk_editor)
 {
-       EWebKitContentEditor *wk_editor;
-
-       wk_editor = E_WEBKIT_CONTENT_EDITOR (editor);
+       g_return_val_if_fail (E_IS_WEBKIT_CONTENT_EDITOR (wk_editor), NULL);
 
        return wk_editor->priv->font_name;
 }
 
 static void
-webkit_content_editor_set_font_color (EContentEditor *editor,
+webkit_content_editor_set_font_color (EWebKitContentEditor *wk_editor,
                                       const GdkRGBA *value)
 {
-       EWebKitContentEditor *wk_editor;
        gchar *color;
 
-       wk_editor = E_WEBKIT_CONTENT_EDITOR (editor);
+       g_return_if_fail (E_IS_WEBKIT_CONTENT_EDITOR (wk_editor));
 
        if (gdk_rgba_equal (value, wk_editor->priv->font_color))
                return;
@@ -3348,11 +3321,9 @@ webkit_content_editor_set_font_color (EContentEditor *editor,
 }
 
 static const GdkRGBA *
-webkit_content_editor_get_font_color (EContentEditor *editor)
+webkit_content_editor_get_font_color (EWebKitContentEditor *wk_editor)
 {
-       EWebKitContentEditor *wk_editor;
-
-       wk_editor = E_WEBKIT_CONTENT_EDITOR (editor);
+       g_return_val_if_fail (E_IS_WEBKIT_CONTENT_EDITOR (wk_editor), NULL);
 
        if (!wk_editor->priv->web_extension)
                return NULL;
@@ -3364,12 +3335,10 @@ webkit_content_editor_get_font_color (EContentEditor *editor)
 }
 
 static void
-webkit_content_editor_set_font_size (EContentEditor *editor,
-                                     guint value)
+webkit_content_editor_set_font_size (EWebKitContentEditor *wk_editor,
+                                     gint value)
 {
-       EWebKitContentEditor *wk_editor;
-
-       wk_editor = E_WEBKIT_CONTENT_EDITOR (editor);
+       g_return_if_fail (E_IS_WEBKIT_CONTENT_EDITOR (wk_editor));
 
        if (wk_editor->priv->font_size == value)
                return;
@@ -3377,26 +3346,22 @@ webkit_content_editor_set_font_size (EContentEditor *editor,
        wk_editor->priv->font_size = value;
 
        webkit_content_editor_set_format_int (
-               wk_editor, "DOMSelectionSetFontSize", (gint32) value);
+               wk_editor, "DOMSelectionSetFontSize", value);
 }
 
-static guint
-webkit_content_editor_get_font_size (EContentEditor *editor)
+static gint
+webkit_content_editor_get_font_size (EWebKitContentEditor *wk_editor)
 {
-       EWebKitContentEditor *wk_editor;
-
-       wk_editor = E_WEBKIT_CONTENT_EDITOR (editor);
+       g_return_val_if_fail (E_IS_WEBKIT_CONTENT_EDITOR (wk_editor), -1);
 
        return wk_editor->priv->font_size;
 }
 
 static void
-webkit_content_editor_set_bold (EContentEditor *editor,
+webkit_content_editor_set_bold (EWebKitContentEditor *wk_editor,
                                 gboolean bold)
 {
-       EWebKitContentEditor *wk_editor;
-
-       wk_editor = E_WEBKIT_CONTENT_EDITOR (editor);
+       g_return_if_fail (E_IS_WEBKIT_CONTENT_EDITOR (wk_editor));
 
        if (wk_editor->priv->is_bold == bold)
                return;
@@ -3408,22 +3373,18 @@ webkit_content_editor_set_bold (EContentEditor *editor,
 }
 
 static gboolean
-webkit_content_editor_is_bold (EContentEditor *editor)
+webkit_content_editor_is_bold (EWebKitContentEditor *wk_editor)
 {
-       EWebKitContentEditor *wk_editor;
-
-       wk_editor = E_WEBKIT_CONTENT_EDITOR (editor);
+       g_return_val_if_fail (E_IS_WEBKIT_CONTENT_EDITOR (wk_editor), FALSE);
 
        return wk_editor->priv->is_bold;
 }
 
 static void
-webkit_content_editor_set_italic (EContentEditor *editor,
+webkit_content_editor_set_italic (EWebKitContentEditor *wk_editor,
                                   gboolean italic)
 {
-       EWebKitContentEditor *wk_editor;
-
-       wk_editor = E_WEBKIT_CONTENT_EDITOR (editor);
+       g_return_if_fail (E_IS_WEBKIT_CONTENT_EDITOR (wk_editor));
 
        if (wk_editor->priv->is_italic == italic)
                return;
@@ -3435,22 +3396,18 @@ webkit_content_editor_set_italic (EContentEditor *editor,
 }
 
 static gboolean
-webkit_content_editor_is_italic (EContentEditor *editor)
+webkit_content_editor_is_italic (EWebKitContentEditor *wk_editor)
 {
-       EWebKitContentEditor *wk_editor;
-
-       wk_editor = E_WEBKIT_CONTENT_EDITOR (editor);
+       g_return_val_if_fail (E_IS_WEBKIT_CONTENT_EDITOR (wk_editor), FALSE);
 
        return wk_editor->priv->is_italic;
 }
 
 static void
-webkit_content_editor_set_monospaced (EContentEditor *editor,
+webkit_content_editor_set_monospaced (EWebKitContentEditor *wk_editor,
                                       gboolean monospaced)
 {
-       EWebKitContentEditor *wk_editor;
-
-       wk_editor = E_WEBKIT_CONTENT_EDITOR (editor);
+       g_return_if_fail (E_IS_WEBKIT_CONTENT_EDITOR (wk_editor));
 
        if (wk_editor->priv->is_monospaced == monospaced)
                return;
@@ -3462,22 +3419,18 @@ webkit_content_editor_set_monospaced (EContentEditor *editor,
 }
 
 static gboolean
-webkit_content_editor_is_monospaced (EContentEditor *editor)
+webkit_content_editor_is_monospaced (EWebKitContentEditor *wk_editor)
 {
-       EWebKitContentEditor *wk_editor;
-
-       wk_editor = E_WEBKIT_CONTENT_EDITOR (editor);
+       g_return_val_if_fail (E_IS_WEBKIT_CONTENT_EDITOR (wk_editor), FALSE);
 
        return wk_editor->priv->is_monospaced;
 }
 
 static void
-webkit_content_editor_set_strikethrough (EContentEditor *editor,
+webkit_content_editor_set_strikethrough (EWebKitContentEditor *wk_editor,
                                          gboolean strikethrough)
 {
-       EWebKitContentEditor *wk_editor;
-
-       wk_editor = E_WEBKIT_CONTENT_EDITOR (editor);
+       g_return_if_fail (E_IS_WEBKIT_CONTENT_EDITOR (wk_editor));
 
        if (wk_editor->priv->is_strikethrough == strikethrough)
                return;
@@ -3489,22 +3442,18 @@ webkit_content_editor_set_strikethrough (EContentEditor *editor,
 }
 
 static gboolean
-webkit_content_editor_is_strikethrough (EContentEditor *editor)
+webkit_content_editor_is_strikethrough (EWebKitContentEditor *wk_editor)
 {
-       EWebKitContentEditor *wk_editor;
-
-       wk_editor = E_WEBKIT_CONTENT_EDITOR (editor);
+       g_return_val_if_fail (E_IS_WEBKIT_CONTENT_EDITOR (wk_editor), FALSE);
 
        return wk_editor->priv->is_strikethrough;
 }
 
 static void
-webkit_content_editor_set_subscript (EContentEditor *editor,
+webkit_content_editor_set_subscript (EWebKitContentEditor *wk_editor,
                                      gboolean subscript)
 {
-       EWebKitContentEditor *wk_editor;
-
-       wk_editor = E_WEBKIT_CONTENT_EDITOR (editor);
+       g_return_if_fail (E_IS_WEBKIT_CONTENT_EDITOR (wk_editor));
 
        if (wk_editor->priv->is_subscript == subscript)
                return;
@@ -3516,22 +3465,18 @@ webkit_content_editor_set_subscript (EContentEditor *editor,
 }
 
 static gboolean
-webkit_content_editor_is_subscript (EContentEditor *editor)
+webkit_content_editor_is_subscript (EWebKitContentEditor *wk_editor)
 {
-       EWebKitContentEditor *wk_editor;
-
-       wk_editor = E_WEBKIT_CONTENT_EDITOR (editor);
+       g_return_val_if_fail (E_IS_WEBKIT_CONTENT_EDITOR (wk_editor), FALSE);
 
        return wk_editor->priv->is_subscript;
 }
 
 static void
-webkit_content_editor_set_superscript (EContentEditor *editor,
+webkit_content_editor_set_superscript (EWebKitContentEditor *wk_editor,
                                        gboolean superscript)
 {
-       EWebKitContentEditor *wk_editor;
-
-       wk_editor = E_WEBKIT_CONTENT_EDITOR (editor);
+       g_return_if_fail (E_IS_WEBKIT_CONTENT_EDITOR (wk_editor));
 
        if (wk_editor->priv->is_superscript == superscript)
                return;
@@ -3543,22 +3488,18 @@ webkit_content_editor_set_superscript (EContentEditor *editor,
 }
 
 static gboolean
-webkit_content_editor_is_superscript (EContentEditor *editor)
+webkit_content_editor_is_superscript (EWebKitContentEditor *wk_editor)
 {
-       EWebKitContentEditor *wk_editor;
-
-       wk_editor = E_WEBKIT_CONTENT_EDITOR (editor);
+       g_return_val_if_fail (E_IS_WEBKIT_CONTENT_EDITOR (wk_editor), FALSE);
 
        return wk_editor->priv->is_superscript;
 }
 
 static void
-webkit_content_editor_set_underline (EContentEditor *editor,
+webkit_content_editor_set_underline (EWebKitContentEditor *wk_editor,
                                      gboolean underline)
 {
-       EWebKitContentEditor *wk_editor;
-
-       wk_editor = E_WEBKIT_CONTENT_EDITOR (editor);
+       g_return_if_fail (E_IS_WEBKIT_CONTENT_EDITOR (wk_editor));
 
        if (wk_editor->priv->is_underline == underline)
                return;
@@ -3570,11 +3511,9 @@ webkit_content_editor_set_underline (EContentEditor *editor,
 }
 
 static gboolean
-webkit_content_editor_is_underline (EContentEditor *editor)
+webkit_content_editor_is_underline (EWebKitContentEditor *wk_editor)
 {
-       EWebKitContentEditor *wk_editor;
-
-       wk_editor = E_WEBKIT_CONTENT_EDITOR (editor);
+       g_return_val_if_fail (E_IS_WEBKIT_CONTENT_EDITOR (wk_editor), FALSE);
 
        return wk_editor->priv->is_underline;
 }
@@ -5171,97 +5110,97 @@ webkit_content_editor_set_property (GObject *object,
        switch (property_id) {
                case PROP_CHANGED:
                        webkit_content_editor_set_changed (
-                               E_CONTENT_EDITOR (object),
+                               E_WEBKIT_CONTENT_EDITOR (object),
                                g_value_get_boolean (value));
                        return;
 
                case PROP_EDITABLE:
                        webkit_content_editor_set_editable (
-                               E_CONTENT_EDITOR (object),
+                               E_WEBKIT_CONTENT_EDITOR (object),
                                g_value_get_boolean (value));
                        return;
 
                case PROP_HTML_MODE:
                        webkit_content_editor_set_html_mode (
-                               E_CONTENT_EDITOR (object),
+                               E_WEBKIT_CONTENT_EDITOR (object),
                                g_value_get_boolean (value));
                        return;
 
                case PROP_ALIGNMENT:
                        webkit_content_editor_set_alignment (
-                               E_CONTENT_EDITOR (object),
-                               g_value_get_int (value));
+                               E_WEBKIT_CONTENT_EDITOR (object),
+                               g_value_get_enum (value));
                        return;
 
                case PROP_BACKGROUND_COLOR:
                        webkit_content_editor_set_background_color (
-                               E_CONTENT_EDITOR (object),
+                               E_WEBKIT_CONTENT_EDITOR (object),
                                g_value_get_boxed (value));
                        return;
 
                case PROP_BOLD:
                        webkit_content_editor_set_bold (
-                               E_CONTENT_EDITOR (object),
+                               E_WEBKIT_CONTENT_EDITOR (object),
                                g_value_get_boolean (value));
                        return;
 
                case PROP_FONT_COLOR:
                        webkit_content_editor_set_font_color (
-                               E_CONTENT_EDITOR (object),
+                               E_WEBKIT_CONTENT_EDITOR (object),
                                g_value_get_boxed (value));
                        return;
 
                case PROP_BLOCK_FORMAT:
                        webkit_content_editor_set_block_format (
-                               E_CONTENT_EDITOR (object),
-                               g_value_get_int (value));
+                               E_WEBKIT_CONTENT_EDITOR (object),
+                               g_value_get_enum (value));
                        return;
 
                case PROP_FONT_NAME:
                        webkit_content_editor_set_font_name (
-                               E_CONTENT_EDITOR (object),
+                               E_WEBKIT_CONTENT_EDITOR (object),
                                g_value_get_string (value));
                        return;
 
                case PROP_FONT_SIZE:
                        webkit_content_editor_set_font_size (
-                               E_CONTENT_EDITOR (object),
+                               E_WEBKIT_CONTENT_EDITOR (object),
                                g_value_get_int (value));
                        return;
 
                case PROP_ITALIC:
                        webkit_content_editor_set_italic (
-                               E_CONTENT_EDITOR (object),
+                               E_WEBKIT_CONTENT_EDITOR (object),
                                g_value_get_boolean (value));
                        return;
 
                case PROP_MONOSPACED:
                        webkit_content_editor_set_monospaced (
-                               E_CONTENT_EDITOR (object),
+                               E_WEBKIT_CONTENT_EDITOR (object),
                                g_value_get_boolean (value));
                        return;
 
                case PROP_STRIKETHROUGH:
                        webkit_content_editor_set_strikethrough (
-                               E_CONTENT_EDITOR (object),
+                               E_WEBKIT_CONTENT_EDITOR (object),
                                g_value_get_boolean (value));
                        return;
 
                case PROP_SUBSCRIPT:
                        webkit_content_editor_set_subscript (
-                               E_CONTENT_EDITOR (object),
+                               E_WEBKIT_CONTENT_EDITOR (object),
                                g_value_get_boolean (value));
                        return;
 
                case PROP_SUPERSCRIPT:
                        webkit_content_editor_set_superscript (
-                               E_CONTENT_EDITOR (object),
+                               E_WEBKIT_CONTENT_EDITOR (object),
                                g_value_get_boolean (value));
                        return;
 
                case PROP_UNDERLINE:
                        webkit_content_editor_set_underline (
-                               E_CONTENT_EDITOR (object),
+                               E_WEBKIT_CONTENT_EDITOR (object),
                                g_value_get_boolean (value));
                        return;
        }
@@ -5297,129 +5236,129 @@ webkit_content_editor_get_property (GObject *object,
                case PROP_CAN_REDO:
                        g_value_set_boolean (
                                value, webkit_content_editor_can_redo (
-                               E_CONTENT_EDITOR (object)));
+                               E_WEBKIT_CONTENT_EDITOR (object)));
                        return;
 
                case PROP_CAN_UNDO:
                        g_value_set_boolean (
                                value, webkit_content_editor_can_undo (
-                               E_CONTENT_EDITOR (object)));
+                               E_WEBKIT_CONTENT_EDITOR (object)));
                        return;
 
                case PROP_CHANGED:
                        g_value_set_boolean (
                                value, webkit_content_editor_get_changed (
-                               E_CONTENT_EDITOR (object)));
+                               E_WEBKIT_CONTENT_EDITOR (object)));
                        return;
 
                case PROP_HTML_MODE:
                        g_value_set_boolean (
                                value, webkit_content_editor_get_html_mode (
-                               E_CONTENT_EDITOR (object)));
+                               E_WEBKIT_CONTENT_EDITOR (object)));
                        return;
 
                case PROP_EDITABLE:
                        g_value_set_boolean (
                                value, webkit_content_editor_is_editable (
-                               E_CONTENT_EDITOR (object)));
+                               E_WEBKIT_CONTENT_EDITOR (object)));
                        return;
 
                case PROP_ALIGNMENT:
-                       g_value_set_int (
+                       g_value_set_enum (
                                value,
                                webkit_content_editor_get_alignment (
-                                       E_CONTENT_EDITOR (object)));
+                                       E_WEBKIT_CONTENT_EDITOR (object)));
                        return;
 
                case PROP_BACKGROUND_COLOR:
                        g_value_set_boxed (
                                value,
                                webkit_content_editor_get_background_color (
-                                       E_CONTENT_EDITOR (object)));
+                                       E_WEBKIT_CONTENT_EDITOR (object)));
                        return;
 
                case PROP_BLOCK_FORMAT:
-                       g_value_set_int (
+                       g_value_set_enum (
                                value,
                                webkit_content_editor_get_block_format (
-                                       E_CONTENT_EDITOR (object)));
+                                       E_WEBKIT_CONTENT_EDITOR (object)));
                        return;
 
                case PROP_BOLD:
                        g_value_set_boolean (
                                value,
                                webkit_content_editor_is_bold (
-                                       E_CONTENT_EDITOR (object)));
+                                       E_WEBKIT_CONTENT_EDITOR (object)));
                        return;
 
                case PROP_FONT_COLOR:
                        g_value_set_boxed (
                                value,
                                webkit_content_editor_get_font_color (
-                                       E_CONTENT_EDITOR (object)));
+                                       E_WEBKIT_CONTENT_EDITOR (object)));
                        return;
 
                case PROP_FONT_NAME:
                        g_value_set_string (
                                value,
                                webkit_content_editor_get_font_name (
-                                       E_CONTENT_EDITOR (object)));
+                                       E_WEBKIT_CONTENT_EDITOR (object)));
                        return;
 
                case PROP_FONT_SIZE:
                        g_value_set_int (
                                value,
                                webkit_content_editor_get_font_size (
-                                       E_CONTENT_EDITOR (object)));
+                                       E_WEBKIT_CONTENT_EDITOR (object)));
                        return;
 
                case PROP_INDENTED:
                        g_value_set_boolean (
                                value,
                                webkit_content_editor_selection_is_indented (
-                                       E_CONTENT_EDITOR (object)));
+                                       E_WEBKIT_CONTENT_EDITOR (object)));
                        return;
 
                case PROP_ITALIC:
                        g_value_set_boolean (
                                value,
                                webkit_content_editor_is_italic (
-                                       E_CONTENT_EDITOR (object)));
+                                       E_WEBKIT_CONTENT_EDITOR (object)));
                        return;
 
                case PROP_MONOSPACED:
                        g_value_set_boolean (
                                value,
                                webkit_content_editor_is_monospaced (
-                                       E_CONTENT_EDITOR (object)));
+                                       E_WEBKIT_CONTENT_EDITOR (object)));
                        return;
 
                case PROP_STRIKETHROUGH:
                        g_value_set_boolean (
                                value,
                                webkit_content_editor_is_strikethrough (
-                                       E_CONTENT_EDITOR (object)));
+                                       E_WEBKIT_CONTENT_EDITOR (object)));
                        return;
 
                case PROP_SUBSCRIPT:
                        g_value_set_boolean (
                                value,
                                webkit_content_editor_is_subscript (
-                                       E_CONTENT_EDITOR (object)));
+                                       E_WEBKIT_CONTENT_EDITOR (object)));
                        return;
 
                case PROP_SUPERSCRIPT:
                        g_value_set_boolean (
                                value,
                                webkit_content_editor_is_superscript (
-                                       E_CONTENT_EDITOR (object)));
+                                       E_WEBKIT_CONTENT_EDITOR (object)));
                        return;
 
                case PROP_UNDERLINE:
                        g_value_set_boolean (
                                value,
                                webkit_content_editor_is_underline (
-                                       E_CONTENT_EDITOR (object)));
+                                       E_WEBKIT_CONTENT_EDITOR (object)));
                        return;
 
                case PROP_SPELL_CHECKER:
@@ -5464,7 +5403,7 @@ webkit_content_editor_settings_changed_cb (GSettings *settings,
                else
                        g_hash_table_remove (wk_editor->priv->old_settings, key);
 
-               webkit_content_editor_update_fonts (E_CONTENT_EDITOR (wk_editor));
+               webkit_content_editor_update_styles (E_CONTENT_EDITOR (wk_editor));
        } else if (new_value) {
                g_variant_unref (new_value);
        }
@@ -5981,6 +5920,7 @@ e_webkit_content_editor_init (EWebKitContentEditor *wk_editor)
 static void
 e_webkit_content_editor_content_editor_init (EContentEditorInterface *iface)
 {
+       iface->update_styles = webkit_content_editor_update_styles;
        iface->insert_content = webkit_content_editor_insert_content;
        iface->get_content = webkit_content_editor_get_content;
        iface->insert_image = webkit_content_editor_insert_image;
@@ -5989,35 +5929,28 @@ e_webkit_content_editor_content_editor_init (EContentEditorInterface *iface)
        iface->set_current_content_flags = webkit_content_editor_set_current_content_flags;
        iface->get_current_content_flags = webkit_content_editor_get_current_content_flags;
        iface->move_caret_on_coordinates = webkit_content_editor_move_caret_on_coordinates;
-       iface->set_changed = webkit_content_editor_set_changed;
-       iface->get_changed = webkit_content_editor_get_changed;
        iface->cut = webkit_content_editor_cut;
        iface->copy = webkit_content_editor_copy;
        iface->paste = webkit_content_editor_paste;
        iface->paste_prefer_text_html = webkit_content_editor_paste_prefer_text_html;
        iface->reconnect_paste_clipboard_signals = webkit_content_editor_reconnect_paste_clipboard_signals;
-       iface->can_undo = webkit_content_editor_can_undo;
        iface->undo = webkit_content_editor_undo;
-       iface->can_redo = webkit_content_editor_can_redo;
        iface->redo = webkit_content_editor_redo;
        iface->clear_undo_redo_history = webkit_content_editor_clear_undo_redo_history;
-       iface->set_html_mode = webkit_content_editor_set_html_mode;
-       iface->get_html_mode = webkit_content_editor_get_html_mode;
        iface->get_spell_checker = webkit_content_editor_get_spell_checker;
        iface->set_spell_checking_languages = webkit_content_editor_set_spell_checking_languages;
        iface->set_spell_check = webkit_content_editor_set_spell_check;
        iface->get_spell_check = webkit_content_editor_get_spell_check;
-//     iface->selection_get_text = webkit_content_editor_selection_get_text;
+//     iface->get_selected_text = webkit_content_editor_get_selected_text; /* FIXME WK2 */
        iface->get_caret_word = webkit_content_editor_get_caret_word;
        iface->replace_caret_word = webkit_content_editor_replace_caret_word;
        iface->select_all = webkit_content_editor_select_all;
-       iface->selection_is_indented = webkit_content_editor_selection_is_indented;
        iface->selection_indent = webkit_content_editor_selection_indent;
        iface->selection_unindent = webkit_content_editor_selection_unindent;
-//     iface->create_link = webkit_content_editor_create_link;
+//     iface->create_link = webkit_content_editor_create_link; /* FIXME WK2 */
        iface->selection_unlink = webkit_content_editor_selection_unlink;
        iface->find = webkit_content_editor_find;
-       iface->selection_replace = webkit_content_editor_selection_replace;
+       iface->replace = webkit_content_editor_replace;
        iface->replace_all = webkit_content_editor_replace_all;
        iface->selection_save = webkit_content_editor_selection_save;
        iface->selection_restore = webkit_content_editor_selection_restore;
@@ -6025,38 +5958,9 @@ e_webkit_content_editor_content_editor_init (EContentEditorInterface *iface)
        iface->show_inspector = webkit_content_editor_show_inspector;
        iface->get_caret_position = webkit_content_editor_get_caret_position;
        iface->get_caret_offset = webkit_content_editor_get_caret_offset;
-       iface->update_fonts = webkit_content_editor_update_fonts;
-       iface->is_editable = webkit_content_editor_is_editable;
-       iface->set_editable = webkit_content_editor_set_editable;
        iface->get_current_signature_uid =  webkit_content_editor_get_current_signature_uid;
        iface->is_ready = webkit_content_editor_is_ready;
        iface->insert_signature = webkit_content_editor_insert_signature;
-       iface->set_alignment = webkit_content_editor_set_alignment;
-       iface->get_alignment = webkit_content_editor_get_alignment;
-       iface->set_block_format = webkit_content_editor_set_block_format;
-       iface->get_block_format = webkit_content_editor_get_block_format;
-       iface->set_background_color = webkit_content_editor_set_background_color;
-       iface->get_background_color = webkit_content_editor_get_background_color;
-       iface->set_font_name = webkit_content_editor_set_font_name;
-       iface->get_font_name = webkit_content_editor_get_font_name;
-       iface->set_font_color = webkit_content_editor_set_font_color;
-       iface->get_font_color = webkit_content_editor_get_font_color;
-       iface->set_font_size = webkit_content_editor_set_font_size;
-       iface->get_font_size = webkit_content_editor_get_font_size;
-       iface->set_bold = webkit_content_editor_set_bold;
-       iface->is_bold = webkit_content_editor_is_bold;
-       iface->set_italic = webkit_content_editor_set_italic;
-       iface->is_italic = webkit_content_editor_is_italic;
-       iface->set_monospaced = webkit_content_editor_set_monospaced;
-       iface->is_monospaced = webkit_content_editor_is_monospaced;
-       iface->set_strikethrough = webkit_content_editor_set_strikethrough;
-       iface->is_strikethrough = webkit_content_editor_is_strikethrough;
-       iface->set_subscript = webkit_content_editor_set_subscript;
-       iface->is_subscript = webkit_content_editor_is_subscript;
-       iface->set_superscript = webkit_content_editor_set_superscript;
-       iface->is_superscript = webkit_content_editor_is_superscript;
-       iface->set_underline = webkit_content_editor_set_underline;
-       iface->is_underline = webkit_content_editor_is_underline;
        iface->delete_cell_contents = webkit_content_editor_delete_cell_contents;
        iface->delete_column = webkit_content_editor_delete_column;
        iface->delete_row = webkit_content_editor_delete_row;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]