2018-01-11 15:16:42 +00:00
|
|
|
$editor-z-index: $draftail-editor-z-index;
|
|
|
|
|
|
2018-01-18 12:43:15 +00:00
|
|
|
$draftail-editor-text: $color-text-input;
|
2020-01-25 00:05:27 +00:00
|
|
|
$draftail-editor-chrome: $color-white;
|
|
|
|
|
$draftail-editor-chrome-text: $color-grey-2;
|
|
|
|
|
$draftail-editor-chrome-active: $color-grey-2;
|
|
|
|
|
$draftail-editor-chrome-accent: transparent;
|
2018-01-15 03:35:34 +00:00
|
|
|
|
|
|
|
|
$draftail-editor-border: 0;
|
2021-12-08 04:18:12 +00:00
|
|
|
$draftail-editor-padding: 0.75rem;
|
2018-01-17 08:43:23 +00:00
|
|
|
$draftail-editor-background: transparent;
|
|
|
|
|
$draftail-toolbar-radius: 3px;
|
2018-04-11 08:35:03 +00:00
|
|
|
$draftail-toolbar-icon-size: 1em;
|
2018-01-15 03:35:34 +00:00
|
|
|
|
2021-12-23 04:21:23 +00:00
|
|
|
$draftail-editor-font-family: $font-sans;
|
2018-01-10 23:38:18 +00:00
|
|
|
|
2018-01-10 21:47:49 +00:00
|
|
|
@import '../../../../node_modules/draft-js/dist/Draft';
|
2018-01-10 23:38:18 +00:00
|
|
|
@import '../../../../node_modules/draftail/lib/index';
|
|
|
|
|
|
|
|
|
|
@import './Tooltip/Tooltip';
|
2021-04-07 09:26:50 +00:00
|
|
|
@import './CommentableEditor/CommentableEditor';
|
2018-02-27 15:34:22 +00:00
|
|
|
@import './EditorFallback/EditorFallback';
|
2018-01-10 23:38:18 +00:00
|
|
|
|
|
|
|
|
@import './decorators/TooltipEntity';
|
|
|
|
|
|
|
|
|
|
@import './blocks/MediaBlock';
|
|
|
|
|
@import './blocks/ImageBlock';
|
|
|
|
|
@import './blocks/EmbedBlock';
|
2017-12-05 17:49:17 +00:00
|
|
|
|
2018-01-17 08:43:23 +00:00
|
|
|
@include draftail-richtext-styles {
|
2022-02-04 11:57:55 +00:00
|
|
|
h1,
|
|
|
|
|
h2,
|
|
|
|
|
h3,
|
|
|
|
|
h4,
|
|
|
|
|
h5,
|
|
|
|
|
h6 {
|
|
|
|
|
// Overrides for other parts of the Wagtail admin.
|
|
|
|
|
text-transform: none;
|
|
|
|
|
font-family: inherit;
|
|
|
|
|
clear: both;
|
|
|
|
|
line-height: 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
h1,
|
|
|
|
|
h2,
|
|
|
|
|
h3 {
|
|
|
|
|
line-height: 1.1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
h1 {
|
|
|
|
|
font-size: 2em;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
h2 {
|
|
|
|
|
font-size: 1.8em;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
h3 {
|
|
|
|
|
font-size: 1.5em;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
h4 {
|
|
|
|
|
font-size: 1.2em;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
h5 {
|
|
|
|
|
font-size: 1.1em;
|
|
|
|
|
}
|
2017-12-05 17:49:17 +00:00
|
|
|
}
|
2018-01-18 09:59:08 +00:00
|
|
|
|
2018-01-18 12:43:15 +00:00
|
|
|
.Draftail-Editor {
|
2022-02-04 11:57:55 +00:00
|
|
|
border-radius: 0;
|
2018-02-09 22:07:29 +00:00
|
|
|
|
2022-02-04 11:57:55 +00:00
|
|
|
&__wrapper {
|
|
|
|
|
// Ensure elements within the editor are positioned according to this container.
|
|
|
|
|
position: relative;
|
|
|
|
|
}
|
2018-01-18 12:43:15 +00:00
|
|
|
}
|
|
|
|
|
|
2018-04-11 08:35:03 +00:00
|
|
|
.Draftail-ToolbarButton .icon {
|
2022-02-04 11:57:55 +00:00
|
|
|
width: $draftail-toolbar-icon-size;
|
|
|
|
|
height: $draftail-toolbar-icon-size;
|
|
|
|
|
vertical-align: middle;
|
2018-04-11 08:35:03 +00:00
|
|
|
}
|
|
|
|
|
|
2018-01-18 12:43:15 +00:00
|
|
|
// When in a .full container, the editor has a specific appearance
|
|
|
|
|
// so the whole area appears like a focusable area, and the editor
|
|
|
|
|
// receives focus on click.
|
|
|
|
|
.full .Draftail-Editor {
|
2022-02-04 11:57:55 +00:00
|
|
|
padding-top: 2em;
|
|
|
|
|
padding-bottom: 2em;
|
|
|
|
|
background-color: $color-fieldset-hover;
|
|
|
|
|
border-right: 1px solid $color-input-border;
|
|
|
|
|
|
|
|
|
|
&--focus {
|
|
|
|
|
background-color: $color-input-focus;
|
|
|
|
|
border-color: $color-input-focus-border;
|
|
|
|
|
}
|
2018-01-18 12:43:15 +00:00
|
|
|
}
|
|
|
|
|
|
2018-01-26 10:31:39 +00:00
|
|
|
.full .Draftail-Editor .public-DraftEditor-content,
|
|
|
|
|
.full .Draftail-Editor .public-DraftEditorPlaceholder-root {
|
2022-02-04 11:57:55 +00:00
|
|
|
@include nice-padding;
|
2018-01-18 12:43:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.full .Draftail-Toolbar {
|
2022-02-04 11:57:55 +00:00
|
|
|
@include nice-margin;
|
2018-01-18 12:43:15 +00:00
|
|
|
}
|
|
|
|
|
|
2020-01-25 00:05:27 +00:00
|
|
|
.Draftail-Toolbar {
|
2022-02-04 11:57:55 +00:00
|
|
|
border: 1px solid $color-grey-3;
|
2020-01-25 00:05:27 +00:00
|
|
|
}
|
|
|
|
|
|
2020-07-28 14:53:01 +00:00
|
|
|
.Draftail-ToolbarButton {
|
2022-02-04 11:57:55 +00:00
|
|
|
&:hover,
|
|
|
|
|
&:active {
|
|
|
|
|
border: 1px solid $color-grey-3;
|
|
|
|
|
}
|
2020-07-28 14:53:01 +00:00
|
|
|
}
|
|
|
|
|
|
2018-01-26 10:31:39 +00:00
|
|
|
.title .Draftail-Editor .public-DraftEditor-content,
|
|
|
|
|
.title .Draftail-Editor .public-DraftEditorPlaceholder-root {
|
2022-02-04 11:57:55 +00:00
|
|
|
font-size: 2em;
|
2018-01-18 12:43:15 +00:00
|
|
|
}
|
2019-03-15 00:39:18 +00:00
|
|
|
|
|
|
|
|
.Draftail-block--blockquote {
|
2022-02-04 11:57:55 +00:00
|
|
|
border-left: 0.25em solid $color-grey-3;
|
|
|
|
|
color: $color-grey-2;
|
|
|
|
|
margin: 1em 0;
|
|
|
|
|
padding: 1em 2em;
|
2019-03-15 00:39:18 +00:00
|
|
|
}
|