We help IT Professionals succeed at work.

Error in IE when opening ckeditor.  "Not enough storage is available to complete this operation."

brianmfalls
brianmfalls asked
on
Medium Priority
3,006 Views
Last Modified: 2013-11-18
When I attempt to open ckeditor in IE, I get a console error.  MSIE Console reads as follows:
SCRIPT14: Not enough storage is available to complete this operation.
ckeditor.js, line 1234 character 17

Open in new window


Line 1234 reads as follows:
this.$.createStyleSheet(h);

Open in new window


In Context, Lines 1232-1244 read as follows:
        appendStyleSheet: function(h) {
            if (this.$.createStyleSheet)
                this.$.createStyleSheet(h);
            else {
                var i = new d.element('link');
                i.setAttributes({
                    rel: 'stylesheet',
                    type: 'text/css',
                    href: h
                });
                this.getHead().append(i);
            }
        }

Open in new window


There are multiple editors, but only one is ever created at any one time by the following script:
	<script type="text/javascript">
	
	
		// param mdfyFrm for use within functions
		var mdfyFrm;


		// click function for editable text areas
		$('.editable').click(function(mdfy) {
			
			var element = mdfy.target || mdfy.srcElement;
			element = element.parentNode;
		
			if (element.nodeName.toLowerCase() == 'div'
				 && (element.className.indexOf('editable') != -1 ))
				replaceDiv(element);
			
		});
		
		
		// replaceDiv function - replaces div with ckeditor
		function replaceDiv(element) {
			
			if (mdfyFrm) {
				mdfyFrm.destroy();
			}
			mdfyFrm = CKEDITOR.replace(element);
		}
		
		
		// removeEditor function - replaces ckeditor with div and placed content
		function removeEditor() {
			
			if (!mdfyFrm)
				return;
				
			$('.editable').innerHTML = mdfyFrm.getData();
		
			mdfyFrm.destroy();
			mdfyFrm = null;
		}

	</script>

Open in new window


If an area contains a div with the class attribute of 'editable', an editor can be created by clicking on said area.  If an editor is open and another area clicked, the open editor closes and the area which was clicked spawns an editor.  If the user 'mouses' out of the form boundaries, the removeEditor() function closes any open editors.

Hopefully, I am not the only one who has come up against this issue.  Thank you in advance for your input.
Comment
Watch Question

Author

Commented:
Maybe another clue???

Error: Unable to get value of the property 'destroy': object is null or undefined

Open in new window

Web Ninja at large
CERTIFIED EXPERT
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
if(false)this.$.createStyleSheet(k)

Open in new window

If i use this fix, its not working for IE 7,8,9
The style sheet is not added and a script error comes saying.
'$.styleSheet' is null or not an object in /ckeditor/ckeditor.js line 37 character 482
Big MontyWeb Ninja at large
CERTIFIED EXPERT

Commented:
are you importing a lot of stylesheets? Ie has a limit on how many you can import:

http://social.msdn.microsoft.com/Forums/ie/en-US/ad1b6e88-bbfa-4cc4-9e95-3889b82a7c1d/internet-explorer-imposes-a-maximum-limit-of-32-individual-stylesheet?forum=iewebdevelopment 

If that's not the problem, I suggest opening up a new question and see if you can get other experts involved, I haven't come across that error before
Yes Thank you, that did it.
We minimized the number of stylesheets we are importing, now its working.

We have not touched ckeditor.js.
Big MontyWeb Ninja at large
CERTIFIED EXPERT

Commented:
glad I could help :)
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.