SetData for CKEditor when <p> and <br> tags infront of text

miccy

New Member
I have problem when setData for my CKEditor, when the data either has a \[code\]<p>\[/code\] tag or \[code\]<br>\[/code\] tag at the start of it. If it doens't have these the data appears fine, like it's meant to but if it does, nothing appears at all.Any ideas?I have tried changing my setData to insertHtml but still same problem.I have also tried to strip the tags of the data before setData in the editor, which succesfully strips the tags but does not insert data.The data is retrieved from a database, through php.Cheers. code for Java:\[code\] <script type="text/javascript"> CKEDITOR.instances.contents.setData( '<?php echo strip_tags($text) ?>'); </script> \[/code\]
 
Back
Top