I#1950 - Composer: Copy/paste changes text size in HTML mode

Closes https://gitlab.gnome.org/GNOME/evolution/-/issues/1950
This commit is contained in:
Milan Crha
2023-03-31 07:42:47 +02:00
parent b006276369
commit dcb06707f2
2 changed files with 29 additions and 3 deletions

View File

@ -5123,18 +5123,25 @@ webkit_editor_paste_clipboard_targets_cb (GtkClipboard *clipboard,
return;
}
if (is_html)
if (is_html) {
gchar *paste_content;
paste_content = g_strconcat ("<meta name=\"x-evolution-is-paste\">", content, NULL);
webkit_editor_insert_content (
E_CONTENT_EDITOR (wk_editor),
content,
paste_content,
E_CONTENT_EDITOR_INSERT_TEXT_HTML);
else
g_free (paste_content);
} else {
webkit_editor_insert_content (
E_CONTENT_EDITOR (wk_editor),
content,
E_CONTENT_EDITOR_INSERT_TEXT_PLAIN |
E_CONTENT_EDITOR_INSERT_CONVERT |
(wk_editor->priv->paste_plain_prefer_pre ? E_CONTENT_EDITOR_INSERT_CONVERT_PREFER_PRE : 0));
}
g_free (content);
}