Skip to content

Latest commit

 

History

History
23 lines (18 loc) · 566 Bytes

File metadata and controls

23 lines (18 loc) · 566 Bytes

@template-editor/native

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

Features:

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

安装

npm i @template-editor/native

使用

import { TemplateEditor } from '@template-editor/native';

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