diff --git a/modules/editor/skins/dreditor/editor.html b/modules/editor/skins/dreditor/editor.html index bd7860fe1..5a5d7c83d 100644 --- a/modules/editor/skins/dreditor/editor.html +++ b/modules/editor/skins/dreditor/editor.html @@ -20,7 +20,7 @@ {@$cookie_tool=explode(',', $_COOKIE['DrEditorToolbar'])} -{@$default_tool=explode(',', 'hx,txt,material,link,list,quote,img,movie,file,hr,index')} +{@$default_tool=explode(',', 'hx,txt,'.($material_exists?'material,':'').'link,list,quote,img,movie,file,hr,index');} {@$external_components=array_keys($drComponentList)} {@$enable_tool=array_unique(array_merge($cookie_tool, $default_tool, (array)$external_components))} @@ -479,7 +479,7 @@ -
+
{$lang->edit->materials} diff --git a/modules/editor/skins/dreditor/js/DrEditor.js b/modules/editor/skins/dreditor/js/DrEditor.js index 6b0e45f5d..94c923fec 100644 --- a/modules/editor/skins/dreditor/js/DrEditor.js +++ b/modules/editor/skins/dreditor/js/DrEditor.js @@ -1238,7 +1238,7 @@ var ImageWriter = xe.createPlugin('ImageWriter', { var callback_id = ''+(new Date).getTime()+Math.ceil(Math.random()*1000); window[callback_id] = function(fileObj){ self.onfileuploaded(seq, callback_id, fileObj); } - var filesrl = _image.attr('class').match(/(?:^|\s)xe_filesrl_(\d+)(?:\s|$)/); + var filesrl = (_image.attr('class')||'').match(/(?:^|\s)xe_filesrl_(\d+)(?:\s|$)/); filesrl = (filesrl && filesrl[1])? filesrl[1] : ''; // upload file