<![CDATA[ MODx Revolution 2.0.0-rc-2; TinyMCE does not appear in chunks - My Forums]]> https://forums.modx.com/thread/?thread=46127 <![CDATA[Re: MODx Revolution 2.0.0-rc-2; TinyMCE does not appear in chunks]]> https://forums.modx.com/thread/46127/modx-revolution-2-0-0-rc-2-tinymce-does-not-appear-in-chunks?page=3#dis-post-527213
http://tracker.modx.com/issues/4308

Edit file in /manager/assets/modext/widgets/element/modx.panel.chunk.js

replace

if (MODx.onLoadEditor) { MODx.onLoadEditor(this); }

with

if (MODx.config.use_editor && MODx.loadRTE) {
MODx.loadRTE('modx-chunk-snippet');
}
]]>
trussframework Jun 20, 2015, 06:32 PM https://forums.modx.com/thread/46127/modx-revolution-2-0-0-rc-2-tinymce-does-not-appear-in-chunks?page=3#dis-post-527213
<![CDATA[Re: MODx Revolution 2.0.0-rc-2; TinyMCE does not appear in chunks]]> https://forums.modx.com/thread/46127/modx-revolution-2-0-0-rc-2-tinymce-does-not-appear-in-chunks?page=3#dis-post-451880
thanks]]>
faolie Jan 24, 2013, 07:30 AM https://forums.modx.com/thread/46127/modx-revolution-2-0-0-rc-2-tinymce-does-not-appear-in-chunks?page=3#dis-post-451880
<![CDATA[Re: MODx Revolution 2.0.0-rc-2; TinyMCE does not appear in chunks]]> https://forums.modx.com/thread/46127/modx-revolution-2-0-0-rc-2-tinymce-does-not-appear-in-chunks?page=3#dis-post-423750




------------------------------------------------------------------------------------------
PLEASE, PLEASE specify the version of MODX you are using.
MODX info for everyone: http://bobsguides.com/modx.html]]>
BobRay May 17, 2012, 01:15 AM https://forums.modx.com/thread/46127/modx-revolution-2-0-0-rc-2-tinymce-does-not-appear-in-chunks?page=3#dis-post-423750
<![CDATA[Re: MODx Revolution 2.0.0-rc-2; TinyMCE does not appear in chunks]]> https://forums.modx.com/thread/46127/modx-revolution-2-0-0-rc-2-tinymce-does-not-appear-in-chunks?page=3#dis-post-266771
First, download getResourceField snippet.

I created a container resource which will hold all of the Chunks a client would edit. Within this container I created a resource called ’Footer’ which has an id of 26. I inserted my footer content and formatted how I like.

In my template I added the snippet call [[getResourceField? &id=`26` &field=`content`]] and voila.

So barring some further testing, as far as I can tell this is exactly what I was looking for.]]>
graves007 Jun 23, 2011, 12:03 PM https://forums.modx.com/thread/46127/modx-revolution-2-0-0-rc-2-tinymce-does-not-appear-in-chunks?page=3#dis-post-266771
<![CDATA[Re: MODx Revolution 2.0.0-rc-2; TinyMCE does not appear in chunks]]> https://forums.modx.com/thread/46127/modx-revolution-2-0-0-rc-2-tinymce-does-not-appear-in-chunks?page=3#dis-post-266770
If I have a News Chunk that appears site wide, I would like clients (and myself for that matter) to be able to easily edit it without having to introduce additional Resources, TVs, Form Customization yadda yadda yadda. Surely it doesnt have to be this complicated.

Any help is very much appreciated.]]>
graves007 Jun 23, 2011, 11:15 AM https://forums.modx.com/thread/46127/modx-revolution-2-0-0-rc-2-tinymce-does-not-appear-in-chunks?page=3#dis-post-266770
<![CDATA[Re: MODx Revolution 2.0.0-rc-2; TinyMCE does not appear in chunks]]> https://forums.modx.com/thread/46127/modx-revolution-2-0-0-rc-2-tinymce-does-not-appear-in-chunks?page=3#dis-post-266769 Quote from: [email protected] at May 21, 2011, 01:49 PM

Thanks you nailed it. Was doing some research and this article covers it quite nicely http://www.gregorysmart.com/2010/01/08/create-a-user-config-page-in-modx/ . Kind of allows you to use tvs in a global sense. They used getField but I think this is discontinued.

I opted to use getresourcefield I did this call [[getResourceField? &id=`1` &field=`news_summ` &processTV=`1`]] . This way if the tv was created in document 1, I can use the tv in document 2 by calling the actual value of the tv in document.

By the way this community is super fast in responding thanks again guys.

I’m glad you found something that works.

BTW, I think the snippet I posted might be significantly faster and more efficient for this (though the actual time differences might be trivial), because it doesn’t have to retrieve the resource itself. I’m pretty sure getResourceField gets the resource, then gets the TV, then gets the TV value. Since you’re not using any of the resource’s content fields, the first step is unnecessary.
]]>
BobRay May 21, 2011, 02:12 PM https://forums.modx.com/thread/46127/modx-revolution-2-0-0-rc-2-tinymce-does-not-appear-in-chunks?page=3#dis-post-266769
<![CDATA[Re: MODx Revolution 2.0.0-rc-2; TinyMCE does not appear in chunks]]> https://forums.modx.com/thread/46127/modx-revolution-2-0-0-rc-2-tinymce-does-not-appear-in-chunks?page=3#dis-post-266768 http://www.gregorysmart.com/2010/01/08/create-a-user-config-page-in-modx/ . Kind of allows you to use tvs in a global sense. They used getField but I think this is discontinued.

I opted to use getresourcefield I did this call [[getResourceField? &id=`1` &field=`news_summ` &processTV=`1`]] . This way if the tv was created in document 1, I can use the tv in document 2 by calling the actual value of the tv in document.

By the way this community is super fast in responding thanks again guys.]]>
[email protected] May 21, 2011, 08:49 AM https://forums.modx.com/thread/46127/modx-revolution-2-0-0-rc-2-tinymce-does-not-appear-in-chunks?page=3#dis-post-266768
<![CDATA[Re: MODx Revolution 2.0.0-rc-2; TinyMCE does not appear in chunks]]> https://forums.modx.com/thread/46127/modx-revolution-2-0-0-rc-2-tinymce-does-not-appear-in-chunks?page=3#dis-post-266767
1. Use a resource for the footer and use getResourceField to pull in the resource’s content field.

2. Create one document to hold the values of all the pseudo-chunks as Rich Text TVs. Use a simple snippet to get the appropriate TV’s value from that resource with $tv->getValue() wherever you would have used the chunk tag. You can use form customization to hide all table but the TV tab for that resource and let the users edit there, or (with a little trickery), you could let them use NewsPublisher to edit them in the front end. If necessary, you could also create a different document for editing each TV and hide the others with form customization (though you’d have to adjust the snippet to get the value from the correct resource).

I would probably do #2, though #1 involves less setup. Here’s a little more detail on #2:

Create a document called Chunks (let’s say it has an ID of 12).
Create a TV for each "pseudo-chunk" and attach it to the template used by the Chunks document. Call them "header," "footer," etc.

When you want to display the content of one of them, use a tag like this which calls the following snippet:

[[!ShowChunk? &chunkName=`footer`]]


<?php
/* ShowChunk snippet */
$tv = $modx->getObject('modTemplateVar', array ('name'=>$chunkName));

return $tv->getValue(12);


]]>
BobRay May 21, 2011, 01:27 AM https://forums.modx.com/thread/46127/modx-revolution-2-0-0-rc-2-tinymce-does-not-appear-in-chunks?page=3#dis-post-266767
<![CDATA[Re: MODx Revolution 2.0.0-rc-2; TinyMCE does not appear in chunks]]> https://forums.modx.com/thread/46127/modx-revolution-2-0-0-rc-2-tinymce-does-not-appear-in-chunks?page=2#dis-post-266766
A chunk on the other hand, always retains the value no matter where it is placed. Unfortunately it does not have the TinyMce editor in which a user can edit without knowing HTML. This is a huge drawback.]]>
[email protected] May 20, 2011, 09:43 PM https://forums.modx.com/thread/46127/modx-revolution-2-0-0-rc-2-tinymce-does-not-appear-in-chunks?page=2#dis-post-266766
<![CDATA[Re: MODx Revolution 2.0.0-rc-2; TinyMCE does not appear in chunks]]> https://forums.modx.com/thread/46127/modx-revolution-2-0-0-rc-2-tinymce-does-not-appear-in-chunks?page=2#dis-post-266765 Quote from: djverbal at May 19, 2011, 07:13 PM

And for the commenter that said that a TV is an acceptable work around... This still requires the user to make global changes without the wysiwyg which is not much of a work around.

I’m afraid I don’t know what you mean. If you make it a rich text TV, the users can make all their changes in TinyMCE. You could also do this with NewsPublisher and let the users edit the TV with TinyMCE in the front end after logging in.]]>
BobRay May 19, 2011, 10:46 PM https://forums.modx.com/thread/46127/modx-revolution-2-0-0-rc-2-tinymce-does-not-appear-in-chunks?page=2#dis-post-266765