3

I'm using the scald module for image management. It's working 99% as I'd want it to - but when used with WYSIWYG (ckeditor) I'm having an annoying issue.

The images in this context need captions so I've hooked into the scald templating and changed the output to use and tags.

All fine - except when saved the WYSIWYG / scald seem to add lots of empty

tags between the figure and the figcaption.

Attempting to use the empty paragraph tag module or create my own input filter have failed as they run before scald replaces the atom reference with the actual image output.

Any suggestions on where to hook into scald to be able to influence this markup?

1

I've been able to resolve this without using Scald templating.

The Scald plugin for CKeditor automatically inserts the image Title as the caption just below the image. This text is editable in WYSIWYG if you want to replace the image Title with your own caption.

Below is how it looks at my site. Notice the caption just below the image. (This is without any additional CSS - it can look nicer if you add some some CSS.)

enter image description here

And this is the markup inserted by the Scald plugin. The caption is in the <div> with the class dnd-legend-wrapper:

<div class="dnd-atom-wrapper type-image context-sdl_editor_representation atom-align-right" contenteditable="false">
<div class="dnd-drop-wrapper"><!-- scald=2:sdl_editor_representation {"link":""} -->
<div class="image"><img alt="Fred Espen Benth" src="http://example.com/sites/default/files/styles/large/public/thumbnails/image/fredespenbenth.jpg?itok=TwJhh_s6" style="height:320px; width:480px" title="Fred Espen Benth" /></div>
<!-- END scald=2 --></div>

<div class="dnd-legend-wrapper" contenteditable="true">
<div class="meta"><!--copyright=2-->Fred Espen Benth. Foto: Gunhild M. Haugnes<!--END copyright=2-->.</div>
</div>
</div>
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.