X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/536ad142764bd2ddf32e43aa4123f079b5057afb..refs/pull/3406/head:/resources/sass/_tinymce.scss diff --git a/resources/sass/_tinymce.scss b/resources/sass/_tinymce.scss index ecb258a53..0ee3fa40b 100644 --- a/resources/sass/_tinymce.scss +++ b/resources/sass/_tinymce.scss @@ -21,6 +21,9 @@ .page-content.mce-content-body doc-root { display: block; } +.page-content.mce-content-body code-block { + display: block; +} // In editor line height override .page-content.mce-content-body p { @@ -38,9 +41,12 @@ body.page-content.mce-content-body { } // Prevent scroll jumps on codemirror clicks -.page-content.mce-content-body .CodeMirror { +.page-content.mce-content-body code-block > * { pointer-events: none; } +.page-content.mce-content-body code-block pre { + display: none; +} // Details/summary editor usability .page-content.mce-content-body details summary { @@ -51,6 +57,8 @@ body.page-content.mce-content-body { margin-left: (2px - $-s); margin-right: (2px - $-s); margin-bottom: (2px - $-s); + margin-top: (2px - $-s); + overflow: hidden; } /** @@ -104,4 +112,36 @@ body.page-content.mce-content-body { } .tox-menu .tox-collection__item-label { line-height: normal !important; +} + +/** + * Fake task list checkboxes + */ +.page-content.mce-content-body .task-list-item { + margin-left: 0; + position: relative; +} +.page-content.mce-content-body .task-list-item > input[type="checkbox"] { + display: none; +} +.page-content.mce-content-body .task-list-item:before { + content: ''; + display: inline-block; + border: 2px solid #CCC; + width: 12px; + height: 12px; + border-radius: 2px; + margin-right: 8px; + vertical-align: text-top; + cursor: pointer; + position: absolute; + left: -24px; + top: 4px; +} + +.page-content.mce-content-body .task-list-item[checked]:before { + background-color: #CCC; + background-image: url('data:image/svg+xml;utf8,'); + background-position: 50% 50%; + background-size: 100% 100%; } \ No newline at end of file