美文网首页
获取form内iframe中的textarea(kindedit

获取form内iframe中的textarea(kindedit

作者: 秋天de童话 | 来源:发表于2018-06-07 18:06 被阅读12次

问题描述:多行文本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;
}
image.png

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

相关文章

网友评论

      本文标题:获取form内iframe中的textarea(kindedit

      本文链接:https://www.haomeiwen.com/subject/iqfnsftx.html