Home » support » Plug-ins » sfTinyMCEConfigPlugin
| sfTinyMCEConfigPlugin [message #46552] |
Wed, 27 February 2008 13:55  |
vortek Messages: 16 Registered: October 2007 Location: Braga |
Junior Member |
|
|
I installed the plugin, updated the settings.yml with
.settings:
.rich_text_editor_class: TinyMCEExtended
but i can't see any diference.
I use the tinymce as folows:
fields:
texto:
params: rich=true tinymce_options=height:600, width:700, language:'en'
Do i need to enable the plugin somehow?
[Updated on: Wed, 27 February 2008 13:59]
|
|
| | | |
| Re: sfTinyMCEConfigPlugin [message #49155 is a reply to message #49116 ] |
Fri, 04 April 2008 04:24   |
jillelaine Messages: 212 Registered: January 2008 Location: West Coast |
Faithful Member |
|
|
Okay, I tried this in tiny_mce.yml (Is this the right place...and right line...to put the line 'tinymce_gzip: true' within the tiny_mce.yml file?):
options:
mode: exact
tinymce_gzip: true
and this is what I see in 'view source'
<script type="text/javascript">
//<![CDATA[
tinyMCE.init({mode: 'exact', language: "en", elements: "course_description_description", plugins: "table,paste", theme: 'advanced', theme_advanced_toolbar_location: "top", theme_advanced_toolbar_align: "left", theme_advanced_path_location: "bottom", theme_advanced_buttons1: "separator,bold,italic,underline,separator,undo,redo,separator,justifyleft,justifycenter,justifyright,separator,fontsizeselect,forecolorpicker,backcolorpicker,separator,link,unlink,separator",
theme_advanced_buttons2: "separator,bullist,numlist,separator,outdent,indent,separator,tablecontrols,separator",
theme_advanced_buttons3: "separator,hr,separator,code,removeformat,separator,pastetext,pasteword,selectall,separator", extended_valid_elements: "img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name]", relative_urls: false, debug: false,height:300,width:600});
//]]>
</script>
If the gzip was working, the script would start:
tinyMCE_GZ.init({mode: 'exact' ...
I looked at sfRichTextEditorTinyMCEExtended.class.php and see the code that creates the script:
$tinymce_js = 'tinyMCE.init({';
// Mode
$tinymce_js .= "mode: '$mode'";
// Language
$tinymce_js .= ', language: "'.strtolower(substr($culture, 0, 2)).'"';
// Elements
$tinymce_js .= ', elements: "'.$id.'"';
// Plugins
if ($plugins) {
$tinymce_js .= ', plugins: "'.$plugins.'"';
}
// Theme
$tinymce_js .= ", theme: '$theme'";
// Toolbar
$tinymce_js .= ', theme_'.$theme.'_toolbar_location: "'.$tbLocation.'"';
$tinymce_js .= ', theme_'.$theme.'_toolbar_align: "'.$tbAlign.'"';
$tinymce_js .= ', theme_'.$theme.'_path_location: "'.$pathLocation.'"';
// Buttons
if ($buttons) {
$tinymce_js .= ', '.$buttons;
}
// Extended Valid Elements
$tinymce_js .= ', extended_valid_elements: '.$extendedValidElements;
// Relative Urls
$tinymce_js .= ', relative_urls: '.$relativeUrls;
// Debug
$tinymce_js .= ', debug: '.$debug;
// Custom Options
$tinymce_js .= ($tinymce_options ? ','.$tinymce_options : '');
$tinymce_js .= (isset($options['tinymce_options']) ? ','.$options['tinymce_options'] : '');
if (isset($config['options']['misc']))
{
foreach ( $config['options']['misc'] as $name => $value)
{
$tinymce_js .= ", $name: \"$value\"";
}
}
if (isset($options['tinymce_options'])) {
unset($options['tinymce_options']);
}
$tinymce_js .= '});';
I'm not sure how tinyMCE_GZ.init({ would ever be created from this code, even if the option tinymce_gzip: true was recognized? Perhaps this code would work with an older version of TinyMCE: I have 3.0.5.
Well, the gzip would be nice if it is possible -> but please understand that I like this plugin VERY much already! It is handy and easy to use. Thank you!
|
|
| | | | | | |
| Re: sfTinyMCEConfigPlugin [message #53494 is a reply to message #46552 ] |
Wed, 04 June 2008 19:54  |
wtfowned Messages: 8 Registered: May 2008 |
Junior Member |
|
|
in example yaml file we can see that "debug" key is lower level than "options" key , at class code:
$debug = $config['options']['debug'] ? 'true' : 'false';
so it should be :
$debug = $config['debug'] ? 'true' : 'false';
Also i have 2 additional errors:
Strict Standards: Creating default object from empty value in /usr/share/php/symfony/util/Spyc.class.php on line 200
Notice: Undefined property: stdClass::$data in /usr/share/php/symfony/util/Spyc.class.php on line 201
string(5) "false"
As i understand its problem with my .yaml file ?
Can anyone please show his normal tiny_mce.yaml file ? -)
Thx
|
|
|
Goto Forum:
|