![](/img/trans.png)
[英]Javascript: Get the value with the html tags from the textarea as with tinyMCE
[英]Tinymce deletes <html> tags when output in textarea
我用tinymce制作了一個自己的litle cms。 在預標簽中插入純文本時,代碼會在網站上以正確的方式輸出,但是當我更新編輯器時,html標簽會被刪除。
Tinymce設置
<script type="text/javascript">
tinyMCE.init({
selector: "textarea.editme",
width : "60.5%",
resize: false,
preformatted : true,
menubar:false,
});
</script>
Tinymce編輯
<textarea name="content"><?php echo $data['course_content'];?> </textarea><br />
我在這里回應了數據庫中的內容,但正如我所說,在textarea中刪除了html標簽。顯示了其他所有文本。
我在所有postvars上使用PHP FILTER_SANITIZE_SPECIAL_CHARS時遇到了同樣的問題。 :-)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.