509 lines
No EOL
9.3 KiB
SCSS
509 lines
No EOL
9.3 KiB
SCSS
|
|
|
|
#editor.bs-editor {
|
|
padding-top: 0;
|
|
}
|
|
|
|
//.bs-editor .menubar {
|
|
// border-bottom: 1px solid #DDD;
|
|
// padding: 2px;
|
|
//}
|
|
//
|
|
//.bs-editor .menuicon {
|
|
// cursor: pointer;
|
|
// padding: 4px;
|
|
// min-width: 2rem;
|
|
// border-radius: 3px;
|
|
// border: 1px solid transparent;
|
|
// &:hover {
|
|
// background-color: #EEE;
|
|
// border: 1px solid #DDD;
|
|
// }
|
|
//}
|
|
|
|
// The below originated from https://github.com/ProseMirror/prosemirror-menu
|
|
// and is therefore subject to the MIT license found here:
|
|
// https://github.com/ProseMirror/prosemirror-menu/blob/master/LICENSE
|
|
|
|
.ProseMirror {
|
|
position: relative;
|
|
}
|
|
|
|
.ProseMirror {
|
|
word-wrap: break-word;
|
|
white-space: pre-wrap;
|
|
white-space: break-spaces;
|
|
-webkit-font-variant-ligatures: none;
|
|
font-variant-ligatures: none;
|
|
font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */
|
|
}
|
|
|
|
.ProseMirror pre {
|
|
white-space: pre-wrap;
|
|
}
|
|
|
|
.ProseMirror li {
|
|
position: relative;
|
|
}
|
|
|
|
.ProseMirror-hideselection *::selection { background: transparent; }
|
|
.ProseMirror-hideselection *::-moz-selection { background: transparent; }
|
|
.ProseMirror-hideselection { caret-color: transparent; }
|
|
|
|
.ProseMirror-selectednode {
|
|
outline: 2px solid #8cf;
|
|
}
|
|
|
|
/* Make sure li selections wrap around markers */
|
|
|
|
li.ProseMirror-selectednode {
|
|
outline: none;
|
|
}
|
|
|
|
li.ProseMirror-selectednode:after {
|
|
content: "";
|
|
position: absolute;
|
|
left: -32px;
|
|
right: -2px; top: -2px; bottom: -2px;
|
|
border: 2px solid #8cf;
|
|
pointer-events: none;
|
|
}
|
|
|
|
/* Protect against generic img rules */
|
|
|
|
img.ProseMirror-separator {
|
|
display: inline !important;
|
|
border: none !important;
|
|
margin: 0 !important;
|
|
}
|
|
|
|
.ProseMirror-textblock-dropdown {
|
|
min-width: 3em;
|
|
}
|
|
|
|
.ProseMirror-menu {
|
|
margin: 0 -4px;
|
|
line-height: 1;
|
|
}
|
|
|
|
.ProseMirror-tooltip .ProseMirror-menu {
|
|
width: -webkit-fit-content;
|
|
width: fit-content;
|
|
white-space: pre;
|
|
}
|
|
|
|
.ProseMirror-menuitem {
|
|
margin-right: 3px;
|
|
display: inline-block;
|
|
}
|
|
|
|
.ProseMirror-menuseparator {
|
|
border-right: 1px solid #ddd;
|
|
margin-right: 3px;
|
|
}
|
|
|
|
.ProseMirror-menu-dropdown, .ProseMirror-menu-dropdown-menu {
|
|
font-size: 90%;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.ProseMirror-menu-dropdown {
|
|
vertical-align: 1px;
|
|
cursor: pointer;
|
|
position: relative;
|
|
padding-right: 15px;
|
|
}
|
|
|
|
.ProseMirror-menu-dropdown-wrap {
|
|
padding: 1px 0 1px 4px;
|
|
display: inline-block;
|
|
position: relative;
|
|
}
|
|
|
|
.ProseMirror-menu-dropdown:after {
|
|
content: "";
|
|
border-left: 4px solid transparent;
|
|
border-right: 4px solid transparent;
|
|
border-top: 4px solid currentColor;
|
|
opacity: .6;
|
|
position: absolute;
|
|
right: 4px;
|
|
top: calc(50% - 2px);
|
|
}
|
|
|
|
.ProseMirror-menu-dropdown-menu, .ProseMirror-menu-submenu {
|
|
position: absolute;
|
|
background: white;
|
|
color: #666;
|
|
border: 1px solid #aaa;
|
|
padding: 2px;
|
|
}
|
|
|
|
.ProseMirror-menu-dropdown-menu {
|
|
z-index: 15;
|
|
min-width: 6em;
|
|
}
|
|
|
|
.ProseMirror-menu-dropdown-item {
|
|
cursor: pointer;
|
|
padding: 2px 8px 2px 4px;
|
|
}
|
|
|
|
.ProseMirror-menu-dropdown-item:hover {
|
|
background: #f2f2f2;
|
|
}
|
|
|
|
.ProseMirror-menu-submenu-wrap {
|
|
position: relative;
|
|
margin-right: 4px;
|
|
}
|
|
|
|
.ProseMirror-menu-submenu-label {
|
|
padding-inline-end: 12px;
|
|
padding-inline-start: 4px;
|
|
}
|
|
|
|
.ProseMirror-menu-submenu-label:after {
|
|
content: "";
|
|
border-top: 4px solid transparent;
|
|
border-bottom: 4px solid transparent;
|
|
border-left: 4px solid currentColor;
|
|
opacity: .6;
|
|
position: absolute;
|
|
right: 4px;
|
|
top: calc(50% - 4px);
|
|
}
|
|
|
|
.ProseMirror-menu-submenu {
|
|
display: none;
|
|
min-width: 10em;
|
|
left: 100%;
|
|
top: -3px;
|
|
}
|
|
|
|
.ProseMirror-menu-active {
|
|
background: #eee;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.ProseMirror-menu-disabled {
|
|
opacity: .3;
|
|
}
|
|
|
|
.ProseMirror-menu-submenu-wrap:hover > .ProseMirror-menu-submenu, .ProseMirror-menu-submenu-wrap-active > .ProseMirror-menu-submenu {
|
|
display: block;
|
|
}
|
|
|
|
.ProseMirror-menubar {
|
|
border-top-left-radius: inherit;
|
|
border-top-right-radius: inherit;
|
|
position: relative;
|
|
min-height: 1em;
|
|
color: #666;
|
|
padding: 1px 6px;
|
|
top: 0; left: 0; right: 0;
|
|
border-bottom: 1px solid silver;
|
|
background: white;
|
|
z-index: 10;
|
|
-moz-box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
overflow: visible;
|
|
}
|
|
|
|
.ProseMirror-icon {
|
|
display: inline-block;
|
|
line-height: .8;
|
|
vertical-align: -2px; /* Compensate for padding */
|
|
padding: 2px 8px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.ProseMirror-menu-disabled.ProseMirror-icon {
|
|
cursor: default;
|
|
}
|
|
|
|
.ProseMirror-icon svg {
|
|
fill: currentColor;
|
|
height: 1em;
|
|
}
|
|
|
|
.ProseMirror-icon span {
|
|
vertical-align: text-top;
|
|
}
|
|
|
|
.ProseMirror-gapcursor {
|
|
display: none;
|
|
pointer-events: none;
|
|
position: absolute;
|
|
}
|
|
|
|
.ProseMirror-gapcursor:after {
|
|
content: "";
|
|
display: block;
|
|
position: absolute;
|
|
top: -2px;
|
|
width: 20px;
|
|
border-top: 1px solid black;
|
|
animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;
|
|
}
|
|
|
|
@keyframes ProseMirror-cursor-blink {
|
|
to {
|
|
visibility: hidden;
|
|
}
|
|
}
|
|
|
|
.ProseMirror-focused .ProseMirror-gapcursor {
|
|
display: block;
|
|
}
|
|
/* Add space around the hr to make clicking it easier */
|
|
|
|
.ProseMirror-example-setup-style hr {
|
|
border-top: 3px solid #FFF;
|
|
border-bottom: 3px solid #FFF;
|
|
box-sizing: content-box;
|
|
}
|
|
|
|
.ProseMirror ul, .ProseMirror ol {
|
|
padding-left: 30px;
|
|
}
|
|
|
|
.ProseMirror blockquote {
|
|
padding-left: 1em;
|
|
border-left: 3px solid #eee;
|
|
margin-left: 0; margin-right: 0;
|
|
}
|
|
|
|
.ProseMirror-example-setup-style img {
|
|
cursor: default;
|
|
}
|
|
|
|
.ProseMirror-prompt {
|
|
background: white;
|
|
padding: 5px 10px 5px 15px;
|
|
border: 1px solid silver;
|
|
position: fixed;
|
|
border-radius: 3px;
|
|
z-index: 11;
|
|
box-shadow: -.5px 2px 5px rgba(0, 0, 0, .2);
|
|
}
|
|
|
|
.ProseMirror-prompt h5 {
|
|
margin: 0;
|
|
font-weight: normal;
|
|
font-size: 100%;
|
|
color: #444;
|
|
}
|
|
|
|
.ProseMirror-prompt input[type="text"],
|
|
.ProseMirror-prompt textarea {
|
|
background: #eee;
|
|
border: none;
|
|
outline: none;
|
|
}
|
|
|
|
.ProseMirror-prompt input[type="text"] {
|
|
padding: 0 4px;
|
|
}
|
|
|
|
.ProseMirror-prompt-close {
|
|
position: absolute;
|
|
left: 2px; top: 1px;
|
|
color: #666;
|
|
border: none; background: transparent; padding: 0;
|
|
}
|
|
|
|
.ProseMirror-prompt-close:after {
|
|
content: "✕";
|
|
font-size: 12px;
|
|
}
|
|
|
|
.ProseMirror-invalid {
|
|
background: #ffc;
|
|
border: 1px solid #cc7;
|
|
border-radius: 4px;
|
|
padding: 5px 10px;
|
|
position: absolute;
|
|
min-width: 10em;
|
|
}
|
|
|
|
.ProseMirror-prompt-buttons {
|
|
margin-top: 5px;
|
|
display: none;
|
|
}
|
|
#editor, .editor {
|
|
background: white;
|
|
color: black;
|
|
background-clip: padding-box;
|
|
border-radius: 4px;
|
|
border: 2px solid rgba(0, 0, 0, 0.2);
|
|
padding: 5px 0;
|
|
margin-bottom: 23px;
|
|
}
|
|
|
|
.ProseMirror p:first-child,
|
|
.ProseMirror h1:first-child,
|
|
.ProseMirror h2:first-child,
|
|
.ProseMirror h3:first-child,
|
|
.ProseMirror h4:first-child,
|
|
.ProseMirror h5:first-child,
|
|
.ProseMirror h6:first-child {
|
|
margin-top: 10px;
|
|
}
|
|
|
|
.ProseMirror {
|
|
padding: 4px 8px 4px 14px;
|
|
line-height: 1.2;
|
|
outline: none;
|
|
}
|
|
|
|
.ProseMirror p { margin-bottom: 1em }
|
|
|
|
.ProseMirror-menu-color-grid-container {
|
|
display: grid;
|
|
grid-template-columns: repeat(8, 1fr);
|
|
}
|
|
|
|
.ProseMirror-menu-color-grid-item {
|
|
width: 20px;
|
|
height: 20px;
|
|
border: 2px solid #FFF;
|
|
display: block;
|
|
}
|
|
|
|
.ProseMirror-menu-dialog-wrap {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
background-color: rgba(0, 0, 0, 0.1);
|
|
z-index: 50;
|
|
display: grid;
|
|
}
|
|
|
|
.ProseMirror-menu-dialog-title {
|
|
padding: $-xs $-s;
|
|
border-bottom: 1px solid #DDD;
|
|
font-weight: bold;
|
|
position: relative;
|
|
margin-bottom: $-xs;
|
|
}
|
|
|
|
.ProseMirror-menu-dialog-footer {
|
|
padding: $-xs $-s;
|
|
border-top: 1px solid #DDD;
|
|
display: flex;
|
|
justify-content: end;
|
|
margin-top: $-xs;
|
|
}
|
|
|
|
.ProseMirror-menu-dialog-title-close {
|
|
color: #FFF;
|
|
position: absolute;
|
|
top: $-xs + 2px;
|
|
right: $-s;
|
|
border-radius: 9px;
|
|
height: 18px;
|
|
width: 18px;
|
|
text-align: center;
|
|
line-height: 0;
|
|
vertical-align: top;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
}
|
|
|
|
.ProseMirror-menu-dialog {
|
|
background-color: #FFF;
|
|
border: 1px solid #DDD;
|
|
border-radius: 3px;
|
|
box-shadow: $bs-large;
|
|
width: fit-content;
|
|
min-width: 300px;
|
|
min-height: 100px;
|
|
margin: auto;
|
|
}
|
|
|
|
.ProseMirror-menu-dialog-button {
|
|
border: 1px solid #DDD;
|
|
padding: $-xs $-s;
|
|
color: #666;
|
|
min-width: 80px;
|
|
cursor: pointer;
|
|
&:hover {
|
|
background-color: #EEE;
|
|
}
|
|
}
|
|
|
|
.ProseMirror-menu-dialog-button + .ProseMirror-menu-dialog-button {
|
|
margin-left: $-xs;
|
|
}
|
|
|
|
.ProseMirror-menu-dialog-form-row {
|
|
display: grid;
|
|
grid-template-columns: 1fr 2fr;
|
|
align-items: center;
|
|
padding: $-xs 0;
|
|
label {
|
|
padding: 0 $-s;
|
|
font-size: .9rem;
|
|
}
|
|
input {
|
|
margin: 0 $-s;
|
|
}
|
|
}
|
|
|
|
.ProseMirror-menu-dialog-textarea-wrap {
|
|
padding: $-xs $-s;
|
|
label {
|
|
padding: 0 $-s;
|
|
font-size: .9rem;
|
|
}
|
|
textarea {
|
|
width: 100%;
|
|
font-size: 0.8rem;
|
|
}
|
|
}
|
|
|
|
.ProseMirror-imagewrap {
|
|
display: inline-block;
|
|
line-height: 0;
|
|
font-size: 0;
|
|
position: relative;
|
|
}
|
|
.ProseMirror-imagewrap.ProseMirror-selectednode {
|
|
outline: 0;
|
|
}
|
|
|
|
.ProseMirror img[data-show-handles] {
|
|
outline: 4px solid #000;
|
|
}
|
|
.ProseMirror-dragdummy {
|
|
position: absolute;
|
|
z-index: 2;
|
|
left: 0;
|
|
top: 0;
|
|
max-width: none !important;
|
|
max-height: none !important;
|
|
}
|
|
.ProseMirror-grabhandle {
|
|
width: 12px;
|
|
height: 12px;
|
|
border: 2px solid #000;
|
|
z-index: 4;
|
|
position: absolute;
|
|
background-color: #FFF;
|
|
}
|
|
.ProseMirror-grabhandle-left-top {
|
|
cursor: nw-resize;
|
|
}
|
|
.ProseMirror-grabhandle-right-top {
|
|
cursor: ne-resize;
|
|
}
|
|
.ProseMirror-grabhandle-right-bottom {
|
|
cursor: se-resize;
|
|
}
|
|
.ProseMirror-grabhandle-left-bottom {
|
|
cursor: sw-resize;
|
|
} |