Committer: dpetrov
LJSV-1720: update.bml always (for new or when edit entry) open in HTML editorU trunk/htdocs/js/rte.js
Modified: trunk/htdocs/js/rte.js =================================================================== --- trunk/htdocs/js/rte.js 2011-08-22 07:33:57 UTC (rev 19802) +++ trunk/htdocs/js/rte.js 2011-08-22 07:42:53 UTC (rev 19803) @@ -42,7 +42,7 @@ if (!window.switchedRteOn) { window.switchedRteOn = true; - $('#switched_rte_on').value = '1'; + $('#switched_rte_on').val('1'); if (!CKEditor && CKEDITOR && CKEDITOR.env.isCompatible) { CKEDITOR.basePath = statPrefix + '/ck/'; @@ -59,7 +59,7 @@ $('#updateForm')[0].onsubmit = function() { if (window.switchedRteOn) { - draftData.textArea.val(CKEditor.getData()); + draftData.textArea.val(CKEditor.getData().replace(/(\r|\n)/g,'')); //we remove all newlines } }; @@ -104,7 +104,7 @@ if (window.switchedRteOn) { window.switchedRteOn = false; - $('#switched_rte_on').value = '0'; + $('#switched_rte_on').val('0'); $('#entry-form-wrapper').attr('class', 'hide-richtext'); if (CKEditor) { @@ -202,4 +202,4 @@ } } -})(jQuery, this); \ No newline at end of file +})(jQuery, this);