I installed CKEditor for company internel use. So all the users are trusted user. But by default, CKEditor NOT allow inline style. For example:
The text contains inline style, but when editing, the inline style was eaten up by the CKEditor.
How can sovle the problem?
function CKEditor( $id ){ global $base_url; ?> <script type="text/javascript" src="../static/ckeditor/ckeditor.js"></script> <script type="text/javascript"> //<![CDATA[ // Replace the <textarea id="editor1"> with an CKEditor instance. var editor = CKEDITOR.replace( '<?php echo( $id ); ?>', { filebrowserImageUploadUrl : '<?php echo( $base_url ); ?>widgets/ckeditor/upload.php?type=image', filebrowserFlashUploadUrl : '<?php echo( $base_url ); ?>widgets/ckeditor/upload.php?type=flash', filebrowserImageBrowseUrl : '<?php echo( $base_url ); ?>widgets/ckeditor/browser.php?type=image', filebrowserFlashBrowseUrl : '<?php echo( $base_url ); ?>widgets/ckeditor/browser.php?type=flash' }); //]]> </script> <?php } ?>
<tr> <td valign="top"><strong>Content</strong></td> <td><textarea name="ct_text" id="editor1"><?php echo( $text ); ?></textarea></td> </tr> <?php CKEditor( "editor1" ); ?>
The text contains inline style, but when editing, the inline style was eaten up by the CKEditor.
How can sovle the problem?
Re: How to disable the style filter
If that doesn't work, you could go into the ckeditor.js file ans search for 'removeFormatAttributes=' which should take you to the area that lists the attributes it removes by default and I believe 'style' is one of them.