Allow caption text to be aligned independently of image
(Why the issue was filed, steps to reproduce the problem, etc.)
Proposed resolution
This patch allows caption text inside a caption to be aligned/justified, without having to justify the image itself. When an image is inserted to wysiwyg editor (via insert.module) with a caption, the caption text is wrapped in P element with class "caption-text".
Next, if you click into this text and click one of the left/center/right justify buttons in wysiwyg toolbar, that button gets hijacked by our module. Instead of applying text-align style to the element, it applies a class ("caption-text-[left,right,center]") to the P element. This element is then aligned via caption-filter.css.
This patch only applies to CKEditor, and extends patch https://drupal.org/node/696734#comment-8424019.
Remaining tasks
Integrate this feature, as well as proposals in 696734 to TinyMCE.
User interface changes
In the wysiwyg interface, you do not need to highlight all the text inside a caption box to align it. Just click on part of the text and click left/right/center justify button.
Comment | File | Size | Author |
---|---|---|---|
#1 | caption_filter-caption_text_alignment-2221523-1.patch | 16.34 KB | krisahil |
Comments
Comment #1
krisahil CreditAttribution: krisahil commented