mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 19:05:59 +01:00
chore(highlightjs): basic integration
This commit is contained in:
@@ -3,4 +3,5 @@ export * from "./lib/options_interface.js";
|
||||
export * from "./lib/keyboard_actions_interface.js";
|
||||
export * from "./lib/hidden_subtree.js";
|
||||
export * from "./lib/rows.js";
|
||||
export * from "./lib/test-utils.js"
|
||||
export * from "./lib/test-utils.js";
|
||||
export * from "./lib/mime_type.js";
|
||||
|
||||
18
packages/commons/src/lib/mime_type.ts
Normal file
18
packages/commons/src/lib/mime_type.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
export interface MimeTypeDefinition {
|
||||
default?: boolean;
|
||||
title: string;
|
||||
mime: string;
|
||||
/** The name of the language/mime type as defined by highlight.js (or one of the aliases), in order to be used for syntax highlighting such as inside code blocks. */
|
||||
highlightJs?: string;
|
||||
/** If specified, will load the corresponding highlight.js file from the `libraries/highlightjs/${id}.js` instead of `node_modules/@highlightjs/cdn-assets/languages/${id}.min.js`. */
|
||||
highlightJsSource?: "libraries";
|
||||
/** If specified, will load the corresponding highlight file from the given path instead of `node_modules`. */
|
||||
codeMirrorSource?: string;
|
||||
}
|
||||
|
||||
export interface MimeType extends MimeTypeDefinition {
|
||||
/**
|
||||
* True if this mime type was enabled by the user in the "Available MIME types in the dropdown" option in the Code Notes settings.
|
||||
*/
|
||||
enabled: boolean;
|
||||
}
|
||||
Reference in New Issue
Block a user