[evolution/gnome-3-18] EHTMLEditorView - Very long strings without spaces can overflow the paragraph



commit 54ea00d669f67da36b58ffc49cb272c53be89067
Author: Tomas Popela <tpopela redhat com>
Date:   Tue Oct 20 15:04:18 2015 +0200

    EHTMLEditorView - Very long strings without spaces can overflow the paragraph
    
    We need to also add the word-break CSS property to correctly wrap the long
    strings without spaces. Inspired by [0].
    
    [0] - https://css-tricks.com/snippets/css/prevent-long-urls-from-breaking-out-of-container/

 e-util/e-html-editor-selection.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/e-util/e-html-editor-selection.c b/e-util/e-html-editor-selection.c
index a377fa0..a27b148 100644
--- a/e-util/e-html-editor-selection.c
+++ b/e-util/e-html-editor-selection.c
@@ -7034,7 +7034,9 @@ e_html_editor_selection_set_paragraph_style (EHTMLEditorSelection *selection,
        if (!is_in_html_mode (selection) &&
            (!parent || WEBKIT_DOM_IS_HTML_BODY_ELEMENT (parent))) {
                style = g_strdup_printf (
-                       "width: %dch; word-wrap: normal; %s",
+                       "width: %dch; "
+                       "word-wrap: break-word; "
+                       "word-break: break-word; %s",
                        (word_wrap_length + offset), style_to_add);
        } else {
                if (*style_to_add)


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