Page 1 of 1
Newbie Qustion for tinyMce
Posted: Fri Sep 05, 2008 2:28 am
by millergroup
Being new to php coding, time to time I need help finding my way around all the contents. Reading through help files sometimes doesn't map out where to add or place code. Anyway I need help placing this code to add a button on the tinyMce toolbar. Thanks
tinyMCE.init({
theme : "advanced",
mode : "textareas",
plugins : "directionality",
theme_advanced_buttons3_add
: "directionality",
spellchecker_languages :
"+English=en,Swedish=sv"
});
Re: Newbie Qustion for tinyMce
Posted: Sat Sep 06, 2008 2:01 am
by millergroup
The only piece of script that I can fond to add buttons is this: If you can direct me from here?
{literal} tinyMCE.init({ {/literal}
{* Setup *}
mode : "exact",
elements : "{$textareas}",
content_css : "{$css}",
{* //Performance *}
entity_encoding : "{$encoding}",
button_tile_map : true, //performance update
{* //Visual *}
theme : "advanced",
skin : "{$skin}",
skin_variant : "{$skinvariation}",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
accessibility_warnings : false,
fix_list_elements : true,
verify_html : true,
verify_css_classes : false,
plugins : "-cmslinker,-customdropdown,{$plugins}",
theme_advanced_buttons1 : "{$toolbar1}",
theme_advanced_buttons2 : "{$toolbar2}",
theme_advanced_buttons3 : "{if isset($toolbar3)}{$toolbar3}{/if}",
theme_advanced_blockformats : "{$blockformats}",
document_base_url : "{$rooturl}/",
{if $relativeurls=="true"}
relative_urls : true,
remove_script_host : false,
{else}
relative_urls : false,
remove_script_host : true,
{/if}
language: "{$language}",
dialog_type: "modal",
apply_source_formatting : {$sourceformatting},
{if $showpath!=''}
theme_advanced_statusbar_location : 'bottom',
theme_advanced_path : true,
{/if}
{if $editorwidth!=''}
width : {$editorwidth},
{/if}
{if $editorheight!=''}
height : {$editorheight},
{/if}
force_br_newlines : {$force_br_newlines},
force_p_newlines : {$force_p_newlines},
forced_root_block : {$forcedrootblock},
plugin_insertdate_dateFormat : "{$dateformat}",
plugin_insertdate_timeFormat : "{$timeformat}",
{if $css_styles!=''}
theme_advanced_styles : '{$css_styles}',
{/if}
{$extraconfig}
file_browser_callback : 'CMSMSFilePicker'
{literal}
});
{/literal}
{literal}
function toggleEditor(id) {
if (!tinyMCE.getInstanceById(id))
tinyMCE.execCommand('mceAddControl', false, id);
else
tinyMCE.execCommand('mceRemoveControl', false, id);
}
{/literal}
{literal}
function CMSMSFilePicker (field_name, url, type, win) {
{/literal}
var cmsURL = "{$rooturl}/modules/TinyMCE/filepicker.php?type="+type;
{literal}
tinyMCE.activeEditor.windowManager.open({
{/literal}
file : cmsURL,
title : '{$filepickertitle}',
width : '{$fpwidth}',
height : '{$fpheight}',
resizable : "yes",
scrollbars : "yes",
inline : "yes", {* This parameter only has an effect if you use the inlinepopups plugin! *}
close_previous : "no"
{literal}
}, {
window : win,
input : field_name
});
return false;
}
{/literal}
Re: Newbie Qustion for tinyMce
Posted: Mon Sep 08, 2008 6:12 pm
by millergroup
Can I get some help?