Is there a way to limit the use of TinyMCE to one document and it's children?
This would be preferred over setting up a user restricted in this manner, which may be the only way to achieve what I want.
Another thing that would work would be if I can set the "Toggle Editor" off, by default. I can't find the setting anywhere ,and it seems like a no-brainer of an option to make available.
Can't you just set the richtext field for that document on and set the richtext_default System Setting to off?
Children should inherit the richtext field setting when they are created. If not, you should be able to create a plugin to make that happen.
------------------------------------------------------------------------------------------
PLEASE, PLEASE specify the version of MODX you are using.
MODX info for everyone:
http://bobsguides.com/modx.html
Thanks for the reply, Bob.
Ya, it's so simple it may just work. However, I still would have to go in and turn it off manually for all docs that already exists, and that would mean all my markup and snippet calls will get butchered.
Thanks as usual, Bob.
For Revolution, you could just put this code in a snippet and view a page with the snippet tag:
<?php
/* get all resources */
$resources = $modx->getIterator('modResource');
foreach($resources as $resource) {
/* if not 'richtext' document, turn off richtext and save */
if ($resource->get('id') != 12) { // ID of resource you want to leave as rich text
if ($resource->get('richtext')) {
$resource->set('richtext', false);
$resource->save();
}
}
}
That will unset the richtext field without having to load and save the resources.
------------------------------------------------------------------------------------------
PLEASE, PLEASE specify the version of MODX you are using.
MODX info for everyone:
http://bobsguides.com/modx.html
}
[ed. note: BobRay last edited this post 14 years, 1 month ago.]
I think I see what you are doing here, and it appears to be a brilliant idea. However, I am getting the following error when viewing:
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /home/deniro03/public_html/clients/test1/core/cache/includes/elements/modsnippet/28.include.cache.php on line 14
-
☆ A M B ☆
- 24,524 Posts
if (resource->get('richtext')) {
Missing $ there, I believe.
Thanks, fixed. Of the two of us, aren't you supposed to be the one with poor eyesight?
------------------------------------------------------------------------------------------
PLEASE, PLEASE specify the version of MODX you are using.
MODX info for everyone:
http://bobsguides.com/modx.html
I had to add a "}" at the very bottom. That and sottwell's suggestion fixed it. I am testing now, but it appears to be working beautifully. I can't thank you all enough.
-
☆ A M B ☆
- 24,524 Posts
Quote from: BobRay at Aug 14, 2012, 12:04 AMThanks, fixed. Of the two of us, aren't you supposed to be the one with poor eyesight?
That just means I have to look harder and longer! And I still missed the missing closing brace.