From eca8b9ec7c7b76f5dc95e42c4df0c6ba75d72d6a Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Thu, 10 Oct 2019 11:05:53 +0200 Subject: [PATCH] Fix editor related issues Signed-off-by: Thomas Citharel --- js/src/components/Editor.vue | 3 +++ js/src/components/Event/TagInput.vue | 2 +- js/src/views/Event/Edit.vue | 2 +- js/src/views/Event/Event.vue | 40 ++++++++++++++++++++++------ lib/service/html.ex | 1 + 5 files changed, 38 insertions(+), 10 deletions(-) diff --git a/js/src/components/Editor.vue b/js/src/components/Editor.vue index ed5eca9c..3b1533c2 100644 --- a/js/src/components/Editor.vue +++ b/js/src/components/Editor.vue @@ -520,6 +520,9 @@ export default class EditorComponent extends Vue { ul, ol { padding-left: 1rem; + } + + ul { list-style-type: disc; } diff --git a/js/src/components/Event/TagInput.vue b/js/src/components/Event/TagInput.vue index 755144fc..bf63f227 100644 --- a/js/src/components/Event/TagInput.vue +++ b/js/src/components/Event/TagInput.vue @@ -39,7 +39,7 @@ export default { :allow-new="true" :field="path" icon="label" - :placeholder="$t('Add a tag')" + :placeholder="$t('Eg: Stockholm, Dance, Chess…')" @typing="getFilteredTags" > diff --git a/js/src/views/Event/Edit.vue b/js/src/views/Event/Edit.vue index 7c05101f..6409624d 100644 --- a/js/src/views/Event/Edit.vue +++ b/js/src/views/Event/Edit.vue @@ -16,7 +16,7 @@ - + diff --git a/js/src/views/Event/Event.vue b/js/src/views/Event/Event.vue index a6ed34a4..f1d0994d 100644 --- a/js/src/views/Event/Event.vue +++ b/js/src/views/Event/Event.vue @@ -137,7 +137,7 @@ {{ $t("The event organizer didn't add any description.") }}

-
+
@@ -660,14 +660,38 @@ export default class Event extends EventMixin { border-top: solid 1px #111; border-bottom: solid 1px #111; - p { - margin: 10px auto; + .description-content { + /deep/ h1 { + font-size: 2rem; + } - a { - display: inline-block; - padding: 0.3rem; - background: $secondary; - color: #111; + /deep/ h2 { + font-size: 1.5rem; + } + + /deep/ h3 { + font-size: 1.25rem; + } + + /deep/ ul { + list-style-type: disc; + } + + /deep/ blockquote { + border-left: .2em solid #333; + display: block; + padding-left: 1em; + } + + /deep/ p { + margin: 10px auto; + + a { + display: inline-block; + padding: 0.3rem; + background: $secondary; + color: #111; + } } } } diff --git a/lib/service/html.ex b/lib/service/html.ex index 2172e090..a30af219 100644 --- a/lib/service/html.ex +++ b/lib/service/html.ex @@ -59,6 +59,7 @@ defmodule Mobilizon.Service.HTML.Scrubber.Default do Meta.allow_tag_with_these_attributes("strong", []) Meta.allow_tag_with_these_attributes("u", []) Meta.allow_tag_with_these_attributes("ul", []) + Meta.allow_tag_with_these_attributes("img", ["src", "alt"]) Meta.allow_tag_with_this_attribute_values("span", "class", ["h-card"]) Meta.allow_tag_with_these_attributes("span", [])