Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
RTE for introtext #modx
<?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>');
@gleighfield

This comment has been minimized.

Copy link

@gleighfield gleighfield commented Aug 14, 2014

I think a global system setting to toggle this feature on/off would be a good call to go along with this too.

@jaygilmore

This comment has been minimized.

Copy link

@jaygilmore jaygilmore commented Aug 14, 2014

This is brilliant. Yes please.

@StevenMorgan

This comment has been minimized.

Copy link

@StevenMorgan StevenMorgan commented Aug 14, 2014

I would take the Settings logic a little further - based on template or template category.

Great addition @christianeel 👍

@bertoost

This comment has been minimized.

Copy link

@bertoost bertoost commented Aug 16, 2014

Great! But I'd like to have setting for that :-)

@MacConin

This comment has been minimized.

Copy link

@MacConin MacConin commented Oct 7, 2014

christian: cool. thx

@mikenuttall

This comment has been minimized.

Copy link

@mikenuttall mikenuttall commented Oct 7, 2014

Yes, that's useful thanks :-)

@enminc

This comment has been minimized.

Copy link

@enminc enminc commented Oct 16, 2014

thx for sharing

@sepiariver

This comment has been minimized.

Copy link

@sepiariver sepiariver commented Oct 16, 2014

Awesome, Christian 👍

@DeaconBofrost

This comment has been minimized.

Copy link

@DeaconBofrost DeaconBofrost commented Oct 30, 2014

Hi, but this is only working with the tinymce editor. Not with the CKEditor

@claytonk

This comment has been minimized.

Copy link

@claytonk claytonk commented Jan 8, 2015

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.

@Mark-H

This comment has been minimized.

Copy link

@Mark-H Mark-H commented Sep 4, 2015

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

@donShakespeare

This comment has been minimized.

Copy link

@donShakespeare donShakespeare commented Jul 16, 2016

This is the default behaviour of TinymceWrapper ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.