[ 1 post ]

David

  • Username: plasmatic
  • Joined: Sun Jul 08, 2012 9:08 am
  • Posts: 1
  • Offline
  • Profile

Resize Images in YUI3 Editor

Post Posted: Sun Jul 08, 2012 9:26 am
+0-
Is it possible to allow images inserted into the editor to be resized by the user in the editor? I tried combining it with the resize plugin, but I was unable to do so :/

Code:
//global variable insertedImageCount exists
editor.execCommand('inserthtml', '<img src="' + fileName + '" id="yui-inserted-image'+insertedImageCount+'" />');
YUI().use('resize', function(Y) {
   var resize = new Y.Resize({
       node: '#yui-inserted-image'+insertedImageCount
   });   
});
insertedImageCount++;


Is this because the editor is in an iframe and maybe it cannot find #yui-inserted-imageX? What's a workaround here?
  [ 1 post ]
Display posts from previous:  Sort by  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum