pepebe
1/19/2015 - 10:55 AM

introRTE-1.snippet.php

<?php
// Add RTE for introtext if richtext option is enabled for the resource
// check "OnDocFormRender" event

$templateIDs = array(26);

if( in_array( $resource->template , $templateIDs ) ) {
    $modx->regClientStartupHTMLBlock('<script>Ext.onReady(function() {
        if(MODx.loadRTE) MODx.loadRTE("modx-resource-introtext");
    });</script>');
}
<?php
// Add RTE for introtext if richtext option is enabled for the resource
// check "OnDocFormRender" event

$modx->regClientStartupHTMLBlock('<script>Ext.onReady(function() {
    if(MODx.loadRTE) MODx.loadRTE("modx-resource-introtext");
});</script>');