PageRenderTime 40ms CodeModel.GetById 15ms RepoModel.GetById 1ms app.codeStats 0ms

/BlogEngine/BlogEngine.NET/editors/tiny_mce_3_4_3_1/plugins/advimage/editor_plugin_src.js

#
JavaScript | 50 lines | 32 code | 5 blank | 13 comment | 2 complexity | 5134485db327459f7b10de273b50a5e8 MD5 | raw file
Possible License(s): LGPL-2.1, Apache-2.0, BSD-3-Clause
  1. /**
  2. * editor_plugin_src.js
  3. *
  4. * Copyright 2009, Moxiecode Systems AB
  5. * Released under LGPL License.
  6. *
  7. * License: http://tinymce.moxiecode.com/license
  8. * Contributing: http://tinymce.moxiecode.com/contributing
  9. */
  10. (function() {
  11. tinymce.create('tinymce.plugins.AdvancedImagePlugin', {
  12. init : function(ed, url) {
  13. // Register commands
  14. ed.addCommand('mceAdvImage', function() {
  15. // Internal image object like a flash placeholder
  16. if (ed.dom.getAttrib(ed.selection.getNode(), 'class').indexOf('mceItem') != -1)
  17. return;
  18. ed.windowManager.open({
  19. file : url + '/image.htm',
  20. width : 480 + parseInt(ed.getLang('advimage.delta_width', 0)),
  21. height : 385 + parseInt(ed.getLang('advimage.delta_height', 0)),
  22. inline : 1
  23. }, {
  24. plugin_url : url
  25. });
  26. });
  27. // Register buttons
  28. ed.addButton('image', {
  29. title : 'advimage.image_desc',
  30. cmd : 'mceAdvImage'
  31. });
  32. },
  33. getInfo : function() {
  34. return {
  35. longname : 'Advanced image',
  36. author : 'Moxiecode Systems AB',
  37. authorurl : 'http://tinymce.moxiecode.com',
  38. infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advimage',
  39. version : tinymce.majorVersion + "." + tinymce.minorVersion
  40. };
  41. }
  42. });
  43. // Register plugin
  44. tinymce.PluginManager.add('advimage', tinymce.plugins.AdvancedImagePlugin);
  45. })();