Mike November

Phonetic alphabet for my initials, k?

Viewing entries posted in July 2011

An update to the Pixlr module

Posted by Marcus Nyeholt on 23 July 2011 | 1 Comments

Tags: ,

One thing I've regularly found missing from SilverStripe is the ability to paste a screenshot directly into the CMS. Of course, that's not yet possible using JS or Flash directly, but Java does give you the option to access the clipboard, and using an applet, I've hooked this capability into the CMS.

Paste an image

It's not as fluent as clicking the wysiwyg and hitting Ctrl+V (though I'm sure someone could script those actions...), but clicking ctrl+shift+V when the "Insert Image" toolbar is open will paste to the applet, then you need to manually click the 'Upload' button. This will select the image for you in the list on the right, so you then can just click "Insert Image".

The other nice thing is being able to hook into the Pixlr editor. If you have the 'and Edit' box checked, then the pixlr editor will be launched after clicking upload, allowing you to modify the image immediately.

Editing with pixlr

You can get it from Github. It's currently self signed, so you'll get a java nag warning, and I've found that it performs terribly on OpenJDK on Ubuntu (though no problems with the Sun JRE). So let me know if you have any specific issues.

1 comments | Read the full post