full-editor.html 545 B

123456789101112131415161718192021
  1. // Initialize editor with custom theme and modules
  2. var fullEditor = new Quill('#full-editor', {
  3. modules: {
  4. 'toolbar': { container: '#full-toolbar' },
  5. },
  6. theme: 'snow'
  7. });
  8. // Update basic editor's content with ours
  9. fullEditor.on('text-change', function(delta, oldDelta, source) {
  10. if (source === 'user') {
  11. basicEditor.updateContents(delta);
  12. }
  13. });
  14. // Update our content with basic editor's
  15. basicEditor.on('text-change', function(delta, oldDelta, source) {
  16. if (source === 'user') {
  17. fullEditor.updateContents(delta);
  18. }
  19. });