/**
 * @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */

/**
 * @fileOverview Rich code snippets for CKEditor.
 */

(function() {
  CKEDITOR.plugins.add( 'abiarrows', {
    icons: 'abiarrows', // %REMOVE_LINE_CORE%
    hidpi: true, // %REMOVE_LINE_CORE%

    isSupportedEnvironment: function() {
      return !CKEDITOR.env.ie || CKEDITOR.env.version > 8;
    },

    onLoad: function() {},

    init: function( editor ) {
      editor.addCommand('abiarrows', {
        exec: function( editor ) {
          editor.focus();
          editor.fire( 'saveSnapshot' );
          editor.insertHtml('»');
          editor.fire( 'saveSnapshot' );
        }
      });

      editor.ui.addButton && editor.ui.addButton( 'AbiArrows', {
        label: 'Abi Pfeile hinzufügen',
        command: 'abiarrows',
        toolbar: 'insert,10'
      });
    }
  });
})();
