X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/ec775aec02c0887d5cf2dc23c938a75b7eaf67d2..refs/pull/5313/head:/resources/sass/_tinymce.scss diff --git a/resources/sass/_tinymce.scss b/resources/sass/_tinymce.scss index 13b6f676b..129e47821 100644 --- a/resources/sass/_tinymce.scss +++ b/resources/sass/_tinymce.scss @@ -9,12 +9,33 @@ z-index: 100; } +// Editor wrapper edits +.tox.tox-tinymce { + border-inline: 0; + border-bottom: 0; +} + // In editor body overrides .page-content.mce-content-body { padding-block-start: 1rem; padding-block-end: 1rem; outline: 0; display: block; + max-width: 870px; +} + +.wysiwyg-input.mce-content-body { + padding-block-start: 1rem; + padding-block-end: 1rem; + outline: 0; + display: block; +} + +.wysiwyg-input.mce-content-body:before { + padding: 1rem; + top: 4px; + font-style: italic; + @include lightDark(color, rgba(34,47,62,.5), rgba(155,155,155,.5)) } // Default styles for our custom root nodes @@ -25,11 +46,6 @@ display: block; } -// In editor line height override -.page-content.mce-content-body p { - line-height: 1.6; -} - // Pad out bottom of editor body.page-content.mce-content-body { padding-bottom: 5rem; @@ -66,6 +82,40 @@ body.page-content.mce-content-body { overflow: hidden; } +// Allow alignment to be reflected in media embed wrappers +.page-content.mce-content-body .mce-preview-object.align-right { + float: right !important; + margin: $-xs 0 $-xs $-s; +} + +.page-content.mce-content-body .mce-preview-object.align-left { + float: left !important; + margin: $-xs $-m $-m 0; +} + +.page-content.mce-content-body .mce-preview-object.align-center { + display: block; + margin-left: auto; + margin-right: auto; +} + +.page-content.mce-content-body .mce-preview-object iframe, +.page-content.mce-content-body .mce-preview-object video { + display: block; + margin: 0 !important; + float: none !important; +} + +.page-content.mce-content-body td[data-mce-selected]::after, +.page-content.mce-content-body th[data-mce-selected]::after { + top: 1px; + left: 1px; + bottom: 1px; + right: 1px; + outline: 1px dashed #1a85ff; + outline-offset: 0; +} + /** * Dark Mode Overrides */ @@ -123,7 +173,7 @@ body.page-content.mce-content-body { * Fake task list checkboxes */ .page-content.mce-content-body .task-list-item { - margin-left: 0; + margin-inline-start: 0; position: relative; } .page-content.mce-content-body .task-list-item > input[type="checkbox"] { @@ -136,11 +186,11 @@ body.page-content.mce-content-body { width: 12px; height: 12px; border-radius: 2px; - margin-right: 8px; + margin-inline-end: 8px; vertical-align: text-top; cursor: pointer; position: absolute; - left: -24px; + inset-inline-start: -24px; top: 4px; }