Ŧá๒i๏ รilvค™ 491 Posted July 15, 2012 Boas, Aposto que muitas pessoas queriam ter um editor de textos como o do joomla, wordpress ... Eu pelo menos queria até ter encontrado este script em javascript que quase todos usam. Esse script chama-se tinymce. <--!Download!--> Façam o download do development package e extraiam. Depois vamos traduzir para Português, vão a este link, escolham portuguese e façam o Download, logo depois extraindo. Pasta do tiny->jscripts->tiny_mce->langs , ai colem a tradução pt.js. Agora vamos fazer a função dele, criem um js com o nome de tinymce_func.js e metam lá o seguinte código: tinyMCE.init({ // General options mode : "textareas", theme : "advanced", language : "pt", plugins : "autolink,lists,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,wordcount,advlist,autosave", // Theme options theme_advanced_buttons1 :"pastetext,pasteword,|,bullist,numlist,|,bold,italic,underline,blockquote,|,justifyleft,justifycenter,justifyright,fontselect,fontsizeselect,", theme_advanced_buttons2 : "undo,redo,|,link,unlink,image,code,|,preview,|,forecolor,backcolor,|,removeformat, fullscreen", theme_advanced_buttons3 : "", theme_advanced_toolbar_location : "top", theme_advanced_toolbar_align : "left", theme_advanced_statusbar_location : "bottom", theme_advanced_resizing : true, // Example content CSS (should be your site CSS) content_css : "css/content.css", // Drop lists for link/image/media/template dialogs template_external_list_url : "lists/template_list.js", external_link_list_url : "lists/link_list.js", external_image_list_url : "lists/image_list.js", media_external_list_url : "lists/media_list.js", // Style formats style_formats : [ {title : 'Bold text', inline : 'b'}, {title : 'Red text', inline : 'span', styles : {color : '#ff0000'}}, {title : 'Red header', block : 'h1', styles : {color : '#ff0000'}}, {title : 'Example 1', inline : 'span', classes : 'example1'}, {title : 'Example 2', inline : 'span', classes : 'example2'}, {title : 'Table styles'}, {title : 'Table row 1', selector : 'tr', classes : 'tablerow1'} ], // Replace values for the template plugin template_replace_values : { username : "Some User", staffid : "991234" } }); Vão ao vosso site e façam os includes: <scripttype="text/javascript"src="tinymce/jscripts/tiny_mce/tiny_mce.js"></script> <script type="text/javascript" src="tinymce_func.js"></script> Agora todas as textareas que estiverem com header que tem este include ficão assim: Cumpz, Fábio Gostaste ou ajudei-te? Então retribui com http://cyber-gamers.org/public/style_emoticons/default/451960.gif 3 яэ∂вэяяý, André Rochato and darksoul reacted to this Share this post Link to post Share on other sites
André Rochato 253 Posted July 17, 2012 Mais um excelente tópico, nunca falhas mano e ainda bem que fazes estes tópicos pois vao me dar bastante jeito, e claro como nao era de faltar... tens http://cyber-gamers.org/public/style_emoticons/default/451960.gif 1 Ŧá๒i๏ รilvค™ reacted to this Share this post Link to post Share on other sites
Ŧá๒i๏ รilvค™ 491 Posted July 17, 2012 Obrigado mano, tou cá para ajudar no que poder! 1 darksoul reacted to this Share this post Link to post Share on other sites
яэ∂вэяяý 543 Posted August 3, 2012 Muito bom ^^ sempre a ajudar este Rapaz ^^ continua xDhttp://cyber-gamers.org/public/style_emoticons/default/451960.gif 1 Diσgσ reacted to this Share this post Link to post Share on other sites