2009-11-10 40 views

回答

0

如果你問的HTML編輯器,然後檢查了TinyMCECKEditor :)

+0

是的,你可以添加一個示例如何使用php創建它^^ – RageZ 2009-11-10 08:53:12

1

你在你的屏幕截圖編輯器是somekind的FCK編輯器。你可以下載CKEditor(FCKEditor的新版本),並使用下面的代碼在你的頁面創建一個編輯:

<script type="text/javascript" src="ckeditor.js"></script>  
<textarea cols="80" id="editor2" name="editor2" rows="10">&lt;p&gt;This is some &lt;strong&gt;sample text&lt;/strong&gt;. You are using &lt;a 

href="http://www.fckeditor.net/"&gt;CKEditor&lt;/a&gt;.&lt;/p&gt;</textarea> 
       <script type="text/javascript"> 
       //<![CDATA[ 

        // This call can be placed at any point after the 
        // <textarea>, or inside a <head><script> in a 
        // window.onload event handler. 

        // Replace the <textarea id="editor"> with an CKEditor 
        // instance, using default configurations. 
        CKEDITOR.replace('editor2'); 

       //]]> 
       </script> 

確保您包括對ckeditor.js有效的路徑也可以諮詢documentation瞭解更多詳情。

此外,請確保你有用戶輸入的清潔代碼(如白名單標籤),因爲如果你沒有你的網站將會受到XSS攻擊。