markupeditor 0.9.13 → 0.9.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/config/behaviorconfig.json +1 -2
- package/config/keymapconfig.json +3 -3
- package/config/toolbarconfig.json +14 -4
- package/dist/markup-editor.js +110 -37
- package/package.json +1 -1
- package/styles/toolbar.css +64 -58
package/config/keymapconfig.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"undo": "Mod-z",
|
|
3
|
-
"redo": "Shift-
|
|
3
|
+
"redo": "Mod-Shift-z",
|
|
4
4
|
"link": ["Mod-K", "Mod-k"],
|
|
5
5
|
"p": "Ctrl-Shift-0",
|
|
6
6
|
"h1": "Ctrl-Shift-1",
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
"h6": "Ctrl-Shift-6",
|
|
12
12
|
"bullet": ["Ctrl-U", "Ctrl-u"],
|
|
13
13
|
"number": ["Ctrl-O", "Ctrl-o"],
|
|
14
|
-
"indent": ["Mod
|
|
15
|
-
"outdent": ["Mod
|
|
14
|
+
"indent": ["Mod->", "Mod-]"],
|
|
15
|
+
"outdent": ["Mod-<", "Mod-["],
|
|
16
16
|
"bold": ["Mod-B", "Mod-b"],
|
|
17
17
|
"italic": ["Mod-I", "Mod-i"],
|
|
18
18
|
"underline": ["Mod-U", "Mod-u"],
|
|
@@ -16,6 +16,11 @@
|
|
|
16
16
|
"formatBar": 50,
|
|
17
17
|
"search": 60
|
|
18
18
|
},
|
|
19
|
+
"menus": {
|
|
20
|
+
"styleName": true,
|
|
21
|
+
"tableHeader": true,
|
|
22
|
+
"tableBorder": true
|
|
23
|
+
},
|
|
19
24
|
"insertBar": {
|
|
20
25
|
"link": true,
|
|
21
26
|
"image": true,
|
|
@@ -44,10 +49,6 @@
|
|
|
44
49
|
"list": true,
|
|
45
50
|
"dent": true
|
|
46
51
|
},
|
|
47
|
-
"tableMenu": {
|
|
48
|
-
"header": true,
|
|
49
|
-
"border": true
|
|
50
|
-
},
|
|
51
52
|
"help": {
|
|
52
53
|
"style": "Set paragraph style",
|
|
53
54
|
"bold": "Toggle bold",
|
|
@@ -75,6 +76,15 @@
|
|
|
75
76
|
"prepend": null,
|
|
76
77
|
"append": null
|
|
77
78
|
},
|
|
79
|
+
"appearance": {
|
|
80
|
+
"accentColor": { "light": "blue", "dark": "lightblue" },
|
|
81
|
+
"toolbarBg": { "light": "rgba(250, 249, 246, 0.95)", "dark": "rgba(40, 40, 43, 0.9)" },
|
|
82
|
+
"buttonBg": { "light": "white", "dark": "black" },
|
|
83
|
+
"borderColor": { "light": "lightgray", "dark": "gray" },
|
|
84
|
+
"hoverBg": { "light": "#f2f2f2", "dark": "rgb(80, 80, 80)" },
|
|
85
|
+
"buttonSize": "28px",
|
|
86
|
+
"buttonFontSize": "24px"
|
|
87
|
+
},
|
|
78
88
|
"icons": {
|
|
79
89
|
"undo": "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 0 24 24\" width=\"24px\"><path d=\"M0 0h24v24H0V0z\" fill=\"none\"/><path d=\"M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z\"/></svg>",
|
|
80
90
|
"redo": "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 0 24 24\" width=\"24px\"><path d=\"M0 0h24v24H0V0z\" fill=\"none\"/><path d=\"M18.4 10.6C16.55 8.99 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16c1.05-3.19 4.05-5.5 7.6-5.5 1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z\"/></svg>",
|
package/dist/markup-editor.js
CHANGED
|
@@ -2,7 +2,7 @@ const sheet$2 = new CSSStyleSheet();sheet$2.replaceSync("/**\n The CSS here was
|
|
|
2
2
|
|
|
3
3
|
const sheet$1 = new CSSStyleSheet();sheet$1.replaceSync("#editor, .editor {\n font-family: system-ui, sans-serif;\n background: white;\n color: black;\n background-clip: padding-box;\n margin: -8px; /* Set so that the .ProseMirror padding starts from edges */\n --padBottom: 0; /* MU.padBottom() sets this value in px based on fullHeight */\n padding-block: 0 var(--padBottom);\n overflow-x: clip;\n overflow-y: scroll;\n height: 100vh;\n padding-right: 12px;\n}\n@media (prefers-color-scheme: dark) {\n #editor, .editor {\n background: black;\n color: white;\n }\n}\n\nbody {\n font-family: system-ui, sans-serif;\n}\n\na {\n color: blue;\n text-decoration: none;\n}\n@media (prefers-color-scheme: dark) {\n a {\n color: #4183c4;\n }\n}\n\na:hover {\n text-decoration: underline;\n}\n\np, pre {\n font-size: 1.0rem;\n}\n\np, ul, ol, dl, table, pre {\n margin: 0 0 15px;\n}\n\nul, ol {\n padding-left: 30px;\n}\n\nh1 {\n font-size: 2.5rem;\n}\n\nh2 {\n font-size: 2.0rem;\n}\n\nh3 {\n font-size: 1.5rem;\n}\n\nh4 {\n font-size: 1.2rem;\n}\n\nh5 {\n font-size: 1.0rem;\n}\n\nh6 {\n font-size: .83rem;\n}\n\nh1, h2, h3, h4, h5, h6 {\n font-weight: bold;\n margin: 0 0 10px 0;\n}\n\nh1 + p, h2 + p, h3 + p {\n margin-top: 10px;\n}\n\ntable {\n table-layout: fixed;\n border-collapse: collapse;\n width: 100%;\n}\n\ntable th, table td {\n padding: 4px;\n}\n\ntable th {\n font-weight: normal; /* The default is bold, but we want to use paragraph styles and formatting */\n}\n\n/* Make the styling compact inside of a table */\ntable p, table h1, table h2, table h3, table h4, table h5, table h6 {\n margin: 0;\n}\n\n/* Table bordering options */\n.bordered-table-none {\n border: none;\n}\n\n.bordered-table-outer, .bordered-table-header, .bordered-table-cell {\n border: 1px solid #DDD;\n}\n\n.bordered-table-header th { /* border th not thead to refresh properly */\n border: 1px solid #DDD;\n}\n\n.bordered-table-cell th, .bordered-table-cell td {\n border: 1px solid #DDD;\n}\n\n/* Default table bordering is same as .bordered-table-cell but is only used when not specified */\ntable:not(.bordered-table-none, .bordered-table-outer, .bordered-table-header, .bordered-table-cell) {\n border: 1px solid #DDD;\n}\n\ntable:not(.bordered-table-none, .bordered-table-outer, .bordered-table-header, .bordered-table-cell) td {\n border: 1px solid #DDD;\n}\n\ntable:not(.bordered-table-none, .bordered-table-outer, .bordered-table-header, .bordered-table-cell) th {\n border: 1px solid #DDD;\n}\n\nli p {\n margin: 0px 0;\n}\n\nblockquote {\n margin-right: 0px; /* Because nested blockquotes just keep getting narrower */\n}\n\ncode {\n overflow-x: scroll;\n display: block;\n background-color: #F8F8F8;\n border-radius: 3px;\n font-family: 'SF Mono', SFMono-Regular, ui-monospace, 'DejaVu Sans Mono', Menlo, Consolas, monospace;\n white-space: pre;\n}\n@media (prefers-color-scheme: dark) {\n code {\n background-color: #808080;\n }\n}\n\np code, h1 code, h2 code, h3 code, h4 code, h5 code, h6 code {\n display: inline;\n}\n\n.resize-container {\n position: relative;\n display: inline-block;\n margin: 0;\n}\n\nimg {\n max-width: 100%;\n height: auto;\n}\n\n/* Provide a slightly darkened or lightened overlay while search is active */\n.searching {\n background-color: rgba(0, 0, 0, 0.10);\n}\n@media (prefers-color-scheme: dark) {\n .searching {\n background: rgba(255, 255, 255, 0.10);\n }\n}\n\n.resize-container img {\n display: block;\n outline: 1px black dashed;\n outline-offset: 4px;\n outline-width: 1px;\n}\n@media (prefers-color-scheme: dark) {\n .resize-container img {\n outline: 1px white dashed;\n }\n}\n\n.resize-handle-nw,\n.resize-handle-ne,\n.resize-handle-sw,\n.resize-handle-se {\n position: absolute;\n display: block;\n width: 6px;\n height: 6px;\n outline: 1px black solid;\n background: white;\n z-index: 999;\n}\n@media (prefers-color-scheme: dark) {\n .resize-handle-nw,\n .resize-handle-ne,\n .resize-handle-sw,\n .resize-handle-se {\n outline: 1px white solid;\n background: black;\n }\n}\n\n/* A transparent child for each resize-handle that expands the clickable area */\n.resize-handle-nw:after,\n.resize-handle-ne:after,\n.resize-handle-sw:after,\n.resize-handle-se:after {\n content: \"\";\n position: absolute;\n left: -5px;\n top: -5px;\n width: 16px;\n height: 16px;\n}\n\n/* The *-resize cursors do not work, at least in MacCatalyst.\n * Still specifying them below. They default to a pointer instead\n */\n.resize-handle-nw {\n cursor: nw-resize;\n top: -8px;\n left: -7px;\n}\n\n.resize-handle-ne {\n cursor: ne-resize;\n top: -8px;\n right: -7px;\n}\n\n.resize-handle-sw {\n cursor: sw-resize;\n bottom: -8px;\n left: -7px;\n}\n\n.resize-handle-se {\n cursor: se-resize;\n bottom: -8px;\n right: -7px;\n}\n\n.placeholder[placeholder]:before {\n content: attr(placeholder);\n position: absolute;\n color: #ccc;\n}\n\n/* Classes set by prosemirror-search module, modified for MarkupEditor */\n/* Note the dark and light mode are the same */\n\n.ProseMirror-search-match {\n background-color: yellow;\n color: black;\n}\n\n.ProseMirror-active-search-match {\n background-color: orange;\n color: black;\n outline: 1px orangered solid;\n z-index: 2;\n}");
|
|
4
4
|
|
|
5
|
-
const sheet = new CSSStyleSheet();sheet.replaceSync("/* Spacing at the top */\n/* Note that toolbar-overlay below is also set to these values */\n\n.Markup-searchbar-showing {\n height: 38px;\n top: 76px;\n}\n\n/* The wrapper lets us automatically embed a toolbar and scroll under it */\n.Markup-toolbar-wrapper {\n margin-right: -12px; /* Prevent side scroll even when menu fits */\n height: inherit;\n overflow-y: scroll;\n position: relative; \n}\n\n/* We add Markup-prompt-showing to the wrapper to prevent scroll, and remove it when done */\n.Markup-prompt-showing {\n overflow-y: hidden;\n}\n\n/* Z-indexes in one place */\n\n.body-content { \n z-index: 1; \n}\n\n.Markup-prompt-overlay { \n z-index: 2; \n}\n\n.Markup-prompt, .Markup-selection {\n z-index: 3;\n}\n\n.Markup-searchbar {\n z-index: 4;\n}\n\n.Markup-toolbar, .Markup-toolbar-more {\n z-index: 5;\n}\n\n.Markup-toolbar-overlay { \n z-index: 6; \n}\n\n.Markup-menu-dropdown-menu {\n z-index: 7;\n}\n\n/* Toolbar, menu item, and dropdown styling */\n\n.Markup-toolbar {\n display: inline-flex;\n position: sticky;\n overflow: visible;\n width: 100%;\n font-size: 24px;\n vertical-align: middle;\n border-top-left-radius: inherit;\n border-top-right-radius: inherit;\n top: 0;\n max-height: 38px;\n padding: 2px 8px;\n color: blue;\n background: rgba(250, 249, 246, 0.95);\n border-bottom: 1px solid lightgray;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n}\n@media (prefers-color-scheme: dark) {\n .Markup-toolbar {\n color: rgb(250, 249, 246);\n background: rgba(40, 40, 43, 0.9);\n border-bottom: 1px solid gray;\n }\n}\n\n.Markup-menuitem {\n display: inline-block;\n flex-shrink: 0; /* Otherwise, the drop-downs with icons shrink */\n overflow-y: visible;\n vertical-align: middle;\n min-width: 28px;\n height: 28px;\n cursor: pointer;\n margin-right: 4px;\n border-radius: 4px;\n color: blue;\n border: 1px solid blue;\n background: white;\n fill: blue;\n}\n@media (prefers-color-scheme: dark) {\n .Markup-menuitem {\n color: lightblue;\n border: 1px solid lightblue; \n /* border: 1px solid #4183c4; */\n background: black;\n fill: lightblue;\n }\n}\n\n.Markup-menuitem-active {\n fill: white;\n color: white;\n background: blue;\n}\n@media (prefers-color-scheme: dark) {\n .Markup-menuitem-active {\n fill: black;\n color: black;\n background: lightblue;\n }\n}\n\n.Markup-menuitem-disabled {\n cursor: default;\n opacity: .3;\n}\n@media (prefers-color-scheme: dark) {\n .Markup-menuitem-disabled {\n opacity: .6;\n }\n}\n\n.Markup-icon {\n display: inline-block;\n width: 28px;\n height: 28px;\n border: 0;\n}\n\n.Markup-icon span {\n vertical-align: middle;\n}\n\n.Markup-icon svg {\n padding: 2px;\n border: 0;\n fill: inherit;\n}\n\n.Markup-menuseparator {\n display: inline-block;\n vertical-align: middle;\n height: 28px;\n border-right: 1px solid lightgray;\n margin-right: 4px;\n}\n@media (prefers-color-scheme: dark) {\n .Markup-menuseparator {\n border-right: 1px solid gray;\n }\n}\n\n.Markup-menu-disabled .Markup-icon {\n cursor: default;\n}\n\n.Markup-menu-dropdown, .Markup-menu-dropdown-menu {\n background: inherit;\n text-align: left;\n white-space: nowrap;\n}\n\n.Markup-menu-dropdown span {\n vertical-align: middle;\n}\n\n.Markup-menu-dropdown-icon span {\n vertical-align: middle;\n}\n\n.Markup-menu-dropdown-wrap {\n display: flex;\n justify-content: space-between;\n padding: 0 4px;\n height: inherit;\n border-radius: 4px;\n background: inherit;\n}\n\n.Markup-menu-dropdown-icon-wrap {\n display: flex;\n justify-content: space-between;\n padding-right: 4px;\n width: 1.8em;\n height: inherit;\n border-radius: 4px;\n background: inherit;\n}\n\n.Markup-menu-dropdown-icon-wrap-noindicator {\n display: inline-flex;\n padding-right: 4px;\n width: 1em;\n height: inherit;\n border-radius: 4px;\n background: inherit;\n}\n\n/* For the paragraph style dropdown with a label, make the font smaller */\n.Markup-menu-dropdown {\n display: flex;\n justify-content: space-between;\n align-items: center;\n box-sizing: border-box;\n font-size: 0.8em;\n width: inherit;\n height: inherit;\n background: inherit;\n position: absolute;\n}\n\n/* But for the indicator, bump size up to match the icon-style dropdown */\n.Markup-menu-dropdown .Markup-menu-dropdown-indicator {\n font-size: 1.25em;\n}\n\n.Markup-menu-dropdown-icon {\n display: inline-flex;\n justify-content: space-between;\n font-size: inherit;\n width: inherit;\n cursor: pointer;\n position: absolute;\n}\n\n.Markup-menu-dropdown-indicator {\n opacity: .6;\n}\n\n.Markup-tooltip .Markup-menu {\n width: -webkit-fit-content;\n width: fit-content;\n white-space: pre;\n}\n\n.Markup-menu-dropdown-menu, .Markup-menu-submenu {\n position: absolute;\n background: inherit;\n padding: 2px;\n background: inherit;\n border: 1px solid gray;\n}\n@media (prefers-color-scheme: dark) {\n .Markup-menu-dropdown-menu, .Markup-menu-submenu {\n border: 1px solid lightgray;\n }\n}\n\n.Markup-menu-dropdown-menu {\n margin-top: calc(1em + 6px);\n min-width: 4em;\n}\n\n.Markup-menu-dropdown-item {\n cursor: pointer;\n padding: 2px 8px 2px 4px;\n}\n\n/* Used to overlfow and ellipsis-truncate text in Dropdown menu items */\n.Markup-menuitem-clipped {\n white-space: nowrap; /* Required for text-overflow */\n overflow-x: hidden; /* Required for text-overflow */\n max-width: 30em;\n text-overflow: ellipsis;\n}\n\n.Markup-menu-dropdown-item:hover, .Markup-menu-submenu-wrap:hover {\n background: #f2f2f2;\n}\n@media (prefers-color-scheme: dark) {\n .Markup-menu-dropdown-item:hover, .Markup-menu-submenu-wrap:hover {\n background: rgb(80, 80, 80);\n }\n}\n\n.Markup-menu-dropdown-item p, \n.Markup-menu-dropdown-item h1, \n.Markup-menu-dropdown-item h2, \n.Markup-menu-dropdown-item h3, \n.Markup-menu-dropdown-item h4, \n.Markup-menu-dropdown-item h5, \n.Markup-menu-dropdown-item h6, \n.Markup-menu-dropdown-item pre {\n padding: 0;\n margin: 0;\n min-height: 24px;\n}\n\n.Markup-stylelabel {\n display: flex;\n justify-content: space-between;\n align-items: center;\n white-space: pre;\n width: 100%;\n}\n\n.Markup-stylelabel-keymap {\n display: flex;\n justify-content: flex-end;\n font-size: 1.0rem;\n font-weight: normal;\n color: gray;\n}\n\n.Markup-menu-submenu-wrap:hover .Markup-menu-submenu, .Markup-menu-submenu-wrap-active .Markup-menu-submenu {\n display: block;\n}\n\n.Markup-menu-submenu-wrap {\n position: relative;\n margin-right: -4px;\n background: inherit;\n}\n\n.Markup-menu-submenu {\n display: none;\n min-width: 4em;\n left: 100%;\n top: -5px;\n /* background cannot be inherited because of hover highlighting in dropdown */\n background: white;\n}\n@media (prefers-color-scheme: dark) {\n .Markup-menu-submenu {\n /* background cannot be inherited because of hover highlighting in dropdown */\n background: black;\n }\n}\n\n.Markup-menu-submenu-label:after {\n content: \"\";\n border-top: 4px solid transparent;\n border-bottom: 4px solid transparent;\n border-left: 4px solid currentColor;\n opacity: .6;\n position: absolute;\n right: 4px;\n top: calc(50% - 4px);\n}\n\n.Markup-selection {\n position: absolute;\n border: 1px solid blue;\n background: transparent;\n}\n@media (prefers-color-scheme: dark) {\n .Markup-selection {\n border: 1px solid lightblue;\n }\n}\n\n/* Toolbar-more styling */\n\n.Markup-toolbar-more {\n display: inline-flex;\n position: sticky;\n overflow: visible;\n width: 100%;\n font-size: 24px;\n vertical-align: middle;\n border-top-left-radius: inherit;\n border-top-right-radius: inherit;\n top: 35px;\n max-height: 38px;\n padding: 2px 8px;\n color: blue;\n background: rgba(250, 249, 246, 0.95);\n border-bottom: 1px solid lightgray;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n}\n@media (prefers-color-scheme: dark) {\n .Markup-toolbar-more {\n color: rgb(250, 249, 246);\n background: rgba(40, 40, 43, 0.9);\n border-bottom: 1px solid gray;\n }\n}\n\n/* Searchbar styling */\n\n.Markup-searchbar {\n display: inline-block;\n font-size: 24px;\n vertical-align: middle;\n position: sticky;\n top: 35px;\n width: 100%;\n line-height: 30px;\n height: 37px;\n color: blue;\n background: rgba(250, 249, 246, 0.95);\n border-bottom: 1px solid lightgray;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n overflow: hidden;\n}\n@media (prefers-color-scheme: dark) {\n .Markup-searchbar {\n color: rgb(250, 249, 246);\n background: rgba(40, 40, 43, 0.9);\n border-bottom: 1px solid gray;\n }\n}\n\n.Markup-searchbar input {\n appearance: none; /* Otherwise, in Safari/WebKit, the height is small and fixed */\n position: relative;\n font-size: 18px;\n line-height: 30px;\n height: 30px;\n width: calc(100% - 128px);\n margin: 0 8px;\n padding: 0 4px;\n outline: none;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n border: 1px solid lightgray;\n border-radius: 6px;\n}\n@media (prefers-color-scheme: dark) {\n .Markup-searchbar input {\n color: rgb(250, 249, 246);\n background: rgb(40, 40, 43);\n border: 1px solid gray;\n }\n}\n\n.Markup-searchbar .Markup-searchbar-status {\n position: absolute;\n display: flex;\n justify-content: flex-end;\n align-items: center;\n white-space: nowrap;\n font-size: 12px;\n overflow-x: visible;\n height: 28px;\n top: 5px;\n left: calc(100% - 13em);\n width: 1px;\n color: gray;\n user-select: none;\n}\n\n/* Dialog/prompt styling for insert/edit actions */\n\n.Markup-prompt-overlay {\n\tposition: fixed;\n\ttop: 0;\n\tleft: 0;\n\twidth: 100%;\n\theight: 100%;\n\tbackground-color: rgba(0, 0, 0, 0.2);\n}\n@media (prefers-color-scheme: dark) {\n .Markup-prompt-overlay {\n background-color: rgba(255, 255, 255, 0.2);\n }\n}\n\n.Markup-toolbar-overlay {\n\tposition: absolute;\n\ttop: 0;\n\tleft: 0;\n\twidth: 100%;\n\tbackground-color: rgba(0, 0, 0, 0.1);\n}\n@media (prefers-color-scheme: dark) {\n .Markup-toolbar-overlay {\n background-color: rgba(255, 255, 255, 0.1);\n }\n}\n\n.Markup-toolbar-overlay.Markup-searchbar-hidden {\n height: 38px;\n}\n\n.Markup-toolbar-overlay.Markup-searchbar-showing {\n height: 76px;\n}\n\n.Markup-prompt {\n margin: 0;\n font-size: 18px;\n background: white;\n padding: 8px;\n border: 1px solid silver;\n position: absolute;\n border-radius: 3px;\n box-shadow: -.5px 2px 5px rgba(0, 0, 0, 0.2);\n}\n@media (prefers-color-scheme: dark) {\n .Markup-prompt {\n background: black;\n box-shadow: -.5px 2px 5px rgba(255, 255, 255, 0.8);\n }\n}\n\n.Markup-prompt-link {\n height: 96px;\n width: 300px;\n}\n\n.Markup-prompt-image {\n height: 130px;\n width: 300px;\n}\n\n.Markup-prompt img {\n display: inline-block;\n vertical-align: middle;\n min-width: 28px;\n height: 28px;\n margin-right: 4px;\n}\n\n.Markup-prompt p {\n margin: 0 0 4px 0;\n font-weight: normal;\n color: black;\n}\n@media (prefers-color-scheme: dark) {\n .Markup-prompt p {\n color: white;\n }\n}\n\n.Markup-prompt input[type=\"text\"] {\n font-size: 100%;\n line-height: 28px;\n margin-top: 2px;\n padding: 1px 4px;\n width: 100%;\n appearance: none;\n background: #eee;\n outline: none;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n border: 1px solid lightgray;\n border-radius: 6px;\n}\n@media (prefers-color-scheme: dark) {\n .Markup-prompt input[type=\"text\"] {\n color: rgb(250, 249, 246);\n background: rgb(40, 40, 43);\n border: 1px solid gray;\n }\n}\n\n.Markup-prompt input.invalid {\n color: red;\n}\n@media (prefers-color-scheme: dark) {\n .Markup-prompt input.invalid {\n color: pink;\n }\n}\n\n.Markup-prompt-buttons {\n display: flex;\n vertical-align: middle;\n justify-content: space-between;\n justify-items: center;\n line-height: 28px;\n height: 28px;\n margin-top: 8px;\n margin-bottom: 8px;\n}\n\n.Markup-prompt-buttongroup {\n flex-shrink: 0;\n}\n\n.Markup-prompt-buttons img {\n aspect-ratio: auto;\n height: auto;\n object-fit: contain;\n}\n\n.Markup-prompt-buttons .Markup-menuitem {\n display: inline-flex;\n padding-right: 4px;\n padding-left: 4px;\n}\n\n/* The buttongroup contains OK and Cancel menuitems on the right */\n.Markup-prompt-buttongroup .Markup-menuitem {\n margin-right: 0;\n margin-left: 4px;\n}\n\n/* .Markup-menu-tablesizer is a specialized submenu */\n.Markup-menu-tablesizer {\n display: none;\n grid-template-columns: repeat(4, 1fr);\n grid-auto-rows: 18px;\n row-gap: 1px;\n column-gap: 1px;\n padding: 0;\n left: 100%;\n top: -5px;\n /* background cannot be inherited because of hover highlighting in dropdown */\n background: white;\n}\n@media (prefers-color-scheme: dark) {\n .Markup-menu-tablesizer {\n /* background cannot be inherited because of hover highlighting in dropdown */\n background: black;\n }\n}\n\n.Markup-menu-submenu-wrap:hover .Markup-menu-tablesizer, .Markup-menu-submenu-wrap-active .Markup-menu-tablesizer {\n display: grid;\n}\n\n.Markup-menu-dropdown-menu, .Markup-menu-tablesizer {\n position: absolute;\n background: inherit;\n padding: 2px;\n background: inherit;\n border: 1px solid gray;\n}\n@media (prefers-color-scheme: dark) {\n .Markup-menu-dropdown-menu, .Markup-menu-submenu {\n border: 1px solid lightgray;\n }\n}\n\n.Markup-menu-tablesizer .Markup-menu-dropdown-item {\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n border: 1px solid blue;\n width: 18px;\n height: 18px;\n padding: 0;\n font-size: 13px;\n}\n@media (prefers-color-scheme: dark) {\n .Markup-menu-tablesizer .Markup-menu-dropdown-item {\n border: 1px solid lightblue;\n }\n}\n\n.Markup-menu-tablesizer .Markup-menuitem-active {\n height: 13px;\n padding-top: 3px;\n fill: black;\n color: black;\n background: blue;\n}\n@media (prefers-color-scheme: dark) {\n .Markup-menu-tablesizer .Markup-menuitem-active {\n fill: black;\n color: black;\n background: lightblue;\n }\n}");
|
|
5
|
+
const sheet = new CSSStyleSheet();sheet.replaceSync("/* Spacing at the top */\n/* Note that toolbar-overlay below is also set to these values */\n\n.Markup-searchbar-showing {\n height: 38px;\n top: 76px;\n}\n\n/* The wrapper lets us automatically embed a toolbar and scroll under it */\n.Markup-toolbar-wrapper {\n margin-right: -12px; /* Prevent side scroll even when menu fits */\n height: inherit;\n overflow-y: scroll;\n position: relative; \n}\n\n/* We add Markup-prompt-showing to the wrapper to prevent scroll, and remove it when done */\n.Markup-prompt-showing {\n overflow-y: hidden;\n}\n\n/* Z-indexes in one place */\n\n.body-content { \n z-index: 1; \n}\n\n.Markup-prompt-overlay { \n z-index: 2; \n}\n\n.Markup-prompt, .Markup-selection {\n z-index: 3;\n}\n\n.Markup-searchbar {\n z-index: 4;\n}\n\n.Markup-toolbar, .Markup-toolbar-more {\n z-index: 5;\n}\n\n.Markup-toolbar-overlay { \n z-index: 6; \n}\n\n.Markup-menu-dropdown-menu {\n z-index: 7;\n}\n\n/* Toolbar, menu item, and dropdown styling */\n\n.Markup-toolbar {\n display: inline-flex;\n position: sticky;\n overflow: visible;\n width: 100%;\n font-size: var(--Markup-button-font-size, 24px);\n vertical-align: middle;\n border-top-left-radius: inherit;\n border-top-right-radius: inherit;\n top: 0;\n max-height: calc(var(--Markup-button-size, 28px) + 10px);\n padding: 2px 8px;\n color: var(--Markup-accent-color, blue);\n background: var(--Markup-toolbar-bg, rgba(250, 249, 246, 0.95));\n border-bottom: 1px solid var(--Markup-border-color, lightgray);\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n}\n@media (prefers-color-scheme: dark) {\n .Markup-toolbar {\n color: var(--Markup-accent-color, lightblue);\n background: var(--Markup-toolbar-bg, rgba(40, 40, 43, 0.9));\n border-bottom: 1px solid var(--Markup-border-color, gray);\n }\n}\n\n.Markup-toolbar-hidden {\n display: none;\n}\n\n.Markup-menuitem {\n display: inline-block;\n flex-shrink: 0; /* Otherwise, the drop-downs with icons shrink */\n overflow-y: visible;\n vertical-align: middle;\n min-width: var(--Markup-button-size, 28px);\n height: var(--Markup-button-size, 28px);\n cursor: pointer;\n margin-right: 4px;\n border-radius: 4px;\n color: var(--Markup-accent-color, blue);\n border: 1px solid var(--Markup-accent-color, blue);\n background: var(--Markup-button-bg, white);\n fill: var(--Markup-accent-color, blue);\n}\n@media (prefers-color-scheme: dark) {\n .Markup-menuitem {\n color: var(--Markup-accent-color, lightblue);\n border: 1px solid var(--Markup-accent-color, lightblue);\n /* border: 1px solid #4183c4; */\n background: var(--Markup-button-bg, black);\n fill: var(--Markup-accent-color, lightblue);\n }\n}\n\n.Markup-menuitem-active {\n fill: white;\n color: white;\n background: var(--Markup-accent-color, blue);\n}\n@media (prefers-color-scheme: dark) {\n .Markup-menuitem-active {\n fill: black;\n color: black;\n background: var(--Markup-accent-color, lightblue);\n }\n}\n\n.Markup-menuitem-disabled {\n cursor: default;\n opacity: .3;\n}\n@media (prefers-color-scheme: dark) {\n .Markup-menuitem-disabled {\n opacity: .6;\n }\n}\n\n.Markup-icon {\n display: inline-block;\n width: var(--Markup-button-size, 28px);\n height: var(--Markup-button-size, 28px);\n border: 0;\n}\n\n.Markup-icon span {\n vertical-align: middle;\n}\n\n.Markup-icon svg {\n width: var(--Markup-button-font-size, 24px);\n height: var(--Markup-button-font-size, 24px);\n padding: 2px;\n border: 0;\n fill: inherit;\n}\n\n.Markup-menuseparator {\n display: inline-block;\n vertical-align: middle;\n height: var(--Markup-button-size, 28px);\n border-right: 1px solid var(--Markup-border-color, lightgray);\n margin-right: 4px;\n}\n@media (prefers-color-scheme: dark) {\n .Markup-menuseparator {\n border-right: 1px solid var(--Markup-border-color, gray);\n }\n}\n\n.Markup-menu-disabled .Markup-icon {\n cursor: default;\n}\n\n.Markup-menu-dropdown, .Markup-menu-dropdown-menu {\n background: inherit;\n text-align: left;\n white-space: nowrap;\n}\n\n.Markup-menu-dropdown span {\n vertical-align: middle;\n}\n\n.Markup-menu-dropdown-icon span {\n vertical-align: middle;\n}\n\n.Markup-menu-dropdown-wrap {\n display: flex;\n justify-content: space-between;\n padding: 0 4px;\n height: inherit;\n border-radius: 4px;\n background: inherit;\n}\n\n.Markup-menu-dropdown-icon-wrap {\n display: flex;\n justify-content: space-between;\n padding-right: 4px;\n width: 1.8em;\n height: inherit;\n border-radius: 4px;\n background: inherit;\n}\n\n.Markup-menu-dropdown-icon-wrap-noindicator {\n display: inline-flex;\n padding-right: 4px;\n width: 1em;\n height: inherit;\n border-radius: 4px;\n background: inherit;\n}\n\n/* For the paragraph style dropdown with a label, make the font smaller */\n.Markup-menu-dropdown {\n display: flex;\n justify-content: space-between;\n align-items: center;\n box-sizing: border-box;\n font-size: 0.8em;\n width: inherit;\n height: inherit;\n background: inherit;\n position: absolute;\n}\n\n/* But for the indicator, bump size up to match the icon-style dropdown */\n.Markup-menu-dropdown .Markup-menu-dropdown-indicator {\n font-size: 1.25em;\n}\n\n.Markup-menu-dropdown-icon {\n display: inline-flex;\n justify-content: space-between;\n font-size: inherit;\n width: inherit;\n cursor: pointer;\n position: absolute;\n}\n\n.Markup-menu-dropdown-indicator {\n opacity: .6;\n}\n\n.Markup-tooltip .Markup-menu {\n width: -webkit-fit-content;\n width: fit-content;\n white-space: pre;\n}\n\n.Markup-menu-dropdown-menu, .Markup-menu-submenu {\n position: absolute;\n background: inherit;\n padding: 2px;\n background: inherit;\n border: 1px solid var(--Markup-border-color, gray);\n}\n@media (prefers-color-scheme: dark) {\n .Markup-menu-dropdown-menu, .Markup-menu-submenu {\n border: 1px solid var(--Markup-border-color, lightgray);\n }\n}\n\n.Markup-menu-dropdown-menu {\n margin-top: calc(1em + 6px);\n min-width: 4em;\n}\n\n.Markup-menu-dropdown-item {\n cursor: pointer;\n padding: 2px 8px 2px 4px;\n}\n\n/* Used to overlfow and ellipsis-truncate text in Dropdown menu items */\n.Markup-menuitem-clipped {\n white-space: nowrap; /* Required for text-overflow */\n overflow-x: hidden; /* Required for text-overflow */\n max-width: 30em;\n text-overflow: ellipsis;\n}\n\n.Markup-menu-dropdown-item:hover, .Markup-menu-submenu-wrap:hover {\n background: var(--Markup-hover-bg, #f2f2f2);\n}\n@media (prefers-color-scheme: dark) {\n .Markup-menu-dropdown-item:hover, .Markup-menu-submenu-wrap:hover {\n background: var(--Markup-hover-bg, rgb(80, 80, 80));\n }\n}\n\n.Markup-menu-dropdown-item p, \n.Markup-menu-dropdown-item h1, \n.Markup-menu-dropdown-item h2, \n.Markup-menu-dropdown-item h3, \n.Markup-menu-dropdown-item h4, \n.Markup-menu-dropdown-item h5, \n.Markup-menu-dropdown-item h6, \n.Markup-menu-dropdown-item pre {\n padding: 0;\n margin: 0;\n min-height: 24px;\n}\n\n.Markup-stylelabel {\n display: flex;\n justify-content: space-between;\n align-items: center;\n white-space: pre;\n width: 100%;\n}\n\n.Markup-stylelabel-keymap {\n display: flex;\n justify-content: flex-end;\n font-size: 1.0rem;\n font-weight: normal;\n color: gray;\n}\n\n.Markup-menu-submenu-wrap:hover .Markup-menu-submenu, .Markup-menu-submenu-wrap-active .Markup-menu-submenu {\n display: block;\n}\n\n.Markup-menu-submenu-wrap {\n position: relative;\n margin-right: -4px;\n background: inherit;\n}\n\n.Markup-menu-submenu {\n display: none;\n min-width: 4em;\n left: 100%;\n top: -5px;\n /* background cannot be inherited because of hover highlighting in dropdown */\n background: var(--Markup-button-bg, white);\n}\n@media (prefers-color-scheme: dark) {\n .Markup-menu-submenu {\n /* background cannot be inherited because of hover highlighting in dropdown */\n background: var(--Markup-button-bg, black);\n }\n}\n\n.Markup-menu-submenu-label:after {\n content: \"\";\n border-top: 4px solid transparent;\n border-bottom: 4px solid transparent;\n border-left: 4px solid currentColor;\n opacity: .6;\n position: absolute;\n right: 4px;\n top: calc(50% - 4px);\n}\n\n.Markup-selection {\n position: absolute;\n border: 1px solid var(--Markup-accent-color, blue);\n background: transparent;\n}\n@media (prefers-color-scheme: dark) {\n .Markup-selection {\n border: 1px solid var(--Markup-accent-color, lightblue);\n }\n}\n\n/* Toolbar-more styling */\n\n.Markup-toolbar-more {\n display: inline-flex;\n position: sticky;\n overflow: visible;\n width: 100%;\n font-size: var(--Markup-button-font-size, 24px);\n vertical-align: middle;\n border-top-left-radius: inherit;\n border-top-right-radius: inherit;\n top: calc(var(--Markup-button-size, 28px) + 7px);\n max-height: calc(var(--Markup-button-size, 28px) + 10px);\n padding: 2px 8px;\n color: var(--Markup-accent-color, blue);\n background: var(--Markup-toolbar-bg, rgba(250, 249, 246, 0.95));\n border-bottom: 1px solid var(--Markup-border-color, lightgray);\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n}\n@media (prefers-color-scheme: dark) {\n .Markup-toolbar-more {\n color: var(--Markup-accent-color, lightblue);\n background: var(--Markup-toolbar-bg, rgba(40, 40, 43, 0.9));\n border-bottom: 1px solid var(--Markup-border-color, gray);\n }\n}\n\n/* Searchbar styling */\n\n.Markup-searchbar {\n display: inline-block;\n font-size: var(--Markup-button-font-size, 24px);\n vertical-align: middle;\n position: sticky;\n top: calc(var(--Markup-button-size, 28px) + 7px);\n width: 100%;\n line-height: 30px;\n height: 37px;\n color: var(--Markup-accent-color, blue);\n background: var(--Markup-toolbar-bg, rgba(250, 249, 246, 0.95));\n border-bottom: 1px solid var(--Markup-border-color, lightgray);\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n overflow: hidden;\n}\n@media (prefers-color-scheme: dark) {\n .Markup-searchbar {\n color: var(--Markup-accent-color, lightblue);\n background: var(--Markup-toolbar-bg, rgba(40, 40, 43, 0.9));\n border-bottom: 1px solid var(--Markup-border-color, gray);\n }\n}\n\n.Markup-searchbar input {\n appearance: none; /* Otherwise, in Safari/WebKit, the height is small and fixed */\n position: relative;\n font-size: 18px;\n line-height: 30px;\n height: 30px;\n width: calc(100% - 128px);\n margin: 0 8px;\n padding: 0 4px;\n outline: none;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n border: 1px solid lightgray;\n border-radius: 6px;\n}\n@media (prefers-color-scheme: dark) {\n .Markup-searchbar input {\n color: rgb(250, 249, 246);\n background: rgb(40, 40, 43);\n border: 1px solid gray;\n }\n}\n\n.Markup-searchbar .Markup-searchbar-status {\n position: absolute;\n display: flex;\n justify-content: flex-end;\n align-items: center;\n white-space: nowrap;\n font-size: 12px;\n overflow-x: visible;\n height: 28px;\n top: 5px;\n left: calc(100% - 13em);\n width: 1px;\n color: gray;\n user-select: none;\n}\n\n/* Dialog/prompt styling for insert/edit actions */\n\n.Markup-prompt-overlay {\n\tposition: fixed;\n\ttop: 0;\n\tleft: 0;\n\twidth: 100%;\n\theight: 100%;\n\tbackground-color: rgba(0, 0, 0, 0.2);\n}\n@media (prefers-color-scheme: dark) {\n .Markup-prompt-overlay {\n background-color: rgba(255, 255, 255, 0.2);\n }\n}\n\n.Markup-toolbar-overlay {\n\tposition: absolute;\n\ttop: 0;\n\tleft: 0;\n\twidth: 100%;\n\tbackground-color: rgba(0, 0, 0, 0.1);\n}\n@media (prefers-color-scheme: dark) {\n .Markup-toolbar-overlay {\n background-color: rgba(255, 255, 255, 0.1);\n }\n}\n\n.Markup-toolbar-overlay.Markup-searchbar-hidden {\n height: 38px;\n}\n\n.Markup-toolbar-overlay.Markup-searchbar-showing {\n height: 76px;\n}\n\n.Markup-prompt {\n margin: 0;\n font-size: 18px;\n background: white;\n padding: 8px;\n border: 1px solid silver;\n position: absolute;\n border-radius: 3px;\n box-shadow: -.5px 2px 5px rgba(0, 0, 0, 0.2);\n}\n@media (prefers-color-scheme: dark) {\n .Markup-prompt {\n background: black;\n box-shadow: -.5px 2px 5px rgba(255, 255, 255, 0.8);\n }\n}\n\n.Markup-prompt-link {\n height: 96px;\n width: 300px;\n}\n\n.Markup-prompt-image {\n height: 130px;\n width: 300px;\n}\n\n.Markup-prompt img {\n display: inline-block;\n vertical-align: middle;\n min-width: 28px;\n height: 28px;\n margin-right: 4px;\n}\n\n.Markup-prompt p {\n margin: 0 0 4px 0;\n font-weight: normal;\n color: black;\n}\n@media (prefers-color-scheme: dark) {\n .Markup-prompt p {\n color: white;\n }\n}\n\n.Markup-prompt input[type=\"text\"] {\n font-size: 100%;\n line-height: 28px;\n margin-top: 2px;\n padding: 1px 4px;\n width: 100%;\n appearance: none;\n background: #eee;\n outline: none;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n border: 1px solid lightgray;\n border-radius: 6px;\n}\n@media (prefers-color-scheme: dark) {\n .Markup-prompt input[type=\"text\"] {\n color: rgb(250, 249, 246);\n background: rgb(40, 40, 43);\n border: 1px solid gray;\n }\n}\n\n.Markup-prompt input.invalid {\n color: red;\n}\n@media (prefers-color-scheme: dark) {\n .Markup-prompt input.invalid {\n color: pink;\n }\n}\n\n.Markup-prompt-buttons {\n display: flex;\n vertical-align: middle;\n justify-content: space-between;\n justify-items: center;\n line-height: 28px;\n height: 28px;\n margin-top: 8px;\n margin-bottom: 8px;\n}\n\n.Markup-prompt-buttongroup {\n flex-shrink: 0;\n}\n\n.Markup-prompt-buttons img {\n aspect-ratio: auto;\n height: auto;\n object-fit: contain;\n}\n\n.Markup-prompt-buttons .Markup-menuitem {\n display: inline-flex;\n padding-right: 4px;\n padding-left: 4px;\n}\n\n/* The buttongroup contains OK and Cancel menuitems on the right */\n.Markup-prompt-buttongroup .Markup-menuitem {\n margin-right: 0;\n margin-left: 4px;\n}\n\n/* .Markup-menu-tablesizer is a specialized submenu */\n.Markup-menu-tablesizer {\n display: none;\n grid-template-columns: repeat(4, 1fr);\n grid-auto-rows: 18px;\n row-gap: 1px;\n column-gap: 1px;\n padding: 0;\n left: 100%;\n top: -5px;\n /* background cannot be inherited because of hover highlighting in dropdown */\n background: var(--Markup-button-bg, white);\n}\n@media (prefers-color-scheme: dark) {\n .Markup-menu-tablesizer {\n /* background cannot be inherited because of hover highlighting in dropdown */\n background: var(--Markup-button-bg, black);\n }\n}\n\n.Markup-menu-submenu-wrap:hover .Markup-menu-tablesizer, .Markup-menu-submenu-wrap-active .Markup-menu-tablesizer {\n display: grid;\n}\n\n.Markup-menu-dropdown-menu, .Markup-menu-tablesizer {\n position: absolute;\n background: inherit;\n padding: 2px;\n background: inherit;\n border: 1px solid var(--Markup-border-color, gray);\n}\n@media (prefers-color-scheme: dark) {\n .Markup-menu-dropdown-menu, .Markup-menu-submenu {\n border: 1px solid var(--Markup-border-color, lightgray);\n }\n}\n\n.Markup-menu-tablesizer .Markup-menu-dropdown-item {\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n border: 1px solid var(--Markup-accent-color, blue);\n width: 18px;\n height: 18px;\n padding: 0;\n font-size: 13px;\n}\n@media (prefers-color-scheme: dark) {\n .Markup-menu-tablesizer .Markup-menu-dropdown-item {\n border: 1px solid var(--Markup-accent-color, lightblue);\n }\n}\n\n.Markup-menu-tablesizer .Markup-menuitem-active {\n height: 13px;\n padding-top: 3px;\n fill: black;\n color: black;\n background: var(--Markup-accent-color, blue);\n}\n@media (prefers-color-scheme: dark) {\n .Markup-menu-tablesizer .Markup-menuitem-active {\n fill: black;\n color: black;\n background: var(--Markup-accent-color, lightblue);\n }\n}");
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* The registry used to hold delegates, configs, handlers, and
|
|
@@ -19574,6 +19574,11 @@ var ordering = {
|
|
|
19574
19574
|
formatBar: 50,
|
|
19575
19575
|
search: 60
|
|
19576
19576
|
};
|
|
19577
|
+
var menus = {
|
|
19578
|
+
styleName: true,
|
|
19579
|
+
tableHeader: true,
|
|
19580
|
+
tableBorder: true
|
|
19581
|
+
};
|
|
19577
19582
|
var insertBar = {
|
|
19578
19583
|
link: true,
|
|
19579
19584
|
image: true,
|
|
@@ -19602,10 +19607,6 @@ var styleBar = {
|
|
|
19602
19607
|
list: true,
|
|
19603
19608
|
dent: true
|
|
19604
19609
|
};
|
|
19605
|
-
var tableMenu = {
|
|
19606
|
-
header: true,
|
|
19607
|
-
border: true
|
|
19608
|
-
};
|
|
19609
19610
|
var help = {
|
|
19610
19611
|
style: "Set paragraph style",
|
|
19611
19612
|
bold: "Toggle bold",
|
|
@@ -19633,6 +19634,30 @@ var augmentation = {
|
|
|
19633
19634
|
prepend: null,
|
|
19634
19635
|
append: null
|
|
19635
19636
|
};
|
|
19637
|
+
var appearance = {
|
|
19638
|
+
accentColor: {
|
|
19639
|
+
light: "blue",
|
|
19640
|
+
dark: "lightblue"
|
|
19641
|
+
},
|
|
19642
|
+
toolbarBg: {
|
|
19643
|
+
light: "rgba(250, 249, 246, 0.95)",
|
|
19644
|
+
dark: "rgba(40, 40, 43, 0.9)"
|
|
19645
|
+
},
|
|
19646
|
+
buttonBg: {
|
|
19647
|
+
light: "white",
|
|
19648
|
+
dark: "black"
|
|
19649
|
+
},
|
|
19650
|
+
borderColor: {
|
|
19651
|
+
light: "lightgray",
|
|
19652
|
+
dark: "gray"
|
|
19653
|
+
},
|
|
19654
|
+
hoverBg: {
|
|
19655
|
+
light: "#f2f2f2",
|
|
19656
|
+
dark: "rgb(80, 80, 80)"
|
|
19657
|
+
},
|
|
19658
|
+
buttonSize: "28px",
|
|
19659
|
+
buttonFontSize: "24px"
|
|
19660
|
+
};
|
|
19636
19661
|
var icons = {
|
|
19637
19662
|
undo: "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 0 24 24\" width=\"24px\"><path d=\"M0 0h24v24H0V0z\" fill=\"none\"/><path d=\"M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z\"/></svg>",
|
|
19638
19663
|
redo: "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 0 24 24\" width=\"24px\"><path d=\"M0 0h24v24H0V0z\" fill=\"none\"/><path d=\"M18.4 10.6C16.55 8.99 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16c1.05-3.19 4.05-5.5 7.6-5.5 1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z\"/></svg>",
|
|
@@ -19660,13 +19685,14 @@ var icons = {
|
|
|
19660
19685
|
var toolbarConfig = {
|
|
19661
19686
|
visibility: visibility,
|
|
19662
19687
|
ordering: ordering,
|
|
19688
|
+
menus: menus,
|
|
19663
19689
|
insertBar: insertBar,
|
|
19664
19690
|
formatBar: formatBar,
|
|
19665
19691
|
styleMenu: styleMenu,
|
|
19666
19692
|
styleBar: styleBar,
|
|
19667
|
-
tableMenu: tableMenu,
|
|
19668
19693
|
help: help,
|
|
19669
19694
|
augmentation: augmentation,
|
|
19695
|
+
appearance: appearance,
|
|
19670
19696
|
icons: icons
|
|
19671
19697
|
};
|
|
19672
19698
|
|
|
@@ -19721,6 +19747,11 @@ var toolbarConfig = {
|
|
|
19721
19747
|
* "formatBar": 50, // Format bar (b, i, u, etc) order if it is visible
|
|
19722
19748
|
* "search": 60, // Search item (hide/show search bar) order if it is visible
|
|
19723
19749
|
* },
|
|
19750
|
+
* "menus": {
|
|
19751
|
+
* "styleName": true // Whether to show the style name or just use a paragraph symbol
|
|
19752
|
+
* "tableHeader": true, // Whether the "Header" item is visible in the "Table->Add" menu
|
|
19753
|
+
* "tableBorder": true, // Whether the "Border" item is visible in the "Table" menu
|
|
19754
|
+
* },
|
|
19724
19755
|
* "insertBar": {
|
|
19725
19756
|
* "link": true, // Whether the link menu item is visible
|
|
19726
19757
|
* "image": true, // Whether the image menu item is visible
|
|
@@ -19749,14 +19780,19 @@ var toolbarConfig = {
|
|
|
19749
19780
|
* "list": true, // Whether bullet and numbered list items are visible
|
|
19750
19781
|
* "dent": true, // Whether indent and outdent items are visible
|
|
19751
19782
|
* },
|
|
19752
|
-
* "tableMenu": {
|
|
19753
|
-
* "header": true, // Whether the "Header" item is visible in the "Table->Add" menu
|
|
19754
|
-
* "border": true, // Whether the "Border" item is visible in the "Table" menu
|
|
19755
|
-
* },
|
|
19756
19783
|
* "augmentation": {
|
|
19757
19784
|
* "prepend": null, // Name of a registered array of cmdItems to prepend
|
|
19758
19785
|
* "append": null // Name of a registered array of cmdItems to append
|
|
19759
19786
|
* },
|
|
19787
|
+
* "appearance": { // Colors (light and dark mode) and sizes, vars in toolbar.css
|
|
19788
|
+
* "accentColor": { "light": "blue", "dark": "lightblue" },
|
|
19789
|
+
* "toolbarBg": { "light": "rgba(250, 249, 246, 0.95)", "dark": "rgba(40, 40, 43, 0.9)" },
|
|
19790
|
+
* "buttonBg": { "light": "white", "dark": "black" },
|
|
19791
|
+
* "borderColor": { "light": "lightgray", "dark": "gray" },
|
|
19792
|
+
* "hoverBg": { "light": "#f2f2f2", "dark": "rgb(80, 80, 80)" },
|
|
19793
|
+
* "buttonSize": "28px",
|
|
19794
|
+
* "buttonFontSize": "24px"
|
|
19795
|
+
* },
|
|
19760
19796
|
* "icons": { // Outlined 400 weight versions from https://fonts.google.com/icons
|
|
19761
19797
|
* // undo
|
|
19762
19798
|
* "undo": "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 0 24 24\" width=\"24px\"><path d=\"M0 0h24v24H0V0z\" fill=\"none\"/><path d=\"M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z\"/></svg>",
|
|
@@ -19893,7 +19929,7 @@ class ToolbarConfig {
|
|
|
19893
19929
|
}
|
|
19894
19930
|
|
|
19895
19931
|
var undo = "Mod-z";
|
|
19896
|
-
var redo = "Shift-
|
|
19932
|
+
var redo = "Mod-Shift-z";
|
|
19897
19933
|
var link = [
|
|
19898
19934
|
"Mod-K",
|
|
19899
19935
|
"Mod-k"
|
|
@@ -19914,12 +19950,12 @@ var number = [
|
|
|
19914
19950
|
"Ctrl-o"
|
|
19915
19951
|
];
|
|
19916
19952
|
var indent = [
|
|
19917
|
-
"Mod
|
|
19918
|
-
"
|
|
19953
|
+
"Mod->",
|
|
19954
|
+
"Mod-]"
|
|
19919
19955
|
];
|
|
19920
19956
|
var outdent = [
|
|
19921
|
-
"Mod
|
|
19922
|
-
"
|
|
19957
|
+
"Mod-<",
|
|
19958
|
+
"Mod-["
|
|
19923
19959
|
];
|
|
19924
19960
|
var bold = [
|
|
19925
19961
|
"Mod-B",
|
|
@@ -20096,13 +20132,11 @@ var focusAfterLoad = true;
|
|
|
20096
20132
|
var selectImage = false;
|
|
20097
20133
|
var insertLink = false;
|
|
20098
20134
|
var insertImage = false;
|
|
20099
|
-
var showStyle = true;
|
|
20100
20135
|
var behaviorConfig = {
|
|
20101
20136
|
focusAfterLoad: focusAfterLoad,
|
|
20102
20137
|
selectImage: selectImage,
|
|
20103
20138
|
insertLink: insertLink,
|
|
20104
|
-
insertImage: insertImage
|
|
20105
|
-
showStyle: showStyle
|
|
20139
|
+
insertImage: insertImage
|
|
20106
20140
|
};
|
|
20107
20141
|
|
|
20108
20142
|
/**
|
|
@@ -20141,7 +20175,6 @@ var behaviorConfig = {
|
|
|
20141
20175
|
* "selectImage": false, // Whether to show a "Select..." button in the Insert Image dialog
|
|
20142
20176
|
* "insertLink": false, // Whether to defer to the MarkupDelegate rather than use the default LinkDialog
|
|
20143
20177
|
* "insertImage": false, // Whether to defer to the MarkupDelagate rather than use the default ImageDialog
|
|
20144
|
-
* "showStyle": true // Whether to show the selected style in a labeled drop-down rather than a (smaller) icon
|
|
20145
20178
|
* }
|
|
20146
20179
|
* ```
|
|
20147
20180
|
*/
|
|
@@ -22819,14 +22852,14 @@ function tableMenuItems(config) {
|
|
|
22819
22852
|
let icons = config.toolbar.icons;
|
|
22820
22853
|
let help = config.toolbar.help;
|
|
22821
22854
|
let items = [];
|
|
22822
|
-
let {
|
|
22855
|
+
let { tableHeader, tableBorder } = config.toolbar.menus;
|
|
22823
22856
|
items.push(new TableCreateSubmenu({title: 'Insert table', label: 'Insert'}));
|
|
22824
22857
|
let addItems = [];
|
|
22825
22858
|
addItems.push(tableEditItem(addRowCommand('BEFORE'), {label: 'Row above'}));
|
|
22826
22859
|
addItems.push(tableEditItem(addRowCommand('AFTER'), {label: 'Row below'}));
|
|
22827
22860
|
addItems.push(tableEditItem(addColCommand('BEFORE'), {label: 'Column before'}));
|
|
22828
22861
|
addItems.push(tableEditItem(addColCommand('AFTER'), {label: 'Column after'}));
|
|
22829
|
-
if (
|
|
22862
|
+
if (tableHeader) addItems.push(
|
|
22830
22863
|
tableEditItem(
|
|
22831
22864
|
addHeaderCommand(), {
|
|
22832
22865
|
label: 'Header',
|
|
@@ -22848,7 +22881,7 @@ function tableMenuItems(config) {
|
|
|
22848
22881
|
label: 'Delete',
|
|
22849
22882
|
enable: (state) => { return isTableSelected(state) }
|
|
22850
22883
|
}));
|
|
22851
|
-
if (
|
|
22884
|
+
if (tableBorder) {
|
|
22852
22885
|
let borderItems = [];
|
|
22853
22886
|
borderItems.push(tableBorderItem(setBorderCommand('cell'), {label: 'All'}));
|
|
22854
22887
|
borderItems.push(tableBorderItem(setBorderCommand('outer'), {label: 'Outer'}));
|
|
@@ -22999,9 +23032,10 @@ function formatItem(markType, markName, options) {
|
|
|
22999
23032
|
*/
|
|
23000
23033
|
function styleMenuItems(config, schema) {
|
|
23001
23034
|
let keymap = config.keymap;
|
|
23035
|
+
let toolbar = config.toolbar;
|
|
23002
23036
|
let help = config.toolbar.help;
|
|
23003
23037
|
let items = [];
|
|
23004
|
-
let { p, h1, h2, h3, h4, h5, h6, pre } =
|
|
23038
|
+
let { p, h1, h2, h3, h4, h5, h6, pre } = toolbar.styleMenu;
|
|
23005
23039
|
if (p) items.push(new ParagraphStyleItem(schema.nodes.paragraph, 'P', { label: p, keymap: baseKeyString('p', keymap) }));
|
|
23006
23040
|
if (h1) items.push(new ParagraphStyleItem(schema.nodes.heading, 'H1', { label: h1, keymap: baseKeyString('h1', keymap), attrs: { level: 1 }}));
|
|
23007
23041
|
if (h2) items.push(new ParagraphStyleItem(schema.nodes.heading, 'H2', { label: h2, keymap: baseKeyString('h2', keymap), attrs: { level: 2 }}));
|
|
@@ -23010,20 +23044,19 @@ function styleMenuItems(config, schema) {
|
|
|
23010
23044
|
if (h5) items.push(new ParagraphStyleItem(schema.nodes.heading, 'H5', { label: h5, keymap: baseKeyString('h5', keymap), attrs: { level: 5 }}));
|
|
23011
23045
|
if (h6) items.push(new ParagraphStyleItem(schema.nodes.heading, 'H6', { label: h6, keymap: baseKeyString('h6', keymap), attrs: { level: 6 }}));
|
|
23012
23046
|
if (pre) items.push(new ParagraphStyleItem(schema.nodes.code_block, 'PRE', { label: pre, keymap: baseKeyString('pre', keymap) }));
|
|
23013
|
-
if (
|
|
23047
|
+
if (toolbar.menus.styleName) {
|
|
23014
23048
|
let titleUpdate = (state) => {
|
|
23015
23049
|
let styleElement = paragraphStyle(state).toLowerCase();
|
|
23016
23050
|
// The paragraphStyle comes back with a trailing "+"" when across multiple styles
|
|
23017
23051
|
let multiple = styleElement[styleElement.length - 1] == '+';
|
|
23018
23052
|
let singleElement = multiple ? styleElement.slice(0, -1) : styleElement;
|
|
23019
|
-
let label =
|
|
23053
|
+
let label = toolbar.styleMenu[singleElement];
|
|
23020
23054
|
return label ? (multiple ? label + '+' : label) : styleElement
|
|
23021
23055
|
};
|
|
23022
23056
|
let allLabels = [p, h1, h2, h3, h4, h5, h6, pre].filter(Boolean).flatMap(l => [l, l + '+']);
|
|
23023
23057
|
return [new Dropdown(items, { title: help.style, label: 'Style', titleUpdate: titleUpdate, labels: allLabels})]
|
|
23024
23058
|
} else {
|
|
23025
|
-
|
|
23026
|
-
return [new Dropdown(items, { title: help.style, icon: icons.paragraphStyle })]
|
|
23059
|
+
return [new Dropdown(items, { title: help.style, icon: toolbar.icons.paragraphStyle })]
|
|
23027
23060
|
}
|
|
23028
23061
|
}
|
|
23029
23062
|
|
|
@@ -23340,9 +23373,9 @@ function buildKeymap(config, schema) {
|
|
|
23340
23373
|
*/
|
|
23341
23374
|
let toolbarView;
|
|
23342
23375
|
|
|
23343
|
-
function toolbar(content) {
|
|
23376
|
+
function toolbar(content, visible) {
|
|
23344
23377
|
let view = function view(editorView) {
|
|
23345
|
-
toolbarView = new ToolbarView(editorView, content);
|
|
23378
|
+
toolbarView = new ToolbarView(editorView, content, visible);
|
|
23346
23379
|
return toolbarView;
|
|
23347
23380
|
};
|
|
23348
23381
|
return new Plugin({view})
|
|
@@ -23350,7 +23383,7 @@ function toolbar(content) {
|
|
|
23350
23383
|
|
|
23351
23384
|
class ToolbarView {
|
|
23352
23385
|
|
|
23353
|
-
constructor(editorView, content) {
|
|
23386
|
+
constructor(editorView, content, visible) {
|
|
23354
23387
|
this.prefix = prefix + "-toolbar";
|
|
23355
23388
|
this.editorView = editorView;
|
|
23356
23389
|
this.content = content;
|
|
@@ -23358,11 +23391,13 @@ class ToolbarView {
|
|
|
23358
23391
|
|
|
23359
23392
|
// Embed the toolbar and editorView in a wrapper.
|
|
23360
23393
|
this.wrapper = crelt("div", {class: this.prefix + "-wrapper"});
|
|
23361
|
-
|
|
23394
|
+
|
|
23395
|
+
// Handle the case where the toolbar is hidden initially.
|
|
23396
|
+
let toolbarClass = visible ? this.prefix : this.prefix + "-hidden";
|
|
23397
|
+
this.toolbar = this.wrapper.appendChild(crelt("div", {class: toolbarClass, id: this.prefix}));
|
|
23362
23398
|
// Since the menu adjusts to fit using a `MoreItem` for contents that doesn't fit,
|
|
23363
23399
|
// we need to refresh how it is rendered when resizing takes place.
|
|
23364
23400
|
window.addEventListener('resize', ()=>{ this.refresh(); });
|
|
23365
|
-
this.toolbar.className = this.prefix;
|
|
23366
23401
|
if (editorView.dom.parentNode)
|
|
23367
23402
|
editorView.dom.parentNode.replaceChild(this.wrapper, editorView.dom);
|
|
23368
23403
|
this.wrapper.appendChild(editorView.dom);
|
|
@@ -23676,11 +23711,9 @@ function markupSetup(config, schema) {
|
|
|
23676
23711
|
gapCursor(),
|
|
23677
23712
|
];
|
|
23678
23713
|
|
|
23679
|
-
//
|
|
23680
|
-
|
|
23681
|
-
|
|
23682
|
-
plugins.push(toolbar(content));
|
|
23683
|
-
}
|
|
23714
|
+
// Always build the toolbar, but only show it if the config indicates it is visible
|
|
23715
|
+
let content = buildMenuItems(config, schema);
|
|
23716
|
+
plugins.push(toolbar(content, config.toolbar.visibility.toolbar));
|
|
23684
23717
|
|
|
23685
23718
|
plugins.push(history());
|
|
23686
23719
|
|
|
@@ -24877,6 +24910,17 @@ class MarkupEditor {
|
|
|
24877
24910
|
}
|
|
24878
24911
|
}
|
|
24879
24912
|
|
|
24913
|
+
/**
|
|
24914
|
+
* Set the visibility of the toolbarView using the display property.
|
|
24915
|
+
*
|
|
24916
|
+
* @param {boolean} visible True if the toolbar should be visible, else false.
|
|
24917
|
+
*/
|
|
24918
|
+
function setToolbarVisible(visible) {
|
|
24919
|
+
if (toolbarView) {
|
|
24920
|
+
toolbarView.toolbar.style.display = visible ? '' : 'none';
|
|
24921
|
+
}
|
|
24922
|
+
}
|
|
24923
|
+
|
|
24880
24924
|
/**
|
|
24881
24925
|
* The object whose methods comprise the MarkupEditor API.
|
|
24882
24926
|
*/
|
|
@@ -24934,6 +24978,7 @@ const MU = {
|
|
|
24934
24978
|
setHTML,
|
|
24935
24979
|
setStyle,
|
|
24936
24980
|
setTestHTML,
|
|
24981
|
+
setToolbarVisible,
|
|
24937
24982
|
setTopLevelAttributes,
|
|
24938
24983
|
testBlockquoteEnter,
|
|
24939
24984
|
testExtractContents,
|
|
@@ -25158,6 +25203,34 @@ class MarkupEditorElement extends HTMLElement {
|
|
|
25158
25203
|
// Create an editor instance and hold onto it here
|
|
25159
25204
|
this.editor = new MarkupEditor(this.editorContainer, config);
|
|
25160
25205
|
|
|
25206
|
+
// Apply toolbar appearance CSS custom properties if an appearance section is present
|
|
25207
|
+
const appearance = this.editor.config?.toolbar?.appearance;
|
|
25208
|
+
if (appearance) {
|
|
25209
|
+
const canMatchMedia = typeof window.matchMedia === 'function';
|
|
25210
|
+
const isDark = canMatchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;
|
|
25211
|
+
const colorPairs = {
|
|
25212
|
+
accentColor: '--Markup-accent-color',
|
|
25213
|
+
toolbarBg: '--Markup-toolbar-bg',
|
|
25214
|
+
buttonBg: '--Markup-button-bg',
|
|
25215
|
+
borderColor: '--Markup-border-color',
|
|
25216
|
+
hoverBg: '--Markup-hover-bg',
|
|
25217
|
+
};
|
|
25218
|
+
const singleValues = {
|
|
25219
|
+
buttonSize: '--Markup-button-size',
|
|
25220
|
+
buttonFontSize: '--Markup-button-font-size',
|
|
25221
|
+
};
|
|
25222
|
+
for (const [field, varName] of Object.entries(colorPairs)) {
|
|
25223
|
+
if (appearance[field] != null) {
|
|
25224
|
+
this.style.setProperty(varName, isDark ? appearance[field].dark : appearance[field].light);
|
|
25225
|
+
}
|
|
25226
|
+
}
|
|
25227
|
+
for (const [field, varName] of Object.entries(singleValues)) {
|
|
25228
|
+
if (appearance[field] != null) {
|
|
25229
|
+
this.style.setProperty(varName, appearance[field]);
|
|
25230
|
+
}
|
|
25231
|
+
}
|
|
25232
|
+
}
|
|
25233
|
+
|
|
25161
25234
|
// Prepend and/or append any augmentations
|
|
25162
25235
|
const prependItems = getAugmentation(config.prepend)?.menuItems;
|
|
25163
25236
|
if (prependItems) prependToolbar(prependItems);
|
package/package.json
CHANGED
package/styles/toolbar.css
CHANGED
|
@@ -56,62 +56,66 @@
|
|
|
56
56
|
position: sticky;
|
|
57
57
|
overflow: visible;
|
|
58
58
|
width: 100%;
|
|
59
|
-
font-size: 24px;
|
|
59
|
+
font-size: var(--Markup-button-font-size, 24px);
|
|
60
60
|
vertical-align: middle;
|
|
61
61
|
border-top-left-radius: inherit;
|
|
62
62
|
border-top-right-radius: inherit;
|
|
63
63
|
top: 0;
|
|
64
|
-
max-height:
|
|
64
|
+
max-height: calc(var(--Markup-button-size, 28px) + 10px);
|
|
65
65
|
padding: 2px 8px;
|
|
66
|
-
color: blue;
|
|
67
|
-
background: rgba(250, 249, 246, 0.95);
|
|
68
|
-
border-bottom: 1px solid lightgray;
|
|
66
|
+
color: var(--Markup-accent-color, blue);
|
|
67
|
+
background: var(--Markup-toolbar-bg, rgba(250, 249, 246, 0.95));
|
|
68
|
+
border-bottom: 1px solid var(--Markup-border-color, lightgray);
|
|
69
69
|
-moz-box-sizing: border-box;
|
|
70
70
|
box-sizing: border-box;
|
|
71
71
|
}
|
|
72
72
|
@media (prefers-color-scheme: dark) {
|
|
73
73
|
.Markup-toolbar {
|
|
74
|
-
color:
|
|
75
|
-
background: rgba(40, 40, 43, 0.9);
|
|
76
|
-
border-bottom: 1px solid gray;
|
|
74
|
+
color: var(--Markup-accent-color, lightblue);
|
|
75
|
+
background: var(--Markup-toolbar-bg, rgba(40, 40, 43, 0.9));
|
|
76
|
+
border-bottom: 1px solid var(--Markup-border-color, gray);
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
+
.Markup-toolbar-hidden {
|
|
81
|
+
display: none;
|
|
82
|
+
}
|
|
83
|
+
|
|
80
84
|
.Markup-menuitem {
|
|
81
85
|
display: inline-block;
|
|
82
86
|
flex-shrink: 0; /* Otherwise, the drop-downs with icons shrink */
|
|
83
87
|
overflow-y: visible;
|
|
84
88
|
vertical-align: middle;
|
|
85
|
-
min-width: 28px;
|
|
86
|
-
height: 28px;
|
|
89
|
+
min-width: var(--Markup-button-size, 28px);
|
|
90
|
+
height: var(--Markup-button-size, 28px);
|
|
87
91
|
cursor: pointer;
|
|
88
92
|
margin-right: 4px;
|
|
89
93
|
border-radius: 4px;
|
|
90
|
-
color: blue;
|
|
91
|
-
border: 1px solid blue;
|
|
92
|
-
background: white;
|
|
93
|
-
fill: blue;
|
|
94
|
+
color: var(--Markup-accent-color, blue);
|
|
95
|
+
border: 1px solid var(--Markup-accent-color, blue);
|
|
96
|
+
background: var(--Markup-button-bg, white);
|
|
97
|
+
fill: var(--Markup-accent-color, blue);
|
|
94
98
|
}
|
|
95
99
|
@media (prefers-color-scheme: dark) {
|
|
96
100
|
.Markup-menuitem {
|
|
97
|
-
color: lightblue;
|
|
98
|
-
border: 1px solid lightblue;
|
|
101
|
+
color: var(--Markup-accent-color, lightblue);
|
|
102
|
+
border: 1px solid var(--Markup-accent-color, lightblue);
|
|
99
103
|
/* border: 1px solid #4183c4; */
|
|
100
|
-
background: black;
|
|
101
|
-
fill: lightblue;
|
|
104
|
+
background: var(--Markup-button-bg, black);
|
|
105
|
+
fill: var(--Markup-accent-color, lightblue);
|
|
102
106
|
}
|
|
103
107
|
}
|
|
104
108
|
|
|
105
109
|
.Markup-menuitem-active {
|
|
106
110
|
fill: white;
|
|
107
111
|
color: white;
|
|
108
|
-
background: blue;
|
|
112
|
+
background: var(--Markup-accent-color, blue);
|
|
109
113
|
}
|
|
110
114
|
@media (prefers-color-scheme: dark) {
|
|
111
115
|
.Markup-menuitem-active {
|
|
112
116
|
fill: black;
|
|
113
117
|
color: black;
|
|
114
|
-
background: lightblue;
|
|
118
|
+
background: var(--Markup-accent-color, lightblue);
|
|
115
119
|
}
|
|
116
120
|
}
|
|
117
121
|
|
|
@@ -127,8 +131,8 @@
|
|
|
127
131
|
|
|
128
132
|
.Markup-icon {
|
|
129
133
|
display: inline-block;
|
|
130
|
-
width: 28px;
|
|
131
|
-
height: 28px;
|
|
134
|
+
width: var(--Markup-button-size, 28px);
|
|
135
|
+
height: var(--Markup-button-size, 28px);
|
|
132
136
|
border: 0;
|
|
133
137
|
}
|
|
134
138
|
|
|
@@ -137,6 +141,8 @@
|
|
|
137
141
|
}
|
|
138
142
|
|
|
139
143
|
.Markup-icon svg {
|
|
144
|
+
width: var(--Markup-button-font-size, 24px);
|
|
145
|
+
height: var(--Markup-button-font-size, 24px);
|
|
140
146
|
padding: 2px;
|
|
141
147
|
border: 0;
|
|
142
148
|
fill: inherit;
|
|
@@ -145,13 +151,13 @@
|
|
|
145
151
|
.Markup-menuseparator {
|
|
146
152
|
display: inline-block;
|
|
147
153
|
vertical-align: middle;
|
|
148
|
-
height: 28px;
|
|
149
|
-
border-right: 1px solid lightgray;
|
|
154
|
+
height: var(--Markup-button-size, 28px);
|
|
155
|
+
border-right: 1px solid var(--Markup-border-color, lightgray);
|
|
150
156
|
margin-right: 4px;
|
|
151
157
|
}
|
|
152
158
|
@media (prefers-color-scheme: dark) {
|
|
153
159
|
.Markup-menuseparator {
|
|
154
|
-
border-right: 1px solid gray;
|
|
160
|
+
border-right: 1px solid var(--Markup-border-color, gray);
|
|
155
161
|
}
|
|
156
162
|
}
|
|
157
163
|
|
|
@@ -243,11 +249,11 @@
|
|
|
243
249
|
background: inherit;
|
|
244
250
|
padding: 2px;
|
|
245
251
|
background: inherit;
|
|
246
|
-
border: 1px solid gray;
|
|
252
|
+
border: 1px solid var(--Markup-border-color, gray);
|
|
247
253
|
}
|
|
248
254
|
@media (prefers-color-scheme: dark) {
|
|
249
255
|
.Markup-menu-dropdown-menu, .Markup-menu-submenu {
|
|
250
|
-
border: 1px solid lightgray;
|
|
256
|
+
border: 1px solid var(--Markup-border-color, lightgray);
|
|
251
257
|
}
|
|
252
258
|
}
|
|
253
259
|
|
|
@@ -270,11 +276,11 @@
|
|
|
270
276
|
}
|
|
271
277
|
|
|
272
278
|
.Markup-menu-dropdown-item:hover, .Markup-menu-submenu-wrap:hover {
|
|
273
|
-
background: #f2f2f2;
|
|
279
|
+
background: var(--Markup-hover-bg, #f2f2f2);
|
|
274
280
|
}
|
|
275
281
|
@media (prefers-color-scheme: dark) {
|
|
276
282
|
.Markup-menu-dropdown-item:hover, .Markup-menu-submenu-wrap:hover {
|
|
277
|
-
background: rgb(80, 80, 80);
|
|
283
|
+
background: var(--Markup-hover-bg, rgb(80, 80, 80));
|
|
278
284
|
}
|
|
279
285
|
}
|
|
280
286
|
|
|
@@ -323,12 +329,12 @@
|
|
|
323
329
|
left: 100%;
|
|
324
330
|
top: -5px;
|
|
325
331
|
/* background cannot be inherited because of hover highlighting in dropdown */
|
|
326
|
-
background: white;
|
|
332
|
+
background: var(--Markup-button-bg, white);
|
|
327
333
|
}
|
|
328
334
|
@media (prefers-color-scheme: dark) {
|
|
329
335
|
.Markup-menu-submenu {
|
|
330
336
|
/* background cannot be inherited because of hover highlighting in dropdown */
|
|
331
|
-
background: black;
|
|
337
|
+
background: var(--Markup-button-bg, black);
|
|
332
338
|
}
|
|
333
339
|
}
|
|
334
340
|
|
|
@@ -345,12 +351,12 @@
|
|
|
345
351
|
|
|
346
352
|
.Markup-selection {
|
|
347
353
|
position: absolute;
|
|
348
|
-
border: 1px solid blue;
|
|
354
|
+
border: 1px solid var(--Markup-accent-color, blue);
|
|
349
355
|
background: transparent;
|
|
350
356
|
}
|
|
351
357
|
@media (prefers-color-scheme: dark) {
|
|
352
358
|
.Markup-selection {
|
|
353
|
-
border: 1px solid lightblue;
|
|
359
|
+
border: 1px solid var(--Markup-accent-color, lightblue);
|
|
354
360
|
}
|
|
355
361
|
}
|
|
356
362
|
|
|
@@ -361,24 +367,24 @@
|
|
|
361
367
|
position: sticky;
|
|
362
368
|
overflow: visible;
|
|
363
369
|
width: 100%;
|
|
364
|
-
font-size: 24px;
|
|
370
|
+
font-size: var(--Markup-button-font-size, 24px);
|
|
365
371
|
vertical-align: middle;
|
|
366
372
|
border-top-left-radius: inherit;
|
|
367
373
|
border-top-right-radius: inherit;
|
|
368
|
-
top:
|
|
369
|
-
max-height:
|
|
374
|
+
top: calc(var(--Markup-button-size, 28px) + 7px);
|
|
375
|
+
max-height: calc(var(--Markup-button-size, 28px) + 10px);
|
|
370
376
|
padding: 2px 8px;
|
|
371
|
-
color: blue;
|
|
372
|
-
background: rgba(250, 249, 246, 0.95);
|
|
373
|
-
border-bottom: 1px solid lightgray;
|
|
377
|
+
color: var(--Markup-accent-color, blue);
|
|
378
|
+
background: var(--Markup-toolbar-bg, rgba(250, 249, 246, 0.95));
|
|
379
|
+
border-bottom: 1px solid var(--Markup-border-color, lightgray);
|
|
374
380
|
-moz-box-sizing: border-box;
|
|
375
381
|
box-sizing: border-box;
|
|
376
382
|
}
|
|
377
383
|
@media (prefers-color-scheme: dark) {
|
|
378
384
|
.Markup-toolbar-more {
|
|
379
|
-
color:
|
|
380
|
-
background: rgba(40, 40, 43, 0.9);
|
|
381
|
-
border-bottom: 1px solid gray;
|
|
385
|
+
color: var(--Markup-accent-color, lightblue);
|
|
386
|
+
background: var(--Markup-toolbar-bg, rgba(40, 40, 43, 0.9));
|
|
387
|
+
border-bottom: 1px solid var(--Markup-border-color, gray);
|
|
382
388
|
}
|
|
383
389
|
}
|
|
384
390
|
|
|
@@ -386,25 +392,25 @@
|
|
|
386
392
|
|
|
387
393
|
.Markup-searchbar {
|
|
388
394
|
display: inline-block;
|
|
389
|
-
font-size: 24px;
|
|
395
|
+
font-size: var(--Markup-button-font-size, 24px);
|
|
390
396
|
vertical-align: middle;
|
|
391
397
|
position: sticky;
|
|
392
|
-
top:
|
|
398
|
+
top: calc(var(--Markup-button-size, 28px) + 7px);
|
|
393
399
|
width: 100%;
|
|
394
400
|
line-height: 30px;
|
|
395
401
|
height: 37px;
|
|
396
|
-
color: blue;
|
|
397
|
-
background: rgba(250, 249, 246, 0.95);
|
|
398
|
-
border-bottom: 1px solid lightgray;
|
|
402
|
+
color: var(--Markup-accent-color, blue);
|
|
403
|
+
background: var(--Markup-toolbar-bg, rgba(250, 249, 246, 0.95));
|
|
404
|
+
border-bottom: 1px solid var(--Markup-border-color, lightgray);
|
|
399
405
|
-moz-box-sizing: border-box;
|
|
400
406
|
box-sizing: border-box;
|
|
401
407
|
overflow: hidden;
|
|
402
408
|
}
|
|
403
409
|
@media (prefers-color-scheme: dark) {
|
|
404
410
|
.Markup-searchbar {
|
|
405
|
-
color:
|
|
406
|
-
background: rgba(40, 40, 43, 0.9);
|
|
407
|
-
border-bottom: 1px solid gray;
|
|
411
|
+
color: var(--Markup-accent-color, lightblue);
|
|
412
|
+
background: var(--Markup-toolbar-bg, rgba(40, 40, 43, 0.9));
|
|
413
|
+
border-bottom: 1px solid var(--Markup-border-color, gray);
|
|
408
414
|
}
|
|
409
415
|
}
|
|
410
416
|
|
|
@@ -605,12 +611,12 @@
|
|
|
605
611
|
left: 100%;
|
|
606
612
|
top: -5px;
|
|
607
613
|
/* background cannot be inherited because of hover highlighting in dropdown */
|
|
608
|
-
background: white;
|
|
614
|
+
background: var(--Markup-button-bg, white);
|
|
609
615
|
}
|
|
610
616
|
@media (prefers-color-scheme: dark) {
|
|
611
617
|
.Markup-menu-tablesizer {
|
|
612
618
|
/* background cannot be inherited because of hover highlighting in dropdown */
|
|
613
|
-
background: black;
|
|
619
|
+
background: var(--Markup-button-bg, black);
|
|
614
620
|
}
|
|
615
621
|
}
|
|
616
622
|
|
|
@@ -623,18 +629,18 @@
|
|
|
623
629
|
background: inherit;
|
|
624
630
|
padding: 2px;
|
|
625
631
|
background: inherit;
|
|
626
|
-
border: 1px solid gray;
|
|
632
|
+
border: 1px solid var(--Markup-border-color, gray);
|
|
627
633
|
}
|
|
628
634
|
@media (prefers-color-scheme: dark) {
|
|
629
635
|
.Markup-menu-dropdown-menu, .Markup-menu-submenu {
|
|
630
|
-
border: 1px solid lightgray;
|
|
636
|
+
border: 1px solid var(--Markup-border-color, lightgray);
|
|
631
637
|
}
|
|
632
638
|
}
|
|
633
639
|
|
|
634
640
|
.Markup-menu-tablesizer .Markup-menu-dropdown-item {
|
|
635
641
|
-moz-box-sizing: border-box;
|
|
636
642
|
box-sizing: border-box;
|
|
637
|
-
border: 1px solid blue;
|
|
643
|
+
border: 1px solid var(--Markup-accent-color, blue);
|
|
638
644
|
width: 18px;
|
|
639
645
|
height: 18px;
|
|
640
646
|
padding: 0;
|
|
@@ -642,7 +648,7 @@
|
|
|
642
648
|
}
|
|
643
649
|
@media (prefers-color-scheme: dark) {
|
|
644
650
|
.Markup-menu-tablesizer .Markup-menu-dropdown-item {
|
|
645
|
-
border: 1px solid lightblue;
|
|
651
|
+
border: 1px solid var(--Markup-accent-color, lightblue);
|
|
646
652
|
}
|
|
647
653
|
}
|
|
648
654
|
|
|
@@ -651,12 +657,12 @@
|
|
|
651
657
|
padding-top: 3px;
|
|
652
658
|
fill: black;
|
|
653
659
|
color: black;
|
|
654
|
-
background: blue;
|
|
660
|
+
background: var(--Markup-accent-color, blue);
|
|
655
661
|
}
|
|
656
662
|
@media (prefers-color-scheme: dark) {
|
|
657
663
|
.Markup-menu-tablesizer .Markup-menuitem-active {
|
|
658
664
|
fill: black;
|
|
659
665
|
color: black;
|
|
660
|
-
background: lightblue;
|
|
666
|
+
background: var(--Markup-accent-color, lightblue);
|
|
661
667
|
}
|
|
662
668
|
}
|