Opened 14 years ago
Closed 10 years ago
#8111 closed Bug (fixed)
Text disappears when clicking outside editing box.
Reported by: | Tim | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | 3.6 |
Keywords: | IE | Cc: |
Description
If I click outside of the editing box, the thrid line of text disappears. When I click back into the box, the text reappears.
This is what I have within the editing box: Do re me fa so la ti do. Do re me fa so la ti do. Do re me fa so la ti do. Do re me fa so la ti do. Do re me fa so la ti do. Do re me fa so la ti do. Do re me fa so la ti do. Do re me fa so la ti do. Do re me fa so la ti do. Do re me fa so la ti do. Do re me fa so la ti do. Do re me fa so la ti do. Do re me fa so la ti do. Do re me fa so la ti do. Do re me fa so la ti do. Do re me fa so la ti do. Do re me fa so la ti do. Do re me fa so la ti do. Do re me fa so la ti do. Do re me fa so la ti do. Do re me fa so la ti do. Do re me fa so la ti do. Do re me fa so la ti do. Do re me fa so la ti do. Do re me fa so la ti do. Do re me fa so la ti do. Do re me fa so la ti do. Do re me fa so la ti do. Do re me fa so la ti do. Do re me fa so la ti do. Do re me fa so la ti do. Do re me fa so la ti do. Do re me fa so la ti do. Do re me fa so la ti do. Do re me fa so la ti do. Do re me fa so la ti do.<br /> All Finished.
Here is the code from my page:
<table> <tr> <td colspan="2"><textarea cols="74" rows="9" name="tx_Body" id="tx_Body"></textarea></td> </tr> </table> <script type="text/javascript"> var TheEditor = CKEDITOR.replace('tx_Body', { customConfig : '', on : { 'instanceReady' : configureHtmlOutput }, skin : 'office2003', width: 600, height: 300, startupFocus: true, docType: '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">', fillEmptyBlocks: false, enterMode: CKEDITOR.ENTER_BR, font_defaultLabel: 'Verdana', fontSize_defaultLabel: '12', contentsCss: 'https://www.med.dal.ca/ckeditor/HTMLEmail.css', toolbar: [ { name: 'document', items : [ 'Source','-',/*'Save','NewPage','DocProps','Preview',*/'Print'/*,'-','Templates'*/ ] }, { name: 'clipboard', items : [ 'Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo' ] }, { name: 'editing', items : [ 'Find','Replace','-','SelectAll','-','SpellChecker', 'Scayt' ] }, '/', { name: 'basicstyles', items : [ 'Bold','Italic','Underline','Strike','Subscript','Superscript','-','RemoveFormat' ] }, { name: 'paragraph', items : [ 'NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote','CreateDiv','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiLtr','BidiRtl' ] }, { name: 'links', items : [ 'Link','Unlink','Anchor' ] }, { name: 'insert', items : [ 'Image',/*'Flash',*/'Table','HorizontalRule','Smiley','SpecialChar','PageBreak'/*,'Iframe'*/ ] }, '/', { name: 'styles', items : [ /*'Styles','Format',*/'Font','FontSize' ] }, { name: 'colors', items : [ 'TextColor','BGColor' ] }, { name: 'tools', items : [ /*'Maximize', */'ShowBlocks','-','About' ] } ] } ); CKFinder.setupCKEditor( TheEditor, '#APPLICATION.ROOTDIR#common/htmlemail/ckfinder/' ) ; /* * Adjust the behavior of the dataProcessor to avoid styles * and make it look like FCKeditor HTML output. */ function configureHtmlOutput( ev ) { var editor = ev.editor, dataProcessor = editor.dataProcessor, htmlFilter = dataProcessor && dataProcessor.htmlFilter; // Make output formatting behave similar to FCKeditor var dtd = CKEDITOR.dtd; for ( var e in CKEDITOR.tools.extend( {}, dtd.$nonBodyContent, dtd.$block, dtd.$listItem, dtd.$tableContent ) ) { dataProcessor.writer.setRules( e, { indent : true, breakBeforeOpen : true, breakAfterOpen : false, breakBeforeClose : !dtd[ e ][ '##' ], breakAfterClose : true }); } // Output properties as attributes, not styles. htmlFilter.addRules( { elements : { $ : function( element ){ // Output dimensions of images as width and height if ( element.name == 'img' ) { var style = element.attributes.style; if ( style ){ // Get the width from the style. var match = /(?:^|\s)width\s*:\s*(\d+)px/i.exec( style ), width = match && match[1]; // Get the height from the style. match = /(?:^|\s)height\s*:\s*(\d+)px/i.exec( style ); var height = match && match[1]; if ( width ){ element.attributes.style = element.attributes.style.replace( /(?:^|\s)width\s*:\s*(\d+)px;?/i , '' ); element.attributes.width = width; } if ( height ){ element.attributes.style = element.attributes.style.replace( /(?:^|\s)height\s*:\s*(\d+)px;?/i , '' ); element.attributes.height = height; } } } // Output alignment of paragraphs using align if ( element.name == 'p' ) { style = element.attributes.style; if ( style ){ // Get the align from the style. match = /(?:^|\s)text-align\s*:\s*(\w*);/i.exec( style ); var align = match && match[1]; if ( align ){ element.attributes.style = element.attributes.style.replace( /(?:^|\s)text-align\s*:\s*(\w*);?/i , '' ); element.attributes.align = align; } } } if ( !element.attributes.style ) delete element.attributes.style; return element; } }, attributes : { style : function( value, element ){ // Return ##RGB for background and border colors return convertRGBToHex( value ); } } } ); } /** * Convert a CSS rgb(R, G, B) color back to ##RRGGBB format. * @param Css style string (can include more than one color * @return Converted css style. */ function convertRGBToHex( cssStyle ){ return cssStyle.replace( /(?:rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\))/gi, function( match, red, green, blue ){ red = parseInt( red, 10 ).toString( 16 ); green = parseInt( green, 10 ).toString( 16 ); blue = parseInt( blue, 10 ).toString( 16 ); var color = [red, green, blue] ; // Add padding zeros if the hex value is less than 0x10. for ( var i = 0 ; i < color.length ; i++ ){ color[i] = String( '0' + color[i] ).slice( -2 ) ; } return '##' + color.join( '' ) ; }); } </script>}}}
Attachments (1)
Change History (6)
Changed 14 years ago by
Attachment: | mytest.html added |
---|
comment:1 Changed 14 years ago by
Keywords: | disappear disappearing text line vanishing focus blur onblur onfocus removed |
---|---|
Status: | new → pending |
comment:3 Changed 14 years ago by
I solved the problem by removing
docType: '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">',
Running latest build of ckeditor and ckfinder (ColdFusion) on Windows XP (all updates) and IE 8 (all updates)
- Tim
comment:4 Changed 13 years ago by
Keywords: | IE added |
---|---|
Status: | pending → confirmed |
Version: | 3.6.1 → 3.6 |
When I changed page doctype to the one provided by @tjordan:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
I was able to reproduce the issue.
Browser entered quirks mode on page load and when I pasted sample text and clicked outside editor contents one line of text disappeared.
This issue is reproducible in all versions of IE from CKEditor 3.6.
I have set 3.6 version because prior to this one I could not get buttons in toolbar displayed.
comment:5 Changed 10 years ago by
Resolution: | → fixed |
---|---|
Status: | confirmed → closed |
I haven't been able to reproduce this problem in latest CKEditor 4.4.7.
I see that you are using CKFinder integration with CKEditor. I have tried to reproduce the issue but failed. Here are the steps I have taken:
Could you tell me:
Waiting for your comments.