File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,10 +16,14 @@ body {
1616 background-color : var (--action-bg );
1717}
1818
19- .selected {
19+ .editorToolWrapper . selected {
2020 background-color : var (--action-bg );
2121}
2222
23+ # toolWindowHeader {
24+ background-color : var (--secondary-bg );
25+ }
26+
2327/* TOP BAR */
2428.cet-menubar-menu-button {
2529 cursor : pointer !important ;
Original file line number Diff line number Diff line change @@ -21,8 +21,6 @@ body, html {
2121
2222 height : 100% !important ;
2323
24- border : 1px solid;
25-
2624 display : flex;
2725 flex-direction : column;
2826
@@ -50,34 +48,45 @@ body, html {
5048 justify-content : space-between;
5149 width : fit-content;
5250 max-width : 50% ;
53-
54- border : 1px solid;
5551}
5652
5753# editorTools {
5854 border : 1px solid;
5955
6056 min-width : 50px ;
6157 max-width : 100% ;
62-
63- display : flex;
64- flex-direction : column;
65- align-items : center;
6658}
6759
6860# toolWindow {
69- padding : 5px ;
70-
7161 height : 100% ;
7262 max-width : 100% ;
7363
74- width : fit-content;
75-
76- display : flex;
77- justify-content : center;
64+ width : 40vw ;
7865
7966 resize : horizontal;
8067 overflow : auto;
68+
69+ border-left : 1px solid;
70+ }
71+
72+ # toolWindowHeader {
73+ display : flex;
74+ justify-content : space-between;
75+ border-bottom : 1px solid;
76+ }
77+
78+ # toolWindowTitle {
79+ display : flex;
80+ justify-content : space-between;
81+ align-items : center;
82+ padding : 5px ;
83+ margin-right : 5px ;
84+ }
85+
86+ # toolWindowButtons {
87+ padding : 5px ;
88+ display : flex;
89+ align-items : center;
8190}
8291
8392# toolWindowContent {
@@ -86,10 +95,11 @@ body, html {
8695}
8796
8897.editorToolWrapper {
89- width : min-content ;
98+ width : 100 % ;
9099 height : min-content;
91100 display : flex;
92101 justify-content : space-between;
102+ align-items : center;
93103
94104 padding : 5px ;
95105 writing-mode : vertical-lr;
@@ -104,15 +114,6 @@ body, html {
104114 margin : 5px ;
105115}
106116
107- .cm-theme-none {
108- width : 100% ;
109- height : 100% ;
110- }
111-
112- .cm-editor {
113- height : 100% ;
114- }
115-
116117# footer {
117118 font-size : 0.8rem ;
118119
Original file line number Diff line number Diff line change @@ -13,6 +13,8 @@ import {useEditorContext} from "./editor/EditorContext";
1313import { allPlugins } from "../../utils/PluginLoader" ;
1414import { ToolbarMenuItem } from "./editor/plugins" ;
1515import DOMPurify from "dompurify" ;
16+ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome" ;
17+ import { faTimesRectangle } from "@fortawesome/free-regular-svg-icons/faTimesRectangle" ;
1618
1719const debounceDelay = 200 ; // Delay in milliseconds
1820let changeDebounceTimer : NodeJS . Timeout ; // Timer for change event
@@ -172,6 +174,14 @@ export default function EditorContainer() {
172174 < div id = { "editorToolsWrapper" } >
173175 { activeTool &&
174176 < div id = { "toolWindow" } >
177+ < div id = { "toolWindowHeader" } >
178+ < div id = { "toolWindowButtons" } >
179+ < FontAwesomeIcon className = { "iconButton" } icon = { faTimesRectangle } onClick = { ( ) => setActiveTool ( undefined ) } />
180+ </ div >
181+ < div id = { "toolWindowTitle" } >
182+ < span > { activeTool . label } </ span >
183+ </ div >
184+ </ div >
175185 < div id = { "toolWindowContent" } >
176186 </ div >
177187 </ div >
Original file line number Diff line number Diff line change @@ -44,23 +44,39 @@ export default class PreviewPlugin implements EditorPlugin {
4444 * {
4545 font-size: 14px;
4646 }
47+
48+ .warning {
49+ padding: 5px;
50+ }
51+
4752 .warning, .warning > *{
4853 background-color: rgb(195,169,90) !important;
4954 color: black !important;
5055 }
56+
5157 #previewRefresh {
5258 transition: 0.2s all ease;
53- margin: 5px;
59+ margin: 5px 0 ;
5460 padding: 5px;
5561 border: 1px solid black;
5662 cursor: pointer;
5763 display: flex;
5864 align-items: center;
65+ background-color: darkgray;
66+ border-radius: 5px;
67+ color: black;
5968 }
69+
6070 #previewRefresh:hover {
6171 background-color: #cf681f !important;
6272 }
6373
74+ #previewButtons {
75+ display: flex;
76+ align-items: center;
77+ border-bottom: 1px solid;
78+ }
79+
6480 #previewContent {
6581 width: 100%;
6682 height: 100%;
@@ -70,9 +86,10 @@ export default class PreviewPlugin implements EditorPlugin {
7086 color: black;
7187 padding: 5px;
7288 box-sizing: border-box;
89+ overflow: auto;
7390 }
7491 </style>
75- <div id="previewButtons" style="display: flex; align-items: center; border-bottom: 1px solid; background-color: #323232;" >
92+ <div id="previewButtons">
7693 <div id="previewRefresh">
7794 <img src="${ refreshIcon } " alt="" width="20" style="margin: 0 5px"/>
7895 <span>Refresh</span>
You can’t perform that action at this time.
0 commit comments