UNPKG

tav-ui

Version:
1 lines 1.66 kB
{"version":3,"file":"use-editor-toolbar2.mjs","sources":["../../../../../../../../packages/components/editor/src/hooks/use-editor-toolbar.ts"],"sourcesContent":["import { type ComputedRef, computed } from 'vue'\nimport { type EditorProps } from '../typings'\n\nexport function useEditorToolbar(options: { mergedProps: ComputedRef<EditorProps> }) {\n const { mergedProps } = options\n\n /** see: https://www.tiny.cloud/docs/tinymce/5/statusbar-configuration-options/ */\n const toolbarConfig = computed(() => {\n return {\n // toolbar: `undo redo removeformat | formatselect bold italic | lists aligns blockquote hr | image media link charmap emoticons times | restoredraft preview fullscreen code help`\n // toolbar: `undo redo removeformat | formatselect bold italic | lists aligns blockquote hr | table uploadimage uploadfile link | restoredraft fullscreen code`,\n toolbar: `undo redo removeformat | formatselect bold italic | lists aligns blockquote hr | table uploadimage uploadfile link | fullscreen code`,\n toolbarOptions: {\n /** 工具栏是否固定 */\n toolbar_sticky: true,\n /** 按钮过多的显示模式 */\n toolbar_mode: 'floating' as any,\n },\n }\n })\n\n return {\n toolbarConfig,\n }\n}\n"],"names":[],"mappings":";;AACO,SAAS,gBAAgB,CAAC,OAAO,EAAE;AAC1C,EAAE,MAAM,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC;AAClC,EAAE,MAAM,aAAa,GAAG,QAAQ,CAAC,MAAM;AACvC,IAAI,OAAO;AACX,MAAM,OAAO,EAAE,CAAC,oIAAoI,CAAC;AACrJ,MAAM,cAAc,EAAE;AACtB,QAAQ,cAAc,EAAE,IAAI;AAC5B,QAAQ,YAAY,EAAE,UAAU;AAChC,OAAO;AACP,KAAK,CAAC;AACN,GAAG,CAAC,CAAC;AACL,EAAE,OAAO;AACT,IAAI,aAAa;AACjB,GAAG,CAAC;AACJ;;;;"}