@shuyun-ep-team/template-editor

标准的模板编辑器,适用于 短信模板、微信模板 编辑

Usage no npm install needed!

<script type="module">
  import shuyunEpTeamTemplateEditor from 'https://cdn.skypack.dev/@shuyun-ep-team/template-editor';
</script>

README

@shuyun-ep-team/template-editor

基于CodeMirror实现的模板编辑器,一般用来作为短信编辑器或者微信模板编辑器使用。

Features:

  • 配置简单易用
  • 支持自定义的占位符(Placeholder)
  • 原生Javascript实现,可以任意框架中使用,比如 ReactVueAngular

安装

npm i @shuyun-ep-team/template-editor

使用

import { TemplateEditor } from '@shuyun-ep-team/template-editor';

const editor = new TemplateEditor(container, {
  initialValue: 'Dear {{nickname}}...',
  placeholders: []
});