扩展编辑器插件
本插件使用了highlightjs,editor.md
- 本插件为扩展编辑器插件,在原编辑基础上增加了1个编辑器
- 可以自动获取上传的图片并插入到编辑器中(图片必须先上传)
- 基于highlight做了代码高亮,需要注释自带的,下面会说
本插件需要修改主题
修改文件及位置因主题不同也会不同这里以Moments为例
文件:\extensions\themes\Moments\commons\fresns.blade.php 查找
<link rel="stylesheet" href="/assets/themes/Moments/css/fresns.css?v={{ $themeVersion }}">
下面添加
<link rel="stylesheet" href="/assets/plugins/MoreEditor/js/codecopy/codecopy.css?v={{ $themeVersion }}">
<link rel="stylesheet" href="/assets/plugins/MoreEditor/js/highlight/styles/github-dark.min.css?v={{ $themeVersion }}">
查找
@stack('script')
下面添加
<script src="https://npm.onmicrosoft.cn/clipboard@2.0.11/dist/clipboard.js?v={{ $themeVersion }}"></script>
<script src="/assets/plugins/MoreEditor/js/highlight/highlight.min.js?v={{ $themeVersion }}"></script>
<script src="https://npm.onmicrosoft.cn/highlightjs-line-numbers.js@2.8.0/src/highlightjs-line-numbers.js?v={{ $themeVersion }}"></script>
<script src="/assets/plugins/MoreEditor/js/codecopy/codecopy.js?v={{ $themeVersion }}"></script>
查找并注释
<link rel="stylesheet" href="/assets/themes/Moments/css/prism.min.css?v={{ $themeVersion }}"
<script src="/assets/themes/Moments/js/prism.min.js?v={{ $themeVersion }}"></script>
开启插件后,到编辑器扩展中,添加一个扩展
完事
解压密码:[money=30]qmOw4D[/money]
https://www.fireself.cn/post/b80vnZ07