Opened 8 years ago
Closed 8 years ago
#16685 closed Bug (invalid)
writer.setRules Not Defined In 4.5
Reported by: | Anthony Sherwood | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | Core : Output Data | Version: | 4.5.1 |
Keywords: | Cc: |
Description ¶
This is a duplicate of #9430, which I believe was incorrectly closed. I have v 4.5.10 of ckeditor, which is supposed to have a writer.setRules function to enable formatting of output.
Steps to reproduce ¶
- Install 4.5.10 of ckeditor
- Use the following code on the page (jquery document ready added to prove that all the other js on the page has already been loaded... console.log of writer shows that the object has fully loaded, but the setRules function does not exist.):
<script> $( document ).ready(function() { CKEDITOR.replace('content', { on: { instanceReady: function( ev ) { console.log(this.dataProcessor.writer); this.dataProcessor.writer.setRules( 'p', {indent: true}); } } }); }); </script>
- View console output. Error "TypeError: this.dataProcessor.writer.setRules is not a function" will be present, and the object dump of writer will confirm that the writer object is fully loaded, but does not have a setRules function.
Expected result ¶
Setting of the rules for the output writer.
Actual result ¶
Javascript error stating that function is not defined.
Other details (browser, OS, CKEditor version, installed plugins) ¶
Tested in Chrome, Firefox, and Safari on OS X CKEditor v 4.5.10, installed plugins: sourcearea

Change History (1)
comment:1 Changed 8 years ago by
Keywords: | setRules removed |
---|---|
Resolution: | → invalid |
Status: | new → closed |

If you want to use rules for elements, please use htmlFilter and dataFilter and not the writer.