<textarea name="{{ WysiwygId|raw }}" id="{{ WysiwygId|raw }}" style="padding: 0; width: {{ WysiwygWidth|raw }}; height: {{ WysiwygHeight|raw }};">{{ WysiwygValue|raw }}</textarea>
<script type="text/javascript">
function {{ LoadFunctionName|raw }}()
{
	tinyMCE.init({
		// General options
		{{ ValidElements|raw }}
		mode : "exact",
		elements : "{{ WysiwygId|raw }}",
		theme : "advanced",
		skin : "o2k7",
		skin_variant : "silver",
		plugins : "safari,pagebreak,style,layer,table,save,interspireimg,linker,advlink,media,searchreplace,print,contextmenu,paste,fullscreen,visualchars,nonbreaking,xhtmlxtras,template,inlinepopups,mediaservice",

		// Theme options
		theme_advanced_buttons1 : "undo,redo,|,bold,italic,underline,formatselect,fontselect,fontsizeselect,justifyleft,justifycenter,justifyright,justifyfull,|,fullscreen",
		theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,cleanup,|,bullist,numlist,|,outdent,indent,|,link,unlink,anchor,image,media,table,linker,mediaservice,|,forecolor,backcolor,|,pagebreak,|,code",
		theme_advanced_buttons3 : "",
		theme_advanced_buttons4 : "",
		theme_advanced_toolbar_location : "top",
		theme_advanced_toolbar_align : "left",
		theme_advanced_statusbar_location : "bottom",
		theme_advanced_resizing : true,
		extended_valid_elements : "iframe[src|width|height|name|align|frameborder|scrollingframeborder]",
		relative_urls : false,
		remove_script_host : false,
		shop_path: "{{ ShopPath|raw }}",
		document_base_url : "{{ ShopPath|raw }}",
		content_css : "{{ AppPath|raw }}/javascript/tinymce/themes/advanced/skins/o2k7/content.css",
		external_link_list_url : "{{ AppPath|raw }}/admin/remote.php?remoteSection=imagemanager&w=GetImagesList",
		external_image_list_url : "{{ AppPath|raw }}/admin/remote.php?remoteSection=imagemanager&w=GetImagesList",
		theme_advanced_resizing_use_cookie: false,

		jquery_include_url: '{{ AppPath|raw }}/javascript/jquery.js?{{ JSCacheToken }}',
		jquery_file_upload_include_url: '{{ AppPath|raw }}/javascript/jquery/plugins/ajax.file.upload.js?{{ JSCacheToken }}',
		image_upload_url: '{{ AppPath|raw }}/admin/remote.php?remoteSection=imagemanager&w=UploadImage',

		paste_retain_style_properties: 'font-family,font-size,color,background-color'
	});
}
{{ LoadFunction|raw }}
</script>
