The images used for background images in markItUp are always pathed
/sets/default/images/.png. It would be useful for modules to specify other image names or directories in order to seperate module-specific buttons from the default set. Additionally, this can be useful when integrating other full sets into wysiwyg without copying the images to default/iamges.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

kienan’s picture

Status: Active » Needs review
FileSize
1.04 KB

Potential patch.

In hook_editor_settings_alter(), the following two fields can be added to the button's array: "imageDir" which specifies the base image dir. Default remains the same as before, and "imageFile" which can be used the specify the file name. The default for "imageFile" is the buttonname.png.

populist’s picture

I would also like to add it would be helpful to have a NULL option (which perhaps this would allow). There is a use case I have seen where you want to add button separators (which Markitup! allows and provides a classname for) but WYSIWYG.module's JS will try to load an image anyway.

populist’s picture

Here is a re-roll of the patch in #1 which adds a check for the special class "markItUpSeparator". This is used in Markitup! core to denote a separator and won't need a button.

sun’s picture

Could we add some inline comments to explain what is being done and why? So that we don't mistakenly break this functionality in the future?

Aside from that, this looks good to me.

mgifford’s picture

Issue summary: View changes
Status: Needs review » Needs work
Parent issue: » #2343445: Stable release of Wysiwyg module, v7.x-2.4 please

For the inline comments, setting this to Needs Work.

cboyden’s picture

Status: Needs work » Needs review
FileSize
1.2 KB

Rerolled to apply to 7.x-2.x and added inline comments.