|
|
|
@ -96,11 +96,45 @@ export function buildConfig() {
|
|
|
|
defaultProtocol: "https://",
|
|
|
|
defaultProtocol: "https://",
|
|
|
|
allowedProtocols: ALLOWED_PROTOCOLS
|
|
|
|
allowedProtocols: ALLOWED_PROTOCOLS
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
style: {
|
|
|
|
|
|
|
|
definitions: buildStyleDefinitions()
|
|
|
|
|
|
|
|
},
|
|
|
|
// This value must be kept in sync with the language defined in webpack.config.js.
|
|
|
|
// This value must be kept in sync with the language defined in webpack.config.js.
|
|
|
|
language: "en"
|
|
|
|
language: "en"
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function buildStyleDefinitions() {
|
|
|
|
|
|
|
|
const element = "blockquote";
|
|
|
|
|
|
|
|
return [
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
name: "Note",
|
|
|
|
|
|
|
|
element,
|
|
|
|
|
|
|
|
classes: [ "admonition", "note" ]
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
name: "Tip",
|
|
|
|
|
|
|
|
element,
|
|
|
|
|
|
|
|
classes: [ "admonition", "tip" ]
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
name: "Important",
|
|
|
|
|
|
|
|
element,
|
|
|
|
|
|
|
|
classes: [ "admonition", "important" ]
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
name: "Caution",
|
|
|
|
|
|
|
|
element,
|
|
|
|
|
|
|
|
classes: [ "admonition", "caution" ]
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
name: "Warning",
|
|
|
|
|
|
|
|
element,
|
|
|
|
|
|
|
|
classes: [ "admonition", "warning" ]
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
export function buildToolbarConfig(isClassicToolbar: boolean) {
|
|
|
|
export function buildToolbarConfig(isClassicToolbar: boolean) {
|
|
|
|
if (isClassicToolbar) {
|
|
|
|
if (isClassicToolbar) {
|
|
|
|
const multilineToolbar = utils.isDesktop() && options.get("textNoteEditorMultilineToolbar") === "true";
|
|
|
|
const multilineToolbar = utils.isDesktop() && options.get("textNoteEditorMultilineToolbar") === "true";
|
|
|
|
@ -115,6 +149,7 @@ function buildClassicToolbar(multilineToolbar: boolean) {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
toolbar: {
|
|
|
|
toolbar: {
|
|
|
|
items: [
|
|
|
|
items: [
|
|
|
|
|
|
|
|
"style",
|
|
|
|
"heading",
|
|
|
|
"heading",
|
|
|
|
"fontSize",
|
|
|
|
"fontSize",
|
|
|
|
"|",
|
|
|
|
"|",
|
|
|
|
@ -180,6 +215,7 @@ function buildFloatingToolbar() {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
blockToolbar: [
|
|
|
|
blockToolbar: [
|
|
|
|
|
|
|
|
"style",
|
|
|
|
"heading",
|
|
|
|
"heading",
|
|
|
|
"|",
|
|
|
|
"|",
|
|
|
|
"bulletedList",
|
|
|
|
"bulletedList",
|
|
|
|
|