mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-31 09:09:59 +09:00
#19474078 p 태그가 하나이면 p 태그 제거
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@8031 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
e24e6b4d85
commit
2984614918
1 changed files with 13 additions and 1 deletions
|
|
@ -31,7 +31,8 @@ function editorStart_xe(editor_seq, primary_key, content_key, editor_height, col
|
||||||
// filters
|
// filters
|
||||||
xeed.cast('REGISTER_FILTER', ['r2t', plz_standard]);
|
xeed.cast('REGISTER_FILTER', ['r2t', plz_standard]);
|
||||||
xeed.cast('REGISTER_FILTER', ['r2t', remove_baseurl]);
|
xeed.cast('REGISTER_FILTER', ['r2t', remove_baseurl]);
|
||||||
xeed.cast('REGISTER_FILTER', ['in', inline_styled['in']]);
|
xeed.cast('REGISTER_FILTER', ['r2t', unwrap_single_para]);
|
||||||
|
xeed.cast('REGISTER_FILTER', ['in', inline_styled['in']]);
|
||||||
xeed.cast('REGISTER_FILTER', ['out', inline_styled['out']]);
|
xeed.cast('REGISTER_FILTER', ['out', inline_styled['out']]);
|
||||||
|
|
||||||
// Set standard API
|
// Set standard API
|
||||||
|
|
@ -83,6 +84,17 @@ function remove_baseurl(code) {
|
||||||
return code.replace(reg, function(m0,m1,m2){ return ' '+m1+'='+m2; });
|
return code.replace(reg, function(m0,m1,m2){ return ' '+m1+'='+m2; });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// unwrap single paragraph
|
||||||
|
function unwrap_single_para(code) {
|
||||||
|
var match = $.trim(code).match(/<p[\s>]/g);
|
||||||
|
|
||||||
|
if (match && match.length == 1) {
|
||||||
|
code = code.replace(/<\/?p(?:\s[^>]+)?>/g, '');
|
||||||
|
}
|
||||||
|
|
||||||
|
return code;
|
||||||
|
};
|
||||||
|
|
||||||
// inline styled box
|
// inline styled box
|
||||||
var inline_styled = {
|
var inline_styled = {
|
||||||
'in' : function(code) {
|
'in' : function(code) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue