mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ui: new config page
This commit is contained in:
8 files changed
+179
-51
No files matched your search
@@ -8,6 +8,8 @@ import list from 'monaco-themes/themes/themelist.json';
|
||||
import { nanoid } from 'nanoid';
|
||||
import { i18n, request } from 'vj/utils';
|
||||
|
||||
export { renderMarkdown } from 'monaco-editor/esm/vs/base/browser/markdownRenderer';
|
||||
|
||||
export default monaco;
|
||||
export const customOptions: monaco.editor.IStandaloneDiffEditorConstructionOptions = JSON.parse(localStorage.getItem('editor.config') || '{}');
|
||||
export function saveCustomOptions() {
|
||||
|
||||
@@ -85,7 +85,12 @@ export async function load(features = ['markdown']) {
|
||||
}
|
||||
await res.loadThemePromise;
|
||||
resolve();
|
||||
return { monaco: res.default, registerAction: res.registerAction, customOptions: res.customOptions };
|
||||
return {
|
||||
monaco: res.default,
|
||||
registerAction: res.registerAction,
|
||||
customOptions: res.customOptions,
|
||||
renderMarkdown: res.renderMarkdown,
|
||||
};
|
||||
}
|
||||
|
||||
export default load;
|
||||
|
||||
Reference in new issue
Block a user