获取form内iframe中的textarea(kindeditor)的值,textarea与iframe contentbody同步问题

问题描述:多行文本HTML 编辑器中输入内容,提交无法获取,导致丢失

function highEditor(remarkid,height){
        height=!height||height<150?150:height;
        alert(jQuery("#"+remarkid).text());
        if(jQuery("#"+remarkid).is(":visible")){
            
            var  items=[
                            'justifyleft', 'justifycenter', 'justifyright','forecolor','bold','italic','fullscreen'
                       ];
                 
             K.createEditor({
                    id : remarkid,
                    height :height+'px',
                    themeType:'mobile',
                    resizeType:1,
                    uploadJson:'/weaverEditor/jsp/upload_json.jsp',
                    allowFileManager : false,
                    newlineTag:'br',
                    filterMode:false,
                    imageTabIndex:1,
                    langType : 'en',
                    items : items,
                    afterCreate : function(id) {
                        //KE.util.focus(id);
                        this.focus();
                    },
                                  //关键同步点
                    afterBlur:function(){
                        this.sync();
                    }
            });
        }
    }

function isShowEditor(){
    if(clienttype=="android"||clienttype=="androidpad"){
    clientVersion=mobileInterface.getClientVersion();
    }
    if(!((clienttype=="android"||clienttype=="androidpad")&&clientVersion<16))
        return true;
    else
        return false;
}
获取form内iframe中的textarea(kindeditor)的值,textarea与iframe contentbody同步问题_第1张图片
image.png

参考点
https://blog.csdn.net/yssong1028/article/details/73302490
http://www.jb51.net/article/43595.htm

你可能感兴趣的:(获取form内iframe中的textarea(kindeditor)的值,textarea与iframe contentbody同步问题)