hey.
i install that code:
and after i install that code the enter not work.
in the editor i Type text and enter.
the enter work but when i click submit / click source , all the enters i do before delete.
why?
!function(){function e(e){var t="";for(var n in e){var i=e[n],r=(n+":"+i).replace(l,";");t+=r}return t}CKEDITOR.on("dialogDefinition",function(e){var t,n=e.data.name,i=e.data.definition;"link"==n?(i.removeContents("target"),i.removeContents("upload"),i.removeContents("advanced"),t=i.getContents("info"),t.remove("emailSubject"),t.remove("emailBody")):"image"==n?(i.removeContents("advanced"),t=i.getContents("Link"),t.remove("cmbTarget"),t=i.getContents("info"),t.remove("txtAlt"),t.remove("basic")):"table"==n&&(t=i.getContents("info"),t.remove("selHeaders"),t.remove("txtWidth"),t.remove("txtHeight"),t.remove("txtBorder"),t.remove("cmbAlign"),t.remove("txtCellSpace"),t.remove("txtCellPad"),t.remove("txtCaption"),t.remove("txtSummary"))});var t={b:"strong",u:"u",hr:"hr",i:"em",table:"table",tr:"tr",td:"td",th:"th",sub:"sub",sup:"sup",s:"strike",color:"span",font:"span",align:"p",size:"span",quote:"blockquote",code:"code",php:"pre",url:"a",email:"span",img:"span","*":"li",list:"ol"},n={strong:"b",b:"b",u:"u",sub:"sub",sup:"sup",em:"i",table:"table",tr:"tr",td:"td",th:"th",strike:"s",s:"s",hr:"hr",i:"i",code:"code",pre:"php",li:"*"},i={strong:"b",em:"i",u:"u",li:"*",ul:"list",ol:"list",code:"code",pre:"php",a:"link",img:"img",blockquote:"quote"},r={color:"color",font:"font-family",align:"text-align",size:"font-size"},o={url:"href",email:"mailhref",quote:"cite",list:"listType"},a=CKEDITOR.dtd,s=CKEDITOR.tools.extend({table:1},a.$block,a.$listItem,a.$tableContent,a.$list),l=/\s*(?:;\s*|$)/,u={smiley:":)",sad:":(",wink:";)",laugh:":D",cheeky:":P",blush:":*)",surprise:":-o",indecision:":|",angry:">:(",angel:"o:)",cool:"8-)",devil:">:-)",crying:";(",kiss:":-*"},c={},d=[];for(var f in u)c[u[f]]=f,d.push(u[f].replace(/\(|\)|\:|\/|\*|\-|\|/g,function(e){return"\\"+e}));d=new RegExp(d.join("|"),"g");var p=function(){var e=[],t={nbsp:" ",shy:"",gt:">",lt:"<"};for(var n in t)e.push(n);return e=new RegExp("&("+e.join("|")+");","g"),function(n){return n.replace(e,function(e,n){return t[n]})}}();CKEDITOR.BBCodeParser=function(){this._={bbcPartsRegex:/(?:\[([^\/\]=]*?)(?:=([^\]]*?))?\])|(?:\[\/([a-z]{1,16})\])/gi}},CKEDITOR.BBCodeParser.prototype={parse:function(n){for(var i,a,s=0;i=this._.bbcPartsRegex.exec(n);){var l=i.index;if(l>s){var u=n.substring(s,l);this.onText(u,1)}if(s=this._.bbcPartsRegex.lastIndex,a=(i[1]||i[3]||"").toLowerCase(),!a||t[a])if(i[1]){var c=t[a],d={},f={},p=i[2];p&&("list"==a&&(isNaN(p)?/^[a-z]+$/.test(p)?p="lower-alpha":/^[A-Z]+$/.test(p)&&(p="upper-alpha"):p="decimal"),r[a]?("size"==a&&(f[r[a]]=p),"font"==a&&(f[r[a]]=p),"color"==a&&(f[r[a]]=p),d.style=e(f)):o[a]&&(d[o[a]]=p)),("email"==a||"img"==a)&&(d.bbcode=a),this.onTagOpen(c,d,CKEDITOR.dtd.$empty[c])}else i[3]&&this.onTagClose(t[a]);else this.onText(i[0])}n.length>s&&this.onText(n.substring(s,n.length),1)}},CKEDITOR.htmlParser.fragment.fromBBCode=function(e){function t(e){if(u.length>0)for(var t=0;t<u.length;t++){var n=u[t],i=n.name,r=CKEDITOR.dtd[i],o=p.name&&CKEDITOR.dtd[p.name];o&&!o[i]||e&&r&&!r[e]&&CKEDITOR.dtd[e]||(n=n.clone(),n.parent=p,p=n,u.splice(t,1),t--)}}function n(e,t){var n=p.children.length,r=n>0&&p.children[n-1],o=!r&&m.getRule(i[p.name],"breakAfterOpen"),a=r&&r.type==CKEDITOR.NODE_ELEMENT&&m.getRule(i[r.name],"breakAfterClose"),l=e&&m.getRule(i[e],t?"breakBeforeClose":"breakBeforeOpen");f&&(o||a||l)&&f--,f&&e in s&&f++;for(;f&&f--;)p.children.push(r=new CKEDITOR.htmlParser.element("br"))}function r(e,t){n(e.name,1),t=t||p||l;var i=t.children.length,r=i>0&&t.children[i-1]||null;e.previous=r,e.parent=t,t.children.push(e),e.returnPoint&&(p=e.returnPoint,delete e.returnPoint)}var o,a=new CKEDITOR.BBCodeParser,l=new CKEDITOR.htmlParser.fragment,u=[],f=0,p=l;a.onTagOpen=function(e,i){var s=new CKEDITOR.htmlParser.element(e,i);if(CKEDITOR.dtd.$removeEmpty[e])return u.push(s),void 0;var l=p.name,c=l&&(CKEDITOR.dtd[l]||(p._.isBlockLike?CKEDITOR.dtd.div:CKEDITOR.dtd.span));if(c&&!c[e]){var d,f=!1;if(e==l?r(p,p.parent):e in CKEDITOR.dtd.$listItem?(a.onTagOpen("ul",{}),d=p,f=!0):(r(p,p.parent),u.unshift(p),f=!0),p=d?d:p.returnPoint||p.parent,f)return a.onTagOpen.apply(this,arguments),void 0}t(e),n(e),s.parent=p,s.returnPoint=o,o=0,s.isEmpty?r(s):p=s},a.onTagClose=function(e){for(var t=u.length-1;t>=0;t--)if(e==u[t].name)return u.splice(t,1),void 0;for(var n=[],i=[],o=p;o.type&&o.name!=e;)o._.isBlockLike||i.unshift(o),n.push(o),o=o.parent;if(o.type){for(t=0;t<n.length;t++){var a=n[t];r(a,a.parent)}p=o,r(o,o.parent),o==p&&(p=p.parent),u=u.concat(i)}},a.onText=function(e){var i=CKEDITOR.dtd[p.name];(!i||i["#"])&&(n(),t(),e.replace(/(\r\n|[\r\n])|[^\r\n]*/g,function(e,t){if(void 0!==t&&t.length)f++;else if(e.length){var n=0;e.replace(d,function(t,i){r(new CKEDITOR.htmlParser.text(e.substring(n,i)),p),r(new CKEDITOR.htmlParser.element("smiley",{desc:c[t]}),p),n=i+t.length}),n!=e.length&&r(new CKEDITOR.htmlParser.text(e.substring(n,e.length)),p)}}))},a.parse(CKEDITOR.tools.htmlEncode(e));for(;p.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT;){var h=p.parent,g=p;r(g,h),p=h}return l};var h=CKEDITOR.tools.createClass({$:function(){this._={output:[],rules:[]},this.setRules("list",{breakBeforeOpen:1,breakAfterOpen:1,breakBeforeClose:1,breakAfterClose:1}),this.setRules("*",{breakBeforeOpen:1,breakAfterOpen:0,breakBeforeClose:1,breakAfterClose:0}),this.setRules("quote",{breakBeforeOpen:1,breakAfterOpen:0,breakBeforeClose:0,breakAfterClose:1}),this.setRules("code",{breakBeforeOpen:1,breakAfterOpen:1,breakBeforeClose:1,breakAfterClose:1})},proto:{setRules:function(e,t){var n=this._.rules[e];n?CKEDITOR.tools.extend(n,t,!0):this._.rules[e]=t},getRule:function(e,t){return this._.rules[e]&&this._.rules[e][t]},openTag:function(e){e in t&&(this.getRule(e,"breakBeforeOpen")&&this.lineBreak(1),this.write("[",e))},openTagClose:function(e){"br"==e?this._.output.push("\n"):e in t&&(this.write("]"),this.getRule(e,"breakAfterOpen")&&this.lineBreak(1))},attribute:function(e,t){"option"==e&&("string"==typeof t&&(t=t.replace(/&/g,"&")),this.write("=",t))},closeTag:function(e){e in t&&(this.getRule(e,"breakBeforeClose")&&this.lineBreak(1),"*"!=e&&this.write("[/",e,"]"),this.getRule(e,"breakAfterClose")&&this.lineBreak(1))},text:function(e){this.write(e)},comment:function(){},lineBreak:function(){!this._.hasLineBreak&&this._.output.length&&(this.write("\n"),this._.hasLineBreak=1)},write:function(){this._.hasLineBreak=0;var e=Array.prototype.join.call(arguments,"");this._.output.push(e)},reset:function(){this._.output=[],this._.hasLineBreak=0},getHtml:function(e){var t=this._.output.join("");return e&&this.reset(),p(t)}}}),m=new h;CKEDITOR.plugins.add("bbcode",{requires:"entities",beforeInit:function(e){var t=e.config;CKEDITOR.tools.extend(t,{enterMode:CKEDITOR.ENTER_BR,basicEntities:false,entities:false,fillEmptyBlocks:false},true),e.filter.disable()},init:function(e){function t(e){var t=CKEDITOR.htmlParser.fragment.fromBBCode(e),n=new CKEDITOR.htmlParser.basicWriter;return t.writeHtml(n,o),n.getHtml(!0)}function i(e){var n=e.data.dataValue;e.data.dataValue=t(n)}var r=e.config,o=new CKEDITOR.htmlParser.filter;o.addRules({elements:{blockquote:function(e){var t=new CKEDITOR.htmlParser.element("div");t.children=e.children,e.children=[t];var n=e.attributes.cite;if(n){var i=new CKEDITOR.htmlParser.element("cite");i.add(new CKEDITOR.htmlParser.text(n.replace(/^"|"$/g,""))),delete e.attributes.cite,e.children.unshift(i)}},span:function(e){var t;(t=e.attributes.bbcode)&&("img"==t?(e.name="img",e.attributes.src=e.children[0].value,e.children=[]):"email"==t&&(e.name="a",e.attributes.href="mailto:"+e.children[0].value),delete e.attributes.bbcode)},ol:function(e){e.attributes.listType?"decimal"!=e.attributes.listType&&(e.attributes.style="list-style-type:"+e.attributes.listType):e.name="ul",delete e.attributes.listType},a:function(e){e.attributes.href||(e.attributes.href=e.children[0].value)},smiley:function(e){e.name="img";var t=e.attributes.desc,n=r.smiley_images[CKEDITOR.tools.indexOf(r.smiley_descriptions,t)],i=CKEDITOR.tools.htmlEncode(r.smiley_path+n);e.attributes={src:i,"data-cke-saved-src":i,title:t,alt:t}}}}),e.dataProcessor.htmlFilter.addRules({elements:{$:function(t){var i,r=t.attributes,o=CKEDITOR.tools.parseCssText(r.style,1),a=t.name;if(a in n)a=n[a];else if("span"==a)(i=o.color)?(a="color",i=CKEDITOR.tools.convertRgbToHex(i)):(i=o["font-family"])?(a="font",i=i):(i=o["font-size"])&&(i=i,a="size");else if("ol"==a||"ul"==a){if(i=o["list-style-type"])switch(i){case"lower-alpha":i="a";break;case"upper-alpha":i="A"}else"ol"==a&&(i=1);a="list"}else if("blockquote"==a){try{var s=t.children[0],l=t.children[1],c="cite"==s.name&&s.children[0].value;c&&(i='"'+c+'"',t.children=l.children)}catch(d){}a="quote"}else if("a"==a){if(i=r.href)if(-1!==i.indexOf("mailto:"))a="email",t.children=[new CKEDITOR.htmlParser.text(i.replace("mailto:",""))],i="";else{var f=1==t.children.length&&t.children[0];f&&f.type==CKEDITOR.NODE_TEXT&&f.value==i&&(i=""),a="url"}}else if("img"==a){t.isEmpty=0;var p=r["data-cke-saved-src"]||r.src,h=r.alt;if(r.width&&r.height&&(i=r.width+"x"+r.height),p&&-1!=p.indexOf(e.config.smiley_path)&&h)return new CKEDITOR.htmlParser.text(u[h]);t.children=[new CKEDITOR.htmlParser.text(p)]}else(i=o["text-align"])&&(a="align",i=i);return t.name=a,i&&(t.attributes.option=i),null},br:function(e){var t=e.next;return t&&t.name in s?!1:void 0}}},1),e.dataProcessor.writer=m,e.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?e.once("contentDom",function(){e.on("setData",i)}):e.on("setData",i)},afterInit:function(e){var t;e._.elementsPath&&(t=e._.elementsPath.filters)&&t.push(function(t){var n=t.getName(),r=i[n]||!1;if("link"==r&&0===t.getAttribute("href").indexOf("mailto:"))r="email";else if("span"==n)t.getStyle("font-size")?r="size":t.getStyle("color")?r="color":t.getStyle("font-family")&&(r="font");else if("img"==r){var o=t.data("cke-saved-src")||t.getAttribute("src");o&&0===o.indexOf(e.config.smiley_path)&&(r="smiley")}else t.getStyle("text-align")&&(r="align");return r})}})}();