10/10/2018, 10:58
Bỏ Thẻ <P> mặc định của FCKEditor
em dùng FCKeditor để insert vào DB nhưng cú mỗi lần insert nó lại tự động thêm 1 cái thẻ <p> ở đầu bài viết làm cho nội dung bài viết bị tự xa tiêu đề!hix! vậy cho em hỏi làm sao để bỏ di việc tự động thêm thẻ <p> đó ạ! thanks ạ!
Bài liên quan





Lâu ko xài nên mình ko nhớ
FCKConfig.EnterMode = 'br'; FCKConfig.ShiftEnterMode = 'br'; var proto = FCKEnterKey.prototype; FCKEnterKey = function( targetWindow, enterMode, shiftEnterMode, tabSpaces ) { this.Window = targetWindow ; this.EnterMode = 'br' ; this.ShiftEnterMode = 'br' ; // Setup the Keystroke Handler. var oKeystrokeHandler = new FCKKeystrokeHandler( false ) ; oKeystrokeHandler._EnterKey = this ; oKeystrokeHandler.OnKeystroke = FCKEnterKey_OnKeystroke ; oKeystrokeHandler.SetKeystrokes( [ [ 13 , 'Enter' ], [ SHIFT + 13, 'ShiftEnter' ], [ 8 , 'Backspace' ], [ CTRL + 8 , 'CtrlBackspace' ], [ 46 , 'Delete' ] ] ) ; this.TabText = '' ; // Safari by default inserts 4 spaces on TAB, while others make the editor // loose focus. So, we need to handle it here to not include those spaces. if ( tabSpaces > 0 || FCKBrowserInfo.IsSafari ) { while ( tabSpaces-- ) this.TabText += '\xa0' ; oKeystrokeHandler.SetKeystrokes( [ 9, 'Tab' ] ); } oKeystrokeHandler.AttachToElement( targetWindow.document ) ; } FCKEnterKey.prototype = proto;