editor-settings.js 1.6 KB

123456789101112131415161718192021222324252627282930313233
  1. const editorSettings = {
  2. modules: {
  3. toolbar: '#toolbar',
  4. // [
  5. // [{ header: [1, 2, 3, 4, false] }],
  6. // ["bold", "italic", "underline", { script: "super" }, "clean"],
  7. // [
  8. // { list: "ordered" }, { list: "bullet" }
  9. // ],
  10. // [{ indent: "-1" }, { indent: "+1" }],
  11. // [{ align: ['', 'center', 'right', 'justify'] }],
  12. // ["image"],
  13. // ],
  14. clipboard: { matchVisual: false }, // https://stackoverflow.com/a/46435236
  15. htmlEditButton: { // https://github.com/benwinding/quill-html-edit-button/tree/master#customising-the-html-editor
  16. syntax: true,
  17. msg: "Edit the content in HTML format",
  18. okText: "Apply", // Text to display in the OK button, default: Ok,
  19. cancelText: "Discard<span class='hide-small'>&nbsp;changes</span>", // Text to display in the cancel button, default: Cancel
  20. // buttonHTML: "<b style='font-size:.65rem; display: block;'>&lt;&nbsp;/&nbsp;&gt;</b>",
  21. // buttonHTML: "<span style='font-size:.55rem; display: block;'><b>&lt;</b><span style='font-size:.5rem;'>HTML</span><b>&gt;</b></span>",
  22. buttonHTML: "<span aria-label='Edit HTML' role='button' style='font-size:.75rem; display: block; font-weight:600;'>&lt;<span style='font-size:.65rem;'>/</span>&gt;</span>",
  23. closeOnClickOverlay: false,
  24. debug: false,
  25. },
  26. },
  27. theme: "snow",
  28. // scrollingContainer: '#wysiwyg-wrap',
  29. scrollingContainer: "html",
  30. placeholder: "Contract text goes here…",
  31. }
  32. export default editorSettings