1234567891011121314151617181920212223242526272829303132333435363738394041 |
- export const options = {
- theme: 'snow',
- debug: 'warn',
- modules: {
- // 工具栏配置
- toolbar: {
- container: [
- ['bold', 'italic', 'underline', 'strike'], // 加粗 斜体 下划线 删除线
- ['blockquote', 'code-block'], // 引用 代码块
- [{ list: 'ordered' }, { list: 'bullet' }], // 有序、无序列表
- [{ indent: '-1' }, { indent: '+1' }], // 缩进
- [{ size: ['small', false, 'large', 'huge'] }], // 字体大小
- [{ header: [1, 2, 3, 4, 5, 6, false] }], // 标题
- [{ color: [] }, { background: [] }], // 字体颜色、字体背景颜色
- [{ align: [] }], // 对齐方式
- ['clean'], // 清除文本格式
- ['link', 'image'], // 链接、图片、视频
- ],
- // ImageDrop: true,//支持图片拖拽
- // imageResize: { //支持图片大小尺寸修改
- // displayStyles: {
- // backgroundColor: 'black',
- // border: 'none',
- // color: 'white'
- // },
- // modules: ['Resize', 'DisplaySize','Toolbar']
- // }
- }
- },
- placeholder: '请输入公告内容...',
- // readOnly: props.readOnly,
- clipboard: {
- matchers: [
- ['img', (node, delta) => {
- const src = node.getAttribute('src');
- const id = node.getAttribute('id');
- delta.insert({ image: { src, 'id': id } });
- }],
- ],
- },
- }
|