Salut momo!
Moi je te déconseillerai de mettre un éditeur html pour les newsletters car ça donne trop de liberté à celui qui l'envoie et bien souvent un résultat d'affichage très mauvais dans les boîtes mails des destinataires.
Mais cela n'est que ma façon de voir les choses
Pour l'intégrer, il suffit de mettre ce code
<script language="javascript" type="text/javascript" src="tinymcpuk/tiny_mce.js"></script>
<script language="javascript" type="text/javascript">
tinyMCE.init({
language : "fr",
mode : "exact",
elements : "description",
theme : "advanced",
plugins : "table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,zoom,flash,searchreplace,print,paste,fullscreen,noneditable,contextmenu",
theme_advanced_disable : "formatselect",
theme_advanced_buttons1_add_before : "separator",
theme_advanced_buttons2_add : "preview,zoom,liststyle",
theme_advanced_buttons2_add_before: "cut,copy,paste,pastetext,pasteword,separator,search,replace,separator",
theme_advanced_buttons3_add_before : "tablecontrols,separator",
theme_advanced_buttons3_add : "iespell,flash,advhr,separator,print,ltr,rtl",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
plugin_insertdate_dateFormat : "%Y-%m-%d",
plugin_insertdate_timeFormat : "%H:%M:%S",
extended_valid_elements : "hr[class|width|size|noshade]",
file_browser_callback : "fileBrowserCallBack",
content_css : "/css/editeur.css",
paste_use_dialog : false,
theme_advanced_resizing : true,
theme_advanced_resize_horizontal : false,
theme_advanced_link_targets : "_something=My somthing;_something2=My somthing2;_something3=My somthing3;",
apply_source_formatting : true
});
function fileBrowserCallBack(field_name, url, type, win) {
var connector = "../../filemanager/browser.html?Connector=connectors/php/connector.php";
var enableAutoTypeSelection = true;
var cType;
tinymcpuk_field = field_name;
tinymcpuk = win;
switch (type) {
case "image":
cType = "Image";
break;
case "flash":
cType = "Flash";
break;
case "file":
cType = "File";
break;
}
if (enableAutoTypeSelection && cType) {
connector += "&Type=" + cType;
}
window.open(connector, "tinymcpuk", "modal,width=600,height=400");
}
</script>
où
elements : "description",
désigne les id (ou name ?) des textareas où tu veux faire agir Tinymcpuk.
Last edited by Elyos (16-05-2009 23:03:08)