quillEditorOptions.js 1.4 KB

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