2010-07-14 53 views

回答

0

你并不真的需要使用这个插件,只得到TinyMCE的代码,并在您的模板是这样的(切碎位为清楚起见)对其进行设置:

<?php 
echo "\n".$javascript->link('tiny_mce/tiny_mce.js',false); 
?> 
<script type="text/javascript"> 


    $().ready(function() { 
     $('textarea').tinymce({ 
      // Location of TinyMCE script 
      //   // General options 
      theme : "advanced", 
      plugins : "safari,pagebreak,style,layer,table,save,advhr,advimage,...", 

      // Theme options 
      theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,fontselect,fontsizeselect,|,image,link,unlink,... : 
"cut,copy,paste,pastetext,pasteword,|,search,replace,|,... ", 
       theme_advanced_buttons3 : "tablecontrols", 
       theme_advanced_toolbar_location : "top", 
       theme_advanced_toolbar_align : "left", 
       theme_advanced_statusbar_location : "bottom", 
       theme_advanced_resizing : true 
      }); 
     }); 
    </script> 
?> 

我实际上是这样做的,因此我可以将它放在需要的地方。研究TinyMCE wiki和api - 它们非常有用。

相关问题