kindeditor默认上传图是不带域名域名绝对路径了,如果我们希望生成之后带上域名就需要进入urlType进行设置了,我们kindeditor中的urlType有几个参数默认这空值”“、”relative”、”absolute”、”domain”了。
关键在于初始化kindeditor时指定以下参数:
urlType
”“ 空为不修改URL
”relative” 相对路径
”absolute” 绝对路径
”domain” 带域名的绝对路径。
例子:
代码如下:
htmlEditor = K.create( '#content', { uploadJson : '../kindeditor/jsp/upload_json.jsp', fileManagerJson : '../kindeditor/jsp/file_manager_json.jsp', height : 300, width : '90%', // fontSizeTable:['21px','20px','17px','18px','16px','14px','12px'], resizeType : 0,//1 allowPreviewEmoticons : true, allowImageUpload : true, urlType:'domain' });