Postanowiłem użyć edytora TINYMCE aby zmeiniać zawartość pliku. Niestety nie zapisują mi się żadne znaczniki w których używane są nawiasy (np. kolor i wielkość czcionki, dodawanie obrazków i innych mediów). Przy dodawaniu obrazków w ich opisie i linku zamiast tego co wpisuje po zapisaniu pojawiają sięznaczki ' "/ ' lub ' %22 '.
Scrypt którym ładuje edytor tinymce:
Kod
<script type="text/javascript" src="edytor/tiny_mce.js"></script>
<script type="text/javascript">
tinyMCE.init({
// General options
mode : "textareas",
theme : "advanced",
// Theme options
theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justify
enter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselec
",<BR> theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outd
nt,indent,blockquote,|,undo,redo,|,link,unlink,anchor,cleanup,help,code,|,insert
ate,inserttime,preview,|,forecolor,backcolor",<BR> theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespe
l,media,advhr,|,print,|,ltr,rtl,|,fullscreen",<BR> theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acron
m,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak",<BR> 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",<BR> //external_image_list_url : "lists/image_list.js",
//media_external_list_url : "lists/media_list.js",
// Replace values for the template plugin
template_replace_values : {
username : "Some User",
staffid : "991234"
}
});
</script></P><P>
<script type="text/javascript">
tinyMCE.init({
// General options
mode : "textareas",
theme : "advanced",
// Theme options
theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justify
enter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselec
",<BR> theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outd
nt,indent,blockquote,|,undo,redo,|,link,unlink,anchor,cleanup,help,code,|,insert
ate,inserttime,preview,|,forecolor,backcolor",<BR> theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespe
l,media,advhr,|,print,|,ltr,rtl,|,fullscreen",<BR> theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acron
m,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak",<BR> 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",<BR> //external_image_list_url : "lists/image_list.js",
//media_external_list_url : "lists/media_list.js",
// Replace values for the template plugin
template_replace_values : {
username : "Some User",
staffid : "991234"
}
});
</script></P><P>
a zawartość texarea w którym zmieniam treść strony wysyłam metodą POST
Kod
cho('<form method="post" action="zapis.php?strona='.$strona.'">');
echo(' <textarea id="dane" name="dane">');
if (file_exists('../podstrony/'.$strona))
readfile('../podstrony/'.$strona);
else
echo ("nie istenieje taka strona");
?>
</textarea>
<input type="submit" name="save" value="Submit" />
<input type="reset" name="reset" value="Reset" />
</form>
echo(' <textarea id="dane" name="dane">');
if (file_exists('../podstrony/'.$strona))
readfile('../podstrony/'.$strona);
else
echo ("nie istenieje taka strona");
?>
</textarea>
<input type="submit" name="save" value="Submit" />
<input type="reset" name="reset" value="Reset" />
</form>
Nie rozumiem w czym jest problem bo jak scryptem odczytuje zmienną dane która powinna zawiraćzmieniony tekst znaczników tych już nie ma :/. Czy to wina sposobu przekazywania zmiennych czy może samego TINYMCE

