From 0b3b0a5b2f8bba077b2f422427e4d4457114b453 Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Fri, 30 Aug 2024 07:58:38 +0200 Subject: [PATCH] =?UTF-8?q?=C3=9Aprava=20stylu,=20chyby=20p=C5=99i=20neval?= =?UTF-8?q?idn=C3=ADm=20HTML=20a=20stylu=20tabulek.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ZZZO/ZZZO/Assists/ChromiumWebBrowserAssist.cs | 9 ++++++++- resources/editor/editor.html | 3 +++ "resources/styles/sv\303\251sedlice.css" | 15 +++++++++++++-- 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/ZZZO/ZZZO/Assists/ChromiumWebBrowserAssist.cs b/ZZZO/ZZZO/Assists/ChromiumWebBrowserAssist.cs index b6a3cc2..28384e5 100755 --- a/ZZZO/ZZZO/Assists/ChromiumWebBrowserAssist.cs +++ b/ZZZO/ZZZO/Assists/ChromiumWebBrowserAssist.cs @@ -37,7 +37,14 @@ private static void OnHtmlChanged(DependencyObject d, DependencyPropertyChangedE { if (e.Property.Name == HtmlProperty.Name && d is ChromiumWebBrowser browser) { - browser.LoadHtml(e.NewValue as string, Constants.Uris.Document); + if (e.NewValue is string html) + { + browser.LoadHtml(html, Constants.Uris.Document); + } + else + { + browser.LoadHtml("

Nevalidní HTML.

", Constants.Uris.Document); + } } } diff --git a/resources/editor/editor.html b/resources/editor/editor.html index 5fe235c..527ccc4 100755 --- a/resources/editor/editor.html +++ b/resources/editor/editor.html @@ -26,6 +26,9 @@ allow_html_in_named_anchor: true, auto_focus: true, resize: false, + table_use_colgroups: false, + table_default_attributes: {}, + table_default_styles: {}, plugins: 'code charmap image link searchreplace table visualchars lists', menubar: "edit view insert format table tools help", toolbar: ['alignleft aligncenter alignright | underline bold italic | link subscript superscript', 'styles | bullist numlist'], diff --git "a/resources/styles/sv\303\251sedlice.css" "b/resources/styles/sv\303\251sedlice.css" index 8970be8..be2eff2 100755 --- "a/resources/styles/sv\303\251sedlice.css" +++ "b/resources/styles/sv\303\251sedlice.css" @@ -9,6 +9,7 @@ Svésedlice, Czechia - style for generating municipality meeting reports. --failure-color: red; --warning-color: orange; --signature-color: gray; + --table-border: black; font-family: "EB Garamond", serif; } @@ -35,6 +36,16 @@ ol { padding-left: 1.5em; } +table { + width: fit-content; + border-collapse: collapse; +} + +td, th { + padding: 4px; + border: 1px solid var(--table-border); +} + .ol-classic { list-style: revert; padding-left: 1.5em; @@ -104,8 +115,8 @@ h1, h2, h3, h4, h5, h6 { border-width: 3px; */ - border-top: 1px solid; - border-bottom: 1px solid; + border-top: 2px solid; + border-bottom: 2px solid; width: 70%; padding: 0px 10px; print-color-adjust: exact;