mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-29 11:02:28 +08:00
Merge branch 'develop' into ai-llm-integration
This commit is contained in:
commit
4796c24898
4
libraries/ckeditor/ckeditor.js
vendored
4
libraries/ckeditor/ckeditor.js
vendored
File diff suppressed because one or more lines are too long
2
libraries/ckeditor/ckeditor.js.map
vendored
2
libraries/ckeditor/ckeditor.js.map
vendored
File diff suppressed because one or more lines are too long
@ -15,7 +15,7 @@ import type { CommandData, EventData, EventListener, FilteredCommandNames } from
|
|||||||
import type { default as FAttribute, AttributeType } from "../../entities/fattribute.js";
|
import type { default as FAttribute, AttributeType } from "../../entities/fattribute.js";
|
||||||
import type FNote from "../../entities/fnote.js";
|
import type FNote from "../../entities/fnote.js";
|
||||||
import { escapeQuotes } from "../../services/utils.js";
|
import { escapeQuotes } from "../../services/utils.js";
|
||||||
import { buildConfig } from "../type_widgets/ckeditor/toolbars.js";
|
import { buildConfig } from "../type_widgets/ckeditor/config.js";
|
||||||
|
|
||||||
const HELP_TEXT = `
|
const HELP_TEXT = `
|
||||||
<p>${t("attribute_editor.help_text_body1")}</p>
|
<p>${t("attribute_editor.help_text_body1")}</p>
|
||||||
|
@ -23,15 +23,27 @@ const TPL = `
|
|||||||
<span class="image-filesize"></span>
|
<span class="image-filesize"></span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="no-print" style="display: flex; justify-content: space-evenly; margin: 10px;">
|
<div class="no-print" style="display: flex; justify-content: space-evenly; margin: 10px;">
|
||||||
<button class="image-download btn btn-sm btn-primary" type="button">${t("image_properties.download")}</button>
|
<button class="image-download btn btn-sm btn-primary" type="button">
|
||||||
|
<span class="bx bx-download"></span>
|
||||||
|
${t("image_properties.download")}
|
||||||
|
</button>
|
||||||
|
|
||||||
<button class="image-open btn btn-sm btn-primary" type="button">${t("image_properties.open")}</button>
|
<button class="image-open btn btn-sm btn-primary" type="button">
|
||||||
|
<span class="bx bx-link-external"></span>
|
||||||
|
${t("image_properties.open")}
|
||||||
|
</button>
|
||||||
|
|
||||||
<button class="image-copy-reference-to-clipboard btn btn-sm btn-primary" type="button">${t("image_properties.copy_reference_to_clipboard")}</button>
|
<button class="image-copy-reference-to-clipboard btn btn-sm btn-primary" type="button">
|
||||||
|
<span class="bx bx-copy"></span>
|
||||||
|
${t("image_properties.copy_reference_to_clipboard")}
|
||||||
|
</button>
|
||||||
|
|
||||||
<button class="image-upload-new-revision btn btn-sm btn-primary" type="button">${t("image_properties.upload_new_revision")}</button>
|
<button class="image-upload-new-revision btn btn-sm btn-primary" type="button">
|
||||||
|
<span class="bx bx-folder-open"></span>
|
||||||
|
${t("image_properties.upload_new_revision")}
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<input type="file" class="image-upload-new-revision-input" style="display: none">
|
<input type="file" class="image-upload-new-revision-input" style="display: none">
|
||||||
|
@ -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",
|
@ -15,7 +15,7 @@ import options from "../../services/options.js";
|
|||||||
import toast from "../../services/toast.js";
|
import toast from "../../services/toast.js";
|
||||||
import { getMermaidConfig } from "../mermaid.js";
|
import { getMermaidConfig } from "../mermaid.js";
|
||||||
import { normalizeMimeTypeForCKEditor } from "../../services/mime_type_definitions.js";
|
import { normalizeMimeTypeForCKEditor } from "../../services/mime_type_definitions.js";
|
||||||
import { buildConfig, buildToolbarConfig } from "./ckeditor/toolbars.js";
|
import { buildConfig, buildToolbarConfig } from "./ckeditor/config.js";
|
||||||
|
|
||||||
const ENABLE_INSPECTOR = false;
|
const ENABLE_INSPECTOR = false;
|
||||||
|
|
||||||
|
@ -1887,3 +1887,7 @@ footer.file-footer button {
|
|||||||
.right-pane-tab .tab-title .bx {
|
.right-pane-tab .tab-title .bx {
|
||||||
font-size: 1.1em;
|
font-size: 1.1em;
|
||||||
}
|
}
|
||||||
|
.ck-content .admonition {
|
||||||
|
box-shadow: var(--card-box-shadow);
|
||||||
|
padding: 1em;
|
||||||
|
}
|
||||||
|
@ -103,8 +103,8 @@
|
|||||||
--modal-footer-background: #ffffff08;
|
--modal-footer-background: #ffffff08;
|
||||||
--modal-footer-color: #ffffff7a;
|
--modal-footer-color: #ffffff7a;
|
||||||
|
|
||||||
--toast-background: #00000099;
|
--toast-background: #4d4d4dc2;
|
||||||
--toast-text-color: white;
|
--toast-text-color: #e1e1e1;
|
||||||
--toast-close-button-background: #ffffff33;
|
--toast-close-button-background: #ffffff33;
|
||||||
|
|
||||||
--quick-search-background: #ffffff12;
|
--quick-search-background: #ffffff12;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user