markupeditor 0.9.23 → 0.9.25
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/toolbarconfig.json +1 -1
- package/dist/markup-editor.js +23 -9
- package/package.json +1 -1
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"append": null
|
|
80
80
|
},
|
|
81
81
|
"appearance": {
|
|
82
|
-
"accentColor": { "light": "
|
|
82
|
+
"accentColor": { "light": "#007AFF", "dark": "#409CFF" },
|
|
83
83
|
"toolbarBg": { "light": "rgba(250, 249, 246, 0.95)", "dark": "rgba(40, 40, 43, 0.9)" },
|
|
84
84
|
"buttonBg": { "light": "white", "dark": "black" },
|
|
85
85
|
"borderColor": { "light": "lightgray", "dark": "gray" },
|
package/dist/markup-editor.js
CHANGED
|
@@ -14688,10 +14688,9 @@ function liftOutOfList(state, dispatch, range) {
|
|
|
14688
14688
|
return true;
|
|
14689
14689
|
}
|
|
14690
14690
|
|
|
14691
|
-
const pDOM = ["p", 0],
|
|
14692
|
-
blockquoteDOM = ["blockquote", 0],
|
|
14691
|
+
const pDOM = ["p", 0],
|
|
14692
|
+
blockquoteDOM = ["blockquote", 0],
|
|
14693
14693
|
hrDOM = ["hr"],
|
|
14694
|
-
preDOM = ["pre", ["code", 0]],
|
|
14695
14694
|
brDOM = ["br"];
|
|
14696
14695
|
|
|
14697
14696
|
let baseNodes = OrderedMap.from({
|
|
@@ -14757,8 +14756,23 @@ let baseNodes = OrderedMap.from({
|
|
|
14757
14756
|
group: "block",
|
|
14758
14757
|
code: true,
|
|
14759
14758
|
defining: true,
|
|
14760
|
-
|
|
14761
|
-
|
|
14759
|
+
attrs: {
|
|
14760
|
+
language: {default: null}
|
|
14761
|
+
},
|
|
14762
|
+
parseDOM: [{
|
|
14763
|
+
tag: "pre",
|
|
14764
|
+
preserveWhitespace: "full",
|
|
14765
|
+
getAttrs(dom) {
|
|
14766
|
+
const className = dom.querySelector("code")?.getAttribute("class");
|
|
14767
|
+
const languageClass = className?.split(/\s+/).find(cls => cls.startsWith("language-"));
|
|
14768
|
+
const language = languageClass ? languageClass.slice("language-".length) : "";
|
|
14769
|
+
return {language: language ? language : null}
|
|
14770
|
+
}
|
|
14771
|
+
}],
|
|
14772
|
+
toDOM(node) {
|
|
14773
|
+
const language = node.attrs.language;
|
|
14774
|
+
return ["pre", language ? ["code", {class: `language-${language}`}, 0] : ["code", 0]]
|
|
14775
|
+
}
|
|
14762
14776
|
},
|
|
14763
14777
|
|
|
14764
14778
|
// :: NodeSpec The text node.
|
|
@@ -19754,8 +19768,8 @@ var augmentation = {
|
|
|
19754
19768
|
};
|
|
19755
19769
|
var appearance = {
|
|
19756
19770
|
accentColor: {
|
|
19757
|
-
light: "
|
|
19758
|
-
dark: "
|
|
19771
|
+
light: "#007AFF",
|
|
19772
|
+
dark: "#409CFF"
|
|
19759
19773
|
},
|
|
19760
19774
|
toolbarBg: {
|
|
19761
19775
|
light: "rgba(250, 249, 246, 0.95)",
|
|
@@ -19904,8 +19918,8 @@ var toolbarConfig = {
|
|
|
19904
19918
|
* "prepend": null, // Name of a registered array of cmdItems to prepend
|
|
19905
19919
|
* "append": null // Name of a registered array of cmdItems to append
|
|
19906
19920
|
* },
|
|
19907
|
-
* "appearance": {
|
|
19908
|
-
* "accentColor": { "light": "
|
|
19921
|
+
* "appearance": {
|
|
19922
|
+
* "accentColor": { "light": "#007AFF", "dark": "#409CFF" }, // Accent color for button icons, infill, and borders
|
|
19909
19923
|
* "toolbarBg": { "light": "rgba(250, 249, 246, 0.95)", "dark": "rgba(40, 40, 43, 0.9)" }, // Toolbar background
|
|
19910
19924
|
* "buttonBg": { "light": "white", "dark": "black" }, // Button background
|
|
19911
19925
|
* "borderColor": { "light": "lightgray", "dark": "gray" }, // Border at bottom of toolbar, around menus
|