Skip to content

Commit

Permalink
organize definition
Browse files Browse the repository at this point in the history
  • Loading branch information
yiminghe committed Sep 4, 2010
1 parent 1bde430 commit a6ba119
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 22 deletions.
10 changes: 5 additions & 5 deletions build/core/definition.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,14 +243,14 @@ KISSY.Editor.add("definition", function(KE) {
} catch(e) {
// Trick to solve this issue, forcing the iframe to get ready
// by simply setting its "src" property.
//noinspection SillyAssignmentJS
iframe[0].src = iframe[0].src;
// In IE6 though, the above is not enough, so we must pause the
// execution for a while, giving it time to think.
if (UA.ie && UA.ie < 7) {
setTimeout(run, 10);
return;
}

}
run();
function run() {
Expand Down Expand Up @@ -351,16 +351,16 @@ KISSY.Editor.add("definition", function(KE) {
lastElement = clone;
}

var next = lastElement._4e_nextSourceNode(true);
var next = lastElement._4e_nextSourceNode(true),p;
//�怠偏�?ie 銝��芸鈭抒�br嚗��其漣�?
if (!next) {
var p = new Node("<p>&nbsp;</p>", null, self.document);
p = new Node("<p>&nbsp;</p>", null, self.document);
p.insertAfter(lastElement);
next = p;
}
//firefox,replace br with p嚗�蝻��冽雿銵����?
else if (next._4e_name() == "br") {
var p = new Node("<p>&nbsp;</p>", null, self.document);
p = new Node("<p>&nbsp;</p>", null, self.document);
next[0].parentNode.replaceChild(p[0], next[0]);
next = p;
}
Expand Down Expand Up @@ -675,4 +675,4 @@ KISSY.Editor.add("definition", function(KE) {
}
} )();
}
});
});
11 changes: 5 additions & 6 deletions build/editor-all-pkg.js
Original file line number Diff line number Diff line change
Expand Up @@ -722,14 +722,14 @@ KISSY.Editor.add("definition", function(KE) {
} catch(e) {
// Trick to solve this issue, forcing the iframe to get ready
// by simply setting its "src" property.
//noinspection SillyAssignmentJS
iframe[0].src = iframe[0].src;
// In IE6 though, the above is not enough, so we must pause the
// execution for a while, giving it time to think.
if (UA.ie && UA.ie < 7) {
setTimeout(run, 10);
return;
}

}
run();
function run() {
Expand Down Expand Up @@ -830,16 +830,16 @@ KISSY.Editor.add("definition", function(KE) {
lastElement = clone;
}

var next = lastElement._4e_nextSourceNode(true);
var next = lastElement._4e_nextSourceNode(true),p;
//末尾�?ie 不会自动产生br,手动产�?
if (!next) {
var p = new Node("<p>&nbsp;</p>", null, self.document);
p = new Node("<p>&nbsp;</p>", null, self.document);
p.insertAfter(lastElement);
next = p;
}
//firefox,replace br with p,和编辑器整体换行保持一�?
else if (next._4e_name() == "br") {
var p = new Node("<p>&nbsp;</p>", null, self.document);
p = new Node("<p>&nbsp;</p>", null, self.document);
next[0].parentNode.replaceChild(p[0], next[0]);
next = p;
}
Expand Down Expand Up @@ -1154,8 +1154,7 @@ KISSY.Editor.add("definition", function(KE) {
}
} )();
}
});
/**
});/**
* modified from ckeditor ,xhtml1.1 transitional dtd translation
* @modifier: <yiminghe@gmail.com(chengyu)>
*/
Expand Down
11 changes: 5 additions & 6 deletions build/editor-core-pkg.js
Original file line number Diff line number Diff line change
Expand Up @@ -722,14 +722,14 @@ KISSY.Editor.add("definition", function(KE) {
} catch(e) {
// Trick to solve this issue, forcing the iframe to get ready
// by simply setting its "src" property.
//noinspection SillyAssignmentJS
iframe[0].src = iframe[0].src;
// In IE6 though, the above is not enough, so we must pause the
// execution for a while, giving it time to think.
if (UA.ie && UA.ie < 7) {
setTimeout(run, 10);
return;
}

}
run();
function run() {
Expand Down Expand Up @@ -830,16 +830,16 @@ KISSY.Editor.add("definition", function(KE) {
lastElement = clone;
}

var next = lastElement._4e_nextSourceNode(true);
var next = lastElement._4e_nextSourceNode(true),p;
//末尾�?ie 不会自动产生br,手动产�?
if (!next) {
var p = new Node("<p>&nbsp;</p>", null, self.document);
p = new Node("<p>&nbsp;</p>", null, self.document);
p.insertAfter(lastElement);
next = p;
}
//firefox,replace br with p,和编辑器整体换行保持一�?
else if (next._4e_name() == "br") {
var p = new Node("<p>&nbsp;</p>", null, self.document);
p = new Node("<p>&nbsp;</p>", null, self.document);
next[0].parentNode.replaceChild(p[0], next[0]);
next = p;
}
Expand Down Expand Up @@ -1154,8 +1154,7 @@ KISSY.Editor.add("definition", function(KE) {
}
} )();
}
});
/**
});/**
* modified from ckeditor ,xhtml1.1 transitional dtd translation
* @modifier: <yiminghe@gmail.com(chengyu)>
*/
Expand Down
10 changes: 5 additions & 5 deletions core/definition.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,14 +243,14 @@ KISSY.Editor.add("definition", function(KE) {
} catch(e) {
// Trick to solve this issue, forcing the iframe to get ready
// by simply setting its "src" property.
//noinspection SillyAssignmentJS
iframe[0].src = iframe[0].src;
// In IE6 though, the above is not enough, so we must pause the
// execution for a while, giving it time to think.
if (UA.ie && UA.ie < 7) {
setTimeout(run, 10);
return;
}

}
run();
function run() {
Expand Down Expand Up @@ -351,16 +351,16 @@ KISSY.Editor.add("definition", function(KE) {
lastElement = clone;
}

var next = lastElement._4e_nextSourceNode(true);
var next = lastElement._4e_nextSourceNode(true),p;
//末尾时 ie 不会自动产生br,手动产生
if (!next) {
var p = new Node("<p>&nbsp;</p>", null, self.document);
p = new Node("<p>&nbsp;</p>", null, self.document);
p.insertAfter(lastElement);
next = p;
}
//firefox,replace br with p,和编辑器整体换行保持一致
else if (next._4e_name() == "br") {
var p = new Node("<p>&nbsp;</p>", null, self.document);
p = new Node("<p>&nbsp;</p>", null, self.document);
next[0].parentNode.replaceChild(p[0], next[0]);
next = p;
}
Expand Down Expand Up @@ -675,4 +675,4 @@ KISSY.Editor.add("definition", function(KE) {
}
} )();
}
});
});

0 comments on commit a6ba119

Please sign in to comment.