ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Can I create a custom HTML Formatting Button for inserting an image that will pull from uploads?

December 13, 2010 10:29pm

Subscribe [3]
  • #1 / Dec 13, 2010 10:29pm

    gcylinder

    49 posts

    Any way to create custom img buttons that will prompt the user to select an image from uploads? When I create a custom button and copy the code from the existing IMG button, it just asks the user to enter an http link. I’m willing to monkey around with MarkItUp if I can find where EE implements it. I see the compressed js files in system/expressionengine/javascript/compressed but I’ve no idea where the styles are so I can make a button, etc. And I’m not sure, once I figure that part out, how to get it to use an image from uploads.

    Thanks in advance.

  • #2 / Dec 14, 2010 9:43am

    Sue Crocker

    26054 posts

    It sounds like a Feature Request would be one solution, or you might need to create an extension. Would you like me to move this to the Development forum for additional community support?

  • #3 / Dec 14, 2010 1:00pm

    gcylinder

    49 posts

    Thanks for the response. If you think moving it isn’t overkill. After searching some more, I did run across this thread this morning:

    http://ellislab.com/forums/viewthread/164433/

    It seems to imply this is either a bug (for which a report was filed, but doesn’t seem to exist at the link supplied anymore) or as you point out, a feature that requires custom code, and that customer support is aware of it and intends to fix/change it in a future release…if I read the thread’s responses correctly.

    I wanted such a feature because I have two different IMG classes that align images differently, and wanted the user to be able to just click a button for either option and off they go, no HTML/CSS knowledge necessary. I temporarily got around my issue by using MarkItUp code on the default IMG formatting button to prompt the user to enter a class name, and using the custom field instructions to let them know what the class name options are.

    Thanks again.

  • #4 / Dec 14, 2010 5:50pm

    Ingmar

    29245 posts

    So, you’re good? Just making sure.

  • #5 / Dec 14, 2010 7:16pm

    gcylinder

    49 posts

    Thanks for that. Yeah, my workaround is fine for now. The ability to build two separate IMG buttons, each with it’s own pre-filled class and drawing from the file browser would have been ideal, but hacking the existing IMG button to request the user fill in a class works OK:

    [![Link:!:http://]!]
  • #6 / Dec 15, 2010 10:45am

    Sue Crocker

    26054 posts

    Thanks for posting your solution - Don’t hesitate to post again as needed.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases