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.
Problem/Motivation
The MarkItUp editor JS in the WYSIWYG module doesn't allow for icons provided by a custom module.
Steps to reproduce
Attempt to use the WYSIWYG MarkItUp BBCode module I've put into a sandbox. The YouTube button will not render, even though it's properly providing the icon path and file per the WYSIWYG API.
Proposed solution
Alter the markitup.js file that is included with WYSIWYG module to respect icon paths and files. Patch incoming.
Comment | File | Size | Author |
---|---|---|---|
#7 | wysiwyg-markitup_custom_icons-2025625-7.patch | 4.25 KB | jrbeeman |
#6 | wysiwyg-markitup_custom_icons-2025625-6.patch | 4.28 KB | jrbeeman |
#5 | 2025625-d7-5.patch | 4.21 KB | redndahead |
#1 | wysiwyg-markitup_custom_icons-2025625-1.patch | 1002 bytes | jrbeeman |
Comments
Comment #1
jrbeemanPatch attached.
Comment #2
jrbeemanComment #3
redndahead CreditAttribution: redndahead commentedI created a patch here that will allow someone to create their own icon sets by using hook_wysiwyg_editor_settings_alter. It would be great if someone could help review it.
https://www.drupal.org/node/577258#comment-8922315
Comment #4
redndahead CreditAttribution: redndahead commentedSorry duplicate post.
Comment #5
redndahead CreditAttribution: redndahead commentedThis patch is based off of the patch in comment 32 of #397994: markItUp Markdown editor integration. It adds an info hook and a configuration form for adding iconsets. You can find an example module here: https://www.drupal.org/sandbox/redndahead/2295875
Comment #6
jrbeemanRe-rolled patch against the latest related patch in #397994-34: markItUp Markdown editor integration.
Comment #7
jrbeemanRe-rolled patch against the latest related patch in #397994-37: markItUp Markdown editor integration.