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.
/**
* Returns HTML for an asset
*/
function mytheme_asset($vars) {
return drupal_render($vars['content']);
}
/**
* Returns HTML for an asset wrapper
*/
function mytheme_asset_wrapper($vars) {
return $vars['content'];
}
This will break asset editing in CKEdtor... but what if I want no markup at all?
Comments
Comment #0.0
SebCorbin CreditAttribution: SebCorbin commentedUpdated issue summary.
Comment #1
dcmouyard CreditAttribution: dcmouyard at Forum One commentedIt turns out that if you override asset-wrapper.tpl.php then the full markup gets injected into the WYSIWYG editor instead of the token.
You can edit an asset by right-clicking on it after adding one, but only until you save the entity. Afterwards, right-clicking on the asset and choosing "Edit asset" or "Override asset" does nothing.
If you just override asset.tpl.php, then all markup outside of render($content['field_asset_image']) get injected into the WYSIWYG editor everytime editor is used.