Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comments
Comment #1
kienan CreditAttribution: kienan commentedPotential 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.
Comment #2
populist CreditAttribution: populist commentedI 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.
Comment #3
populist CreditAttribution: populist commentedHere 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.
Comment #4
sunCould 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.
Comment #5
mgiffordFor the inline comments, setting this to Needs Work.
Comment #6
cboyden CreditAttribution: cboyden at UC Berkeley Web Platform Services commentedRerolled to apply to 7.x-2.x and added inline comments.