plugin.js 980 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /**
  2. * @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
  4. */
  5. /**
  6. * @fileOverview Rich code snippets for CKEditor.
  7. */
  8. (function() {
  9. CKEDITOR.plugins.add( 'abiarrows', {
  10. icons: 'abiarrows', // %REMOVE_LINE_CORE%
  11. hidpi: true, // %REMOVE_LINE_CORE%
  12. isSupportedEnvironment: function() {
  13. return !CKEDITOR.env.ie || CKEDITOR.env.version > 8;
  14. },
  15. onLoad: function() {},
  16. init: function( editor ) {
  17. editor.addCommand('abiarrows', {
  18. exec: function( editor ) {
  19. editor.focus();
  20. editor.fire( 'saveSnapshot' );
  21. editor.insertHtml('»');
  22. editor.fire( 'saveSnapshot' );
  23. }
  24. });
  25. editor.ui.addButton && editor.ui.addButton( 'AbiArrows', {
  26. label: 'Abi Pfeile hinzufügen',
  27. command: 'abiarrows',
  28. toolbar: 'insert,10'
  29. });
  30. }
  31. });
  32. })();