For every instance of CKEditor I need to use such a lot code.
Is there any solution how to move this to config.js file?
Is there any solution how to move this to config.js file?
<textarea id="content1" name="content1" style="width:460px;height:206px;"></textarea> <script type="text/javascript"> //<![CDATA[ CKEDITOR.replace('content1', { filebrowserBrowseUrl : '../wysiwyg/ckeditor/ckfinder/ckfinder.html', filebrowserImageBrowseUrl : '../wysiwyg/ckeditor/ckfinder/ckfinder.html?Type=Files', filebrowserFlashBrowseUrl : '../wysiwyg/ckeditor/ckfinder/ckfinder.html?Type=Files', filebrowserUploadUrl : '../wysiwyg/ckeditor/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files', filebrowserImageUploadUrl : '../wysiwyg/ckeditor/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files', filebrowserFlashUploadUrl : '../wysiwyg/ckeditor/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files', resize_minWidth: 460, width: 460, height: 150, toolbar : 'Basic', skin : 'v2', on : { instanceReady : function( ev ) { this.dataProcessor.writer.setRules( 'caption', { breakAfterOpen : false }); this.dataProcessor.writer.setRules( 'div', { breakAfterOpen : false }); this.dataProcessor.writer.setRules( 'p', { indent : false, breakAfterOpen : false, breakAfterClose : false }); this.dataProcessor.writer.setRules( 'br', { breakAfterOpen : true }); this.dataProcessor.writer.setRules( 'li', { breakAfterOpen : false }); this.dataProcessor.writer.setRules( 'h1', { breakAfterOpen : false, breakAfterClose : true }); this.dataProcessor.writer.setRules( 'h2', { breakAfterOpen : false, breakAfterClose : true }); this.dataProcessor.writer.setRules( 'h3', { breakAfterOpen : false, breakAfterClose : true }); this.dataProcessor.writer.setRules( 'h4', { breakAfterOpen : false, breakAfterClose : true }); this.dataProcessor.writer.setRules( 'h5', { breakAfterOpen : false, breakAfterClose : true }); this.dataProcessor.writer.setRules( 'h6', { breakAfterOpen : false, breakAfterClose : true }); this.dataProcessor.writer.setRules( 'td', { breakAfterOpen : false, breakAfterClose : true }); } } }); //]]> </script>
Re: CKEditor configuration
Essentially, create an array of tags you want to behave the same way, then loop the array through the function:
Re: CKEditor configuration