From ddd3753cdebe0d8824a0b1ada942d732d01b379c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Kuna?= <1282324+codecalm@users.noreply.github.com> Date: Mon, 12 May 2025 20:30:33 +0200 Subject: [PATCH] Fix WYSIWYG documentation (#2359) --- core/scss/ui/_markdown.scss | 1 - core/scss/vendor/_tinymce.scss | 34 ------------------- core/scss/vendor/_wysiwyg.scss | 14 +++++++- docs/content/ui/components/tinymce.md | 47 --------------------------- docs/content/ui/components/wysiwyg.md | 18 ++++++++++ preview/pages/wysiwyg.html | 2 +- shared/data/docs.json | 6 ++-- shared/includes/ui/tinymce.html | 36 -------------------- shared/includes/ui/wysiwyg.html | 13 ++++++-- 9 files changed, 45 insertions(+), 126 deletions(-) delete mode 100644 core/scss/vendor/_tinymce.scss delete mode 100644 docs/content/ui/components/tinymce.md create mode 100644 docs/content/ui/components/wysiwyg.md delete mode 100644 shared/includes/ui/tinymce.html diff --git a/core/scss/ui/_markdown.scss b/core/scss/ui/_markdown.scss index 78cc0f1d6..dccca8fdd 100644 --- a/core/scss/ui/_markdown.scss +++ b/core/scss/ui/_markdown.scss @@ -2,7 +2,6 @@ Markdown */ .markdown { - font-size: $font-size-200; line-height: $line-height-xl; > :first-child { diff --git a/core/scss/vendor/_tinymce.scss b/core/scss/vendor/_tinymce.scss deleted file mode 100644 index 3d6e4823c..000000000 --- a/core/scss/vendor/_tinymce.scss +++ /dev/null @@ -1,34 +0,0 @@ -.tox-hugerte { - border: var(--#{$prefix}border-width) var(--#{$prefix}border-style) var(--#{$prefix}border-color) !important; - border-radius: $border-radius !important; - font-family: var(--#{$prefix}font-sans-serif) !important; -} - -.tox-toolbar__group { - padding: 0 .5rem 0; -} - -.tox .tox-toolbar__primary { - background: transparent !important; -} - -.tox:not(.tox-hugerte-inline) { - .tox-editor-header { - border-bottom: var(--#{$prefix}border-width) var(--#{$prefix}border-style) var(--#{$prefix}border-color) !important; - box-shadow: none !important; - padding: 0 !important; - } -} - -.tox-tbtn { - margin: 0 !important; -} - -.tox-statusbar { - border-top: var(--#{$prefix}border-width) var(--#{$prefix}border-style) var(--#{$prefix}border-color) !important; -} - -.tox .tox-toolbar-overlord, -.tox:not(.tox-hugerte-inline) .tox-editor-header { - background: transparent !important; -} \ No newline at end of file diff --git a/core/scss/vendor/_wysiwyg.scss b/core/scss/vendor/_wysiwyg.scss index 3d6e4823c..c01dc9eea 100644 --- a/core/scss/vendor/_wysiwyg.scss +++ b/core/scss/vendor/_wysiwyg.scss @@ -21,7 +21,19 @@ } .tox-tbtn { - margin: 0 !important; + margin: 0 !important; + background: var(--#{$prefix}bg-surface) !important; + + &:hover, + &.tox-tbtn--enabled { + background: var(--#{$prefix}bg-surface-secondary) !important; + } +} + +.tox-edit-area { + &::before { + border: none !important + } } .tox-statusbar { diff --git a/docs/content/ui/components/tinymce.md b/docs/content/ui/components/tinymce.md deleted file mode 100644 index da161fbca..000000000 --- a/docs/content/ui/components/tinymce.md +++ /dev/null @@ -1,47 +0,0 @@ ---- -title: TinyMCE -docs-libs: tinymce -summary: The WYSIWYG editor that is flexible, customizable, and designed with the user in mind. TinyMCE can handle any challenge, from the most simple implementation through to the most complex use case. -description: Flexible WYSIWYG editor for content. ---- - -[TinyMCE](https://www.tiny.cloud/docs/) documentation. - -## Default text editor - -Initialize TinyMCE 6 on any element (or elements) on the web page by passing an object containing a selector value to `tinymce.init()`. The selector value can be any valid CSS selector. - -{% capture html -%} -
- - -{%- endcapture %} -{% include "docs/example.html" html=html %} diff --git a/docs/content/ui/components/wysiwyg.md b/docs/content/ui/components/wysiwyg.md new file mode 100644 index 000000000..514670afc --- /dev/null +++ b/docs/content/ui/components/wysiwyg.md @@ -0,0 +1,18 @@ +--- +title: Wysiwyg editor +docs-libs: [hugerte] +summary: The WYSIWYG editor that is flexible, customizable, and designed with the user in mind. HugeRTE can handle any challenge, from the most simple implementation through to the most complex use case. +description: Flexible WYSIWYG editor for content. +--- + +[HugeRTE](https://hugerte.org/) documentation. + +## Default text editor + +Initialize HugeRTE on any element (or elements) on the web page by passing an object containing a selector value to `hugerte.init()`. The selector value can be any valid CSS selector. + +{% capture html -%} +{% include "ui/wysiwyg.html" %} +{{ script }} +{%- endcapture %} +{% include "docs/example.html" html=html %} diff --git a/preview/pages/wysiwyg.html b/preview/pages/wysiwyg.html index f30f6ac77..7896cb157 100644 --- a/preview/pages/wysiwyg.html +++ b/preview/pages/wysiwyg.html @@ -4,7 +4,7 @@ page-header: HugeRTE menu: base.wysiwyg page-libs: [hugerte] permalink: /wysiwyg.html -layout: single +layout: default ---