diff --git a/static/mrdoc/mrdoc.editor.js b/static/mrdoc/mrdoc.editor.js
index e66273a..1a01896 100644
--- a/static/mrdoc/mrdoc.editor.js
+++ b/static/mrdoc/mrdoc.editor.js
@@ -382,9 +382,9 @@ element.on('tab(img-tab)', function(data){
insertImg = function(e){
console.log(e);
if(editor_mode == 3){
- editor.addValue('')
+ editor.addValue('
')
}else{
- editor.insertValue("\n + ")");
+ editor.insertValue("\n.replace(" ",'%20') + ")");
editor.focus()
}
diff --git a/template/app_doc/editor/tpl_editor_editormd.html b/template/app_doc/editor/tpl_editor_editormd.html
index 2b3d9a7..90607ef 100644
--- a/template/app_doc/editor/tpl_editor_editormd.html
+++ b/template/app_doc/editor/tpl_editor_editormd.html
@@ -284,118 +284,4 @@
return null;
}
};
- //监听图片Tab选项卡切换
- element.on('tab(img-tab)', function(data){
- //console.log(this); //当前Tab标题所在的原始DOM元素
- //console.log(data.index); //得到当前Tab的所在下标
- //console.log(data.elem); //得到当前的Tab大容器
- if(data.index == 1){
- layer.load(1);
- console.log('选择图片')
- $("#select-img-group").empty(); //删除已有分组按钮
- //请求新的分组数据
- $.post("{% url 'manage_img_group' %}",{'types':3},function(r){
- if(r.status){
- group_btn_str = ''
- for(var i in r.data){
- group_btn_str += ''
- };
- $("#select-img-group").append(group_btn_str)
- }
- });
- //请求全部图片数据
- $.post("{% url 'manage_image' %}",{'types':2,'group_id':0},function(r){
- if(r.status){
- //调用分页显示
- laypage.render({
- elem: 'select-img-page',//分页的div
- count: r.data.length, //数据总数
- limit:15, //单页数
- jump: function(obj){
- //渲染HTML
- document.getElementById('select-img').innerHTML = function(){
- var arr = []
- var thisData = r.data.concat().splice(obj.curr*obj.limit - obj.limit, obj.limit);
- layui.each(thisData, function(index, item){
- arr.push('