Jeg har downloadet Tinymce WYSIWYG Editor
Men det virker ikke, måske jeg mangler noget, kan slet ikke lige gennemskue hvad man gør?
Håber i kan hjælpe...
Dette er koden fra tinymce
<script type="text/javascript" src="tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
tinyMCE.init({
// General options
mode : "textareas",
theme : "advanced",
plugins : "safari,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",
// Theme options
theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect",
theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak",
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/example.css",
// Drop lists for link/image/media/template dialogs
template_external_list_url : "js/template_list.js",
external_link_list_url : "js/link_list.js",
external_image_list_url : "js/image_list.js",
media_external_list_url : "js/media_list.js",
// Replace values for the template plugin
template_replace_values : {
username : "Some User",
staffid : "991234"
}
});
</script>
Her er min kode med formen
<?php
if(isset($_POST["Submit"]))
{
//skaber forbindelse til databasen
//henter indholdet af formularens felter
$overskrift=$_POST["overskrift"];
$artikel=$_POST["artikel"];
$fk_kategori_id=$_POST["fk_kategori_id"];
$fk_bruger_id=$_POST["fk_bruger_id"];
mysql_query("INSERT INTO news_indhold (overskrift, artikel, fk_kategori_id, fk_bruger_id)VALUES('".secure($overskrift)."', '".secure($artikel)."', '".secure($fk_kategori_id)."', '".secure($fk_bruger_id)."')") or die(mysql_error());
echo '<br /><div id="ny_nyhed">Nyheden er gemt</div><br /><br /><br />';
}
?>
<br /><br />
<div id="nyhedsfelt">
<h1>Opret en nyhed</h1>
<form method='post' name="form1" method="post" enctype="multipart/form-data" onSubmit="return ValidateForm(this)" >
<table border="0">
<tr>
<td width="105">Overskrift:</td>
<td width="412"><input type='text' rows='2' name='overskrift' id='overskrift' /><br /></td>
</tr>
<tr>
<td width="105">Nyhed:</td>
<td width="412"><textarea name="artikel" rows="20" cols="30" style="width:500px;" style="margin-top:0px;" style="margin-bottom:5px; "></textarea></td>
</tr>
<tr>
<td width="105">Kategori Id:</td>
<td width="412"><input type='text' rows='2' name='fk_kategori_id' id='fk_kategori_id' /><br /></td>
</tr>
<tr>
<td width="105"></td>
<td width="412"><input type="hidden" value="1" name="fk_bruger_id"><br /></td>
</tr>
<tr>
<td> </td>
<td><input type='submit' name='Submit' value='Gem' /></td>
</tr>
</table>
</form>