plugin.js 939 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
  3. For licensing, see LICENSE.html or http://ckeditor.com/license
  4. */
  5. CKEDITOR.plugins.add( 'uicolor',
  6. {
  7. requires : [ 'dialog' ],
  8. lang : [ 'en', 'he' ],
  9. init : function( editor )
  10. {
  11. if ( CKEDITOR.env.ie6Compat )
  12. return;
  13. editor.addCommand( 'uicolor', new CKEDITOR.dialogCommand( 'uicolor' ) );
  14. editor.ui.addButton( 'UIColor',
  15. {
  16. label : editor.lang.uicolor.title,
  17. command : 'uicolor',
  18. icon : this.path + 'uicolor.gif'
  19. });
  20. CKEDITOR.dialog.add( 'uicolor', this.path + 'dialogs/uicolor.js' );
  21. // Load YUI js files.
  22. CKEDITOR.scriptLoader.load( CKEDITOR.getUrl(
  23. '_source/' + // @Packager.RemoveLine
  24. 'plugins/uicolor/yui/yui.js'
  25. ));
  26. // Load YUI css files.
  27. editor.element.getDocument().appendStyleSheet( CKEDITOR.getUrl(
  28. '_source/' + // @Packager.RemoveLine
  29. 'plugins/uicolor/yui/assets/yui.css'
  30. ));
  31. }
  32. } );