0

I've couple of custom ckeditor plugin which loading custom css files for there own styling. I'm adding custom style sheet using following code,

cssStyles.push("/css/custom.css");

Its working fine with CKeditor 3.6, but after upgrading ckeditor from 3.6 to 4.4.1, in IE-9 & IE -8 its throwing following error, 'Not enough storage is available to complete this operation.' As per my investigation I've found that IE can't load more than 30 files, so I modified my code like,

editor.addContentsCss && editor.addContentsCss( CKEDITOR.plugins.getPath( '/css/custom.css' );

Its working fine in Chrome, even in IE-11, but in IE-09 its throwing an error - 'invalid argument'.

So is there any way to aggregate all css files or any plugin/patch to get rid of?

Aritrik
  • 99
  • 1
  • 1
  • 7

2 Answers2

1

How did you add the extra plugins? The recommended way of adding additional plugins to CKEditor is using the online builder. If you have your own plugins, then the command line builder will be handy. The builder will take care of merging files and producing a build with minimal number of files.

Wiktor Walc
  • 5,280
  • 3
  • 25
  • 31
  • I've never seen problems with a maximum number of files when using a dev version which loads perhaps far more. – Reinmar Jul 31 '15 at 11:26
  • 1
    True, but you were probably not enabling 3rd party plugins which unlike most "official" CKEditor plugins could provide additional CSS files resulting in some weird IE problems http://stackoverflow.com/questions/9906794/internet-explorers-css-rules-limits. Then using the builder to reduce the number of CSS files/imports/whatever provided by CKEditor skins may make the difference. I might be wrong ofc. – Wiktor Walc Jul 31 '15 at 11:32
  • Hmm... you may be right. I was more thinking about files in general, not only CSS files. – Reinmar Jul 31 '15 at 11:33
0

Due to following IE9 rules I was getting the error:

  • A sheet may contain up to 4095 selectors
  • A sheet may import up to 31 sheets
  • Import nesting supports up to 4 levels deep

Referring to Stylesheet Limits in IE.

Aritrik
  • 99
  • 1
  • 1
  • 7