Skip to content

fuyanlove/editor

Repository files navigation

Article & Editor

Dev

$ npm install
$ npm run serve
$ open http://localhost:8080  //文章渲染
$ open http://localhost:8080/tinymce  //tinymce编辑器
$ tinymce http://localhost:3000

Step.1 Install

npm install @fuyanlove/editor

Step.2 Import

  • 指定模块
import Article from "@fuyanlove/editor/src/Article.vue";
import Tinymce from "@fuyanlove/editor/src/Tinymce.vue";

Step.3 Usage

文章

<article :content="content" directorybox="#directory" />

编辑器

<script src="path/to/static/tinymce/tinymce.min.js?v=0.1.0"></script>
<Tinymce v-model="content" :attachmentEnable="true" :resourceEnable="true" :height="300" />

批量附件上传插入/资源快捷查询插入

<Upload @insert="insertWhere" @update="getList" @htmlUpdate="getHTML" />

使用说明

需要在引用的库内用 <script src="path/to/static/**"></script>, 一般是在 index.html 内引用。

引入全局变量 window.FUYANLOVE_CDNwindow.FUYANLOVE.CMS 用于上传和回显资源。

Releases

No releases published

Packages

No packages published