Açıklama Yok
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

forms-editors.js 1.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. /**
  2. * Form Editors
  3. */
  4. 'use strict';
  5. (function () {
  6. // Snow Theme
  7. // --------------------------------------------------------------------
  8. const snowEditor = new Quill('#snow-editor', {
  9. bounds: '#snow-editor',
  10. modules: {
  11. syntax: true,
  12. toolbar: '#snow-toolbar'
  13. },
  14. theme: 'snow'
  15. });
  16. // Bubble Theme
  17. // --------------------------------------------------------------------
  18. const bubbleEditor = new Quill('#bubble-editor', {
  19. modules: {
  20. toolbar: '#bubble-toolbar'
  21. },
  22. theme: 'bubble'
  23. });
  24. // Full Toolbar
  25. // --------------------------------------------------------------------
  26. const fullToolbar = [
  27. [
  28. {
  29. font: []
  30. },
  31. {
  32. size: []
  33. }
  34. ],
  35. ['bold', 'italic', 'underline', 'strike'],
  36. [
  37. {
  38. color: []
  39. },
  40. {
  41. background: []
  42. }
  43. ],
  44. [
  45. {
  46. script: 'super'
  47. },
  48. {
  49. script: 'sub'
  50. }
  51. ],
  52. [
  53. {
  54. header: '1'
  55. },
  56. {
  57. header: '2'
  58. },
  59. 'blockquote',
  60. 'code-block'
  61. ],
  62. [
  63. {
  64. list: 'ordered'
  65. },
  66. {
  67. indent: '-1'
  68. },
  69. {
  70. indent: '+1'
  71. }
  72. ],
  73. [{ direction: 'rtl' }, { align: [] }],
  74. ['link', 'image', 'video', 'formula'],
  75. ['clean']
  76. ];
  77. const fullEditor = new Quill('#full-editor', {
  78. bounds: '#full-editor',
  79. placeholder: 'Type Something...',
  80. modules: {
  81. syntax: true,
  82. toolbar: fullToolbar
  83. },
  84. theme: 'snow'
  85. });
  86. })();