/static/scripts/tiny_mce/plugins/emotions/editor_plugin_src.js

http://n23.googlecode.com/ · JavaScript · 40 lines · 27 code · 4 blank · 9 comment · 0 complexity · 737b27ed94b60574160a622124954574 MD5 · raw file

  1. /**
  2. * $Id: editor_plugin_src.js 520 2008-01-07 16:30:32Z spocke $
  3. *
  4. * @author Moxiecode
  5. * @copyright Copyright Š 2004-2008, Moxiecode Systems AB, All rights reserved.
  6. */
  7. (function() {
  8. tinymce.create('tinymce.plugins.EmotionsPlugin', {
  9. init : function(ed, url) {
  10. // Register commands
  11. ed.addCommand('mceEmotion', function() {
  12. ed.windowManager.open({
  13. file : url + '/emotions.htm',
  14. width : 250 + parseInt(ed.getLang('emotions.delta_width', 0)),
  15. height : 160 + parseInt(ed.getLang('emotions.delta_height', 0)),
  16. inline : 1
  17. }, {
  18. plugin_url : url
  19. });
  20. });
  21. // Register buttons
  22. ed.addButton('emotions', {title : 'emotions.emotions_desc', cmd : 'mceEmotion'});
  23. },
  24. getInfo : function() {
  25. return {
  26. longname : 'Emotions',
  27. author : 'Moxiecode Systems AB',
  28. authorurl : 'http://tinymce.moxiecode.com',
  29. infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/emotions',
  30. version : tinymce.majorVersion + "." + tinymce.minorVersion
  31. };
  32. }
  33. });
  34. // Register plugin
  35. tinymce.PluginManager.add('emotions', tinymce.plugins.EmotionsPlugin);
  36. })();