-
-
Save christianseel/780b16f202c873b3b278 to your computer and use it in GitHub Desktop.
<?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>'); |
This is brilliant. Yes please.
I would take the Settings logic a little further - based on template or template category.
Great addition @christianeel 👍
Great! But I'd like to have setting for that :-)
christian: cool. thx
Yes, that's useful thanks :-)
thx for sharing
Awesome, Christian 👍
Hi, but this is only working with the tinymce editor. Not with the CKEditor
Any way to do this with static resources? I assume I need to use something other than "modx-resource-introtext"? Works great on standard resources with Redactor.
Redactor 2 introduces a setting for this (redactor.loadIntrotext). For it to work on non-standard resources though (@claytonk), this PR needs to be merged into the next release: modxcms/revolution#12632
This is the default behaviour of TinymceWrapper ;)
I think a global system setting to toggle this feature on/off would be a good call to go along with this too.