tinyMCE编辑内容不能提交

在tiny_mce_advanced.js加上函数

 

function  updateValue(editId)
{
    
var textValue = document.getElementById(editId);
    textValue.value 
= tinyMCE.getInstanceById(editId).getBody().innerHTML;
}
    

 然后,提交form参照

 

     < h:form id = " Form1 " >
    
< fieldset >
        
< s:validateAll >
        
        
        
< div class = " entry " >
            
< a:cnCol tableName = " testrichtext "  fieldName = " title " />
            
< div class = " input " >
                
< h:inputText id = " title "  value = " #{testrichtext.title} "   />
                
< br />< span class = " errors " >< h:message  for = " title "   /></ span >
            
</ div >
        
</ div >
        
< div class = " entry " >
            
< a:cnCol tableName = " testrichtext "  fieldName = " content " />
                
< script language = " javascript "  type = " text/javascript "  src = " jscripts/tiny_mce/tiny_mce.js " ></ script >
                
< script language = " javascript "  type = " text/javascript "  src = " jscripts/tiny_mce/tiny_mce_advanced.js " ></ script >
                
                
< h:inputTextarea id = " mainText "  name = " content "  value = " #{testrichtext.content} "  rows = " 10 "  cols = " 55 " />
        
</ div >

        
        
        
< div class = " entry errors " >< h:messages globalOnly = " true "   /></ div >
        
< div class = " entry " >
            
< div class = " label " >< f:verbatim >& # 160 ; </ f:verbatim ></ div >
            
< div class = " input " >
            
        
             
< h:commandLink onclick = " updateValue('Form1:mainText'); "  action = " #{testrichtextAction.confirmAdd} " >   
                 
< a:cnMsg enMsg = " ok " />  
             
</ h:commandLink >
        
             
< h:commandLink action = " #{testrichtextAction.cancel} " >   
                 
< a:cnMsg enMsg = " cancel " />  
             
</ h:commandLink >
        
                
            
</ div >
        
</ div >
    
</ s:validateAll >
    
</ fieldset >
    
</ h:form >
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值