1

So I am running into the issue where I can't add any custom javascript to elements inside the WYSIWYG because its an iFrame. Is there some special way of adding custom javascript.

The main thing I want to accomplish is adding a custom tooltip to img elements that have a title attribute.

I tried things like hook_wysiwyg_editor_settings_alter to add a js file with my custom code.

I have also tried doing some custom css to accomplish like using :hover, :before, and :after but found out that sometimes this doesn't work well on images on various browsers.

Any ideas on what a good solution would be for this problem? Might have to create a custom plugin that doesn't have a button that imports javascript, I wonder if that could work?

Your Answer

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

Browse other questions tagged or ask your own question.