Hallo,
ich programmiere derzeit ein eigenen Blog und möchte einen HTML Datei in eine Textarea einlesen. Hier mein Code:
Ich hoffe ihr könnt mir helfen und danke im vorrraus
MfG
Julian
ich programmiere derzeit ein eigenen Blog und möchte einen HTML Datei in eine Textarea einlesen. Hier mein Code:
HTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
<head>
<title>TinyMCE Test</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<!-- OF COURSE YOU NEED TO ADAPT NEXT LINE TO YOUR tiny_mce.js PATH -->
<script type="text/javascript" src="tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
tinyMCE.init({
mode : "textareas",
theme : "advanced",
plugins : "emotions,spellchecker,advhr,insertdatetime,preview",
// Theme options - button# indicated the row# only
theme_advanced_buttons1 : "newdocument,|,bold,italic,underline,|,justifyleft,justifycenter,justifyright,fontselect,fontsizeselect,formatselect",
theme_advanced_buttons2 : "cut,copy,paste,|,bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,image,|,code,preview,|,forecolor,backcolor",
theme_advanced_buttons3 : "insertdate,inserttime,|,spellchecker,advhr,,removeformat,|,sub,sup,|,charmap,emotions",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : true
});
</script>
</head>
<body>
<?php
//
$text = file_get_contents("news.html");
echo $text; // Dateiinhalt ausgeben
?>
<p>
<form action="text_edit.php" name="edit_file" method="post">
<textarea name="text"> </textarea>
<input type="submit" value="Abspeichern" />
</p>
</form>
</body>
</html>
Ich hoffe ihr könnt mir helfen und danke im vorrraus
MfG
Julian