Skip to content

Commit

Permalink
feat: run vditor on halo
Browse files Browse the repository at this point in the history
  • Loading branch information
justice2001 committed Nov 23, 2023
1 parent 65872c9 commit 9730774
Show file tree
Hide file tree
Showing 7 changed files with 125 additions and 247 deletions.
1 change: 1 addition & 0 deletions console/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"@halo-dev/components": "^1.5.0",
"@halo-dev/console-shared": "^2.6.0",
"canvas-confetti": "^1.6.0",
"vditor": "^3.9.6",
"vue": "^3.3.4"
},
"devDependencies": {
Expand Down
85 changes: 21 additions & 64 deletions console/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added console/src/assets/vditor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 14 additions & 21 deletions console/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,29 +1,22 @@
import { definePlugin } from "@halo-dev/console-shared";
import {definePlugin, type EditorProvider} from "@halo-dev/console-shared";
import HomeView from "./views/HomeView.vue";
import { IconPlug } from "@halo-dev/components";
import logo from "./assets/vditor.png"
import { markRaw } from "vue";

export default definePlugin({
components: {},
routes: [
{
parentName: "Root",
route: {
path: "/example",
name: "Example",
component: HomeView,
meta: {
title: "示例页面",
searchable: true,
menu: {
name: "示例页面",
group: "示例分组",
icon: markRaw(IconPlug),
priority: 0,
},
extensionPoints: {
"editor:create": (): EditorProvider[] => {
return [
{
name: "Vditor",
displayName: "Vditor Markdown",
// @ts-ignore
component: HomeView,
rawType: "markdown",
logo: logo
},
},
];
},
],
extensionPoints: {},
},
});
Loading

0 comments on commit 9730774

Please sign in to comment.