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.
We've had this wonderful and powerful hook for some time, but it's not mentioned in wysiwyg.api.php.
Comment | File | Size | Author |
---|---|---|---|
#7 | wysiwyg-HEAD.editor-settings-alter.7.patch | 1.69 KB | TwoD |
#6 | wysiwyg-HEAD.editor-settings-alter.6.patch | 1.5 KB | sun |
Comments
Comment #1
TwoDSome of these are pretty obvious but included for sake of completeness.
Suggestions?
Comment #2
sunI don't think this should hold up the release, but of course, we can commit anything that's ready.
From the listed sections, only basics and purpose should be documented for now. A brief sentence about audience/powers/limitations may be added, but I wouldn't want to "officially formalize" this hook's usage yet, as it's poor workaround for our API/feature limitations.
Comment #3
scarvajal CreditAttribution: scarvajal commentedThere is a way to know wich wysiwyg profile or input format is active inside this hook?
I'm trying to override Ckeditor toolbars here to circunvent the icons group limitation (no wrap).
Thanks.
Comment #4
TwoDYes, the strings
$context['profile']->format
and$context['profile']->editor
should have that information.The profile object is the same one as retrieved from wysiwyg_profile_load($format).
EDIT: Fixed syntax, thanks!
Comment #5
scarvajal CreditAttribution: scarvajal commentedThanks TwoD!
Is $context['profile']->format, is not ?
Comment #6
sunCouldn't think of simple example code, so I left the function body empty.
Comment #7
TwoDHow about this?
I added the comments to avoid questions about why something like this won't work:
(Taken from the CKEditor config docs.)
Comment #8
sunThanks for reporting, reviewing, and testing! Committed with minor adjustments to all branches.
A new development snapshot will be available within the next 12 hours. This improvement will be available in the next official release.