mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-01 16:22:41 +09:00
위지윅에디터의 rewrite mod에 따른 첨부이미지/파일등의 경로가 바뀌는 오류를 수정
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6107 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
13ad615f77
commit
5bf4b345a9
6 changed files with 58 additions and 34 deletions
|
|
@ -306,7 +306,6 @@ function procFilter(fo_obj, filter_func) {
|
|||
var editor_sequence = fo_obj.getAttribute('editor_sequence');
|
||||
|
||||
if(typeof(editor_sequence)!='undefined' && editor_sequence && typeof(editorRelKeys)!='undefined') {
|
||||
|
||||
if(jQuery.isFunction(editorRelKeys[editor_sequence]['pasteHTML'])){
|
||||
var content = editorGetContent(editor_sequence);
|
||||
editorRelKeys[editor_sequence]['content'].value = content;
|
||||
|
|
@ -320,25 +319,12 @@ function procFilter(fo_obj, filter_func) {
|
|||
var content = xInnerHtml(dummy.firstChild);
|
||||
xInnerHtml(dummy,content);
|
||||
}
|
||||
|
||||
// img/a 태그의 대상에 대해 경로 재설정 (IE브라우저에서 위지윅 에디터내의 경로를 절대 경로로 바꾸는 버그때문ㅇ)
|
||||
var imgTags = xGetElementsByTagName('IMG', dummy);
|
||||
for(var i=0;i<imgTags.length;i++) {
|
||||
if(imgTags[i].src.indexOf(request_uri)!=-1) {
|
||||
imgTags[i].src = imgTags[i].src.replace(/(.*)files\/(.*)/i,'files/$2');
|
||||
}
|
||||
}
|
||||
var aTags = xGetElementsByTagName('A', dummy);
|
||||
for(var i=0;i<aTags.length;i++) {
|
||||
if(aTags[i].href.indexOf(request_uri)!=-1) {
|
||||
aTags[i].href = aTags[i].href.replace(/(.*)\?module=file&(.*)/i,'./?module=file&$2');
|
||||
}
|
||||
}
|
||||
var content = xInnerHtml(dummy);
|
||||
editorRelKeys[editor_sequence]['content'].value = content;
|
||||
}
|
||||
var regxPath = new RegExp('(src|href)=("|\'){1}'+request_uri.replace(/\//g,'\\/')+'([^"\']+)("|\'){1}','g');
|
||||
content = content.replace(regxPath, '$1="./$3"');
|
||||
editorRelKeys[editor_sequence]['content'].value = content;
|
||||
}
|
||||
|
||||
filter_func(fo_obj);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue