Hello,
I would like to change cursor icon in the EDITABLE AREA of ckeditor as aresult of some action from context menu.[By editable area I mean this part of editor where you can write something (initially it is only the first line of editor.]
I have managed to do that in Firefox using this simple jQuery command:
$('iframe').contents().find("body.cke_show_borders").css('cursor','url('myurl'),default');
The style is applied and everything is working fine - the cursor is changed.
But in IE8 it does not work - the cursor is still the same, although the style attribute of this element is set correctly. This line of code is working on every other part of my page, also in IE, that's why I am sure that is a ckeditor specific problem, it looks like ckeditor in ie is blocking or overriding this cursor style in some way.
Could you please tell me what I can do to make it work in IE?
Things that I have tried:
-binding action to onmouseover on ("body.cke_show_borders") element event that is changing cursor
-applying style on html or iframe element of ckeditor - the result is that cursor changed in the entire editor apart from the editable area.
Regards
I would like to change cursor icon in the EDITABLE AREA of ckeditor as aresult of some action from context menu.[By editable area I mean this part of editor where you can write something (initially it is only the first line of editor.]
I have managed to do that in Firefox using this simple jQuery command:
$('iframe').contents().find("body.cke_show_borders").css('cursor','url('myurl'),default');
The style is applied and everything is working fine - the cursor is changed.
But in IE8 it does not work - the cursor is still the same, although the style attribute of this element is set correctly. This line of code is working on every other part of my page, also in IE, that's why I am sure that is a ckeditor specific problem, it looks like ckeditor in ie is blocking or overriding this cursor style in some way.
Could you please tell me what I can do to make it work in IE?
Things that I have tried:
-binding action to onmouseover on ("body.cke_show_borders") element event that is changing cursor
-applying style on html or iframe element of ckeditor - the result is that cursor changed in the entire editor apart from the editable area.
Regards

Re: How to change cursor icon in editable area dynamically?
config.contentsCss
body.custom-cursor{cursor:url('myurl')}$('iframe').contents().find('body.cke_show_borders').addClass('custom-cursor');$('iframe').contents().find('body.cke_show_borders').removeClass('custom-cursor');jQuery addClass function
jQuery UI addClass demonstration
addClass
removeClass
CKEditor JavaScript API
web browser
Re: How to change cursor icon in editable area dynamically?
I have tried your solution but unfortunately it still does not work in IE. Despite of testing solution with 'addClass' function that you suggested I have also tried 'setStyle' function form CKeditor API, but with no luck.
The id of this element is ok, it is the same like in Firefox. What's more, I have managed to change some other styles attributes - for example color or background.
To sum up, this code works well in IE:
var element = $('iframe').contents().find('body.cke_show_borders').get(0); elem=CKEDITOR.dom.element.get( element ) elem.setStyle("color", "green");but this one doesn't:
var element = $('iframe').contents().find('body.cke_show_borders').get(0); elem=CKEDITOR.dom.element.get( element ) elem.setStyle("cursor", "pointer")It looks like setting this particular 'cursor' attribute in IE is broken. Could you please give me any other suggestions?
Re: How to change cursor icon in editable area dynamically?
var element = $('iframe').contents().find('body.cke_show_borders').get(0); elem=CKEDITOR.dom.element.get( element ) elem.setStyle("cursor", "pointer")var element = $('iframe').contents().find('body.cke_show_borders').get(0), elem = CKEDITOR.dom.element.get( element ); elem.setStyle('cursor', 'pointer');jQuery.support
Re: How to change cursor icon in editable area dynamically?
Re: How to change cursor icon in editable area dynamically?
file a bug report because there isn't a switch for turning contenteditable off in CKEditor. It's pretty new.
I just looked through the code and realised there is a huge amount of kludging going on around content editable for IE. There is bound to be loads of bugs related to it. IE doesn't and if IE 6, 7 and 8 are anything to go by, never will support web standards correctly ever. Let alone HTML 5.
Thanks,
Zanpakutō
Re: How to change cursor icon in editable area dynamically?
I was determined to find any acceptable solution for that and I have also asked on other forum
and here is a solution. You have to experiment iwth doctype definition for ckeditor iframe (it is easy to change it by config.docType), for me everything works fine (int IE8 )with this one:
Thanks for your help.
I have gone through the given
I have gone through the given link above, but I could not find the solution for the problem. Is there any solution for the question in that link?