Hello Eugene, welcome to the community.
You're completely correct, we need a helpful documentation on this.
A good heads up until we arrange this in the incoming days is yassines post
viewtopic.php?f=22&t=791#p1511
Since we don't have a hook for the editable function, which would make it extra easy to override, we're going to suggest another way.
In your functions.php, you can add a listener to the JavaScript, which strips the <span> tags with the subside id.
The functions.php file
Code: Select all
<?php
/**
* Adding listeren to js
* stripping all spans with subside id of their wrapping <span>
*/
wCMS::addListener('js', 'hideEditableBlockSubside');
function hideEditableBlockSubside($args) {
$script = <<<'EOT'
<script>
$(function() {
$('span#subside').contents().unwrap();
});
</script>
EOT;
$args[0].=$script;
return $args;
}
This saves you from editing the index.php, but we agree there should be a better way than solving it with jQuery. This could be solved easier if we made another hook to the editable function, and while we're at it, make an additional hook to the block function, which would enable easy overriding as shown in yassines post.
Hope this is helpful enough for now. Let us know what you think.