mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 19:21:40 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@8039 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
c5683b25ed
commit
397079f435
1 changed files with 13 additions and 0 deletions
|
|
@ -34,6 +34,9 @@ function editorStart_xe(editor_seq, primary_key, content_key, editor_height, col
|
|||
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', ['r2t', auto_br.br2ln]);
|
||||
xeed.cast('REGISTER_FILTER', ['out', auto_br.br2ln]);
|
||||
xeed.cast('REGISTER_FILTER', ['t2r', auto_br.ln2br]);
|
||||
|
||||
// Set standard API
|
||||
editorRelKeys[editor_seq] = {
|
||||
|
|
@ -112,6 +115,16 @@ var inline_styled = {
|
|||
}
|
||||
};
|
||||
|
||||
// auto_br
|
||||
var auto_br = {
|
||||
'br2ln' : function(code) {
|
||||
return $.trim(code.replace(/<br ?\/?>/ig, '\n'));
|
||||
},
|
||||
'ln2br' : function(code) {
|
||||
return code.replace(/(^|[^>])\s*\r?\n\s*([^<])/g, '$1<br />$2');
|
||||
}
|
||||
};
|
||||
|
||||
window.editorStart_xe = editorStart_xe;
|
||||
|
||||
})(jQuery);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue