mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-05 13:39:24 +08:00
* feat: create vditor field type, use Vditor as Markdown Editor * feat: clear Markdown Vditor value when set props.value to null * feat: add plugin-field-markdown-field to preset local plugin * fix: fix the plugin-field-markdown-vditor name in preset * fix: fix the plugin-field-markdown-vditor version in preset * feat: set vditor disable if props.disable is true after init * feat: use data from localstorage as vditor upload request headers * fix: plugin-field-markdown-vditor version to 0.21.0-alpha.11 * feat: when fileCollection is not defined, remove upload from vditor toolbar * feat: add temp function to reset vditor value * fix: temp function to reset vditor value may include reset tag * feat: update plugin-field-markdown-vditor i18n * fix: i18n * feat: temp disable fullscreen * fix: remove useless file * fix: plugin description * fix: plugin description * fix: plugin-field-markdown-vditor componentCls * fix: plugin-field-markdown-vditadd default toobar config * fix: use long text to save mardkwon * fix: vditor fullscreen style * feat: change vditor field datatype * fix: code review * fix: code review * feat: change import method of katex in plugin-field-markdown-vditor * fix: version * fix: resize will cause blur * fix: vditor base font-size * fix: vditor base font-size * feat: use style config from token as vditor base size * fix: plugin-field-markdown-vditor i18n * fix: toobar config tooltip can not be seen * fix: vditor toobar default config * feat: plugin-field-markdown-vditor doc url * feat: move cursor to end when reset vditor value * fix: value change will not set vditor * feat: support getHeaders * fix: improve component * fix: enhance vditor init --------- Co-authored-by: chenos <chenlinxh@gmail.com>
23 lines
631 B
TypeScript
23 lines
631 B
TypeScript
import { Plugin } from '@nocobase/client';
|
|
import { MarkdownVditor } from './components';
|
|
import { MarkdownVditorFieldInterface } from './interfaces/markdown-vditor';
|
|
import 'vditor/dist/index.css';
|
|
import katex from 'katex';
|
|
export class PluginFieldMarkdownVditorClient extends Plugin {
|
|
async afterAdd() {}
|
|
|
|
async beforeLoad() {}
|
|
|
|
async load() {
|
|
this.app.addComponents({ MarkdownVditor });
|
|
this.initKatexDependency();
|
|
this.app.dataSourceManager.addFieldInterfaces([MarkdownVditorFieldInterface]);
|
|
}
|
|
|
|
initKatexDependency() {
|
|
window['katex'] = katex;
|
|
}
|
|
}
|
|
|
|
export default PluginFieldMarkdownVditorClient;
|