mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 19:51:42 +09:00
#19041107 img, br 태그의 self-closing 추가
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@8138 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
e49104de25
commit
10e5c87b73
1 changed files with 15 additions and 1 deletions
|
|
@ -226,6 +226,7 @@ var DrEditor = xe.createApp('DrEditor', {
|
|||
var seq = params[0];
|
||||
var box = configs[seq].editArea.contents().clone();
|
||||
var dum = $('<div>').append(box);
|
||||
var htm = '';
|
||||
|
||||
// remove no-content area
|
||||
dum.find('>div.wArea,>div.eArea>div.drag_handle,>div.eArea>button.del').remove();
|
||||
|
|
@ -233,7 +234,20 @@ var DrEditor = xe.createApp('DrEditor', {
|
|||
// getting content
|
||||
this.cast('GETTING_CONTENT', [seq, dum]);
|
||||
|
||||
return dum.html();
|
||||
htm = dum
|
||||
.html()
|
||||
.replace(
|
||||
/<(img|br)([^>]*)\/?>/gi,
|
||||
function(m0,m1,m2){
|
||||
var ret = ['<'+m1];
|
||||
(m2 = $.trim(m2))?ret.push(m2):0;
|
||||
ret.push('/>');
|
||||
|
||||
return ret.join(' ');
|
||||
}
|
||||
);
|
||||
|
||||
return htm;
|
||||
},
|
||||
API_SET_CONTENT : function(sender, params) {
|
||||
var seq = params[0];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue