]> BookStack Code Mirror - bookstack/blobdiff - resources/sass/_tinymce.scss
Updated attachment links to have dropdown for open type
[bookstack] / resources / sass / _tinymce.scss
index 57bb697548af418fd90c5485eb6000cc0ac4c56b..0ee3fa40b235298e3ceaf0bf64ab4bb6456b050d 100644 (file)
   display: block;
 }
 
+// Default styles for our custom root nodes
+.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 {
   line-height: 1.6;
@@ -33,19 +41,24 @@ 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 {
   pointer-events: none;
 }
-.page-content.mce-content-body details [detailswrap] {
+.page-content.mce-content-body details doc-root {
   padding: $-s;
   margin-left: (2px - $-s);
   margin-right: (2px - $-s);
   margin-bottom: (2px - $-s);
+  margin-top: (2px - $-s);
+  overflow: hidden;
 }
 
 /**
@@ -99,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,<svg fill="%23FFFFFF" version="1.1" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m8.4856 20.274-6.736-6.736 2.9287-2.7823 3.8073 3.8073 10.836-10.836 2.9287 2.9287z" stroke-width="1.4644"/></svg>');
+  background-position: 50% 50%;
+  background-size: 100% 100%;
 }
\ No newline at end of file