Working with ranges and selections in CKEditor is almost unbearable. In order to make it a bit easier, i recommend using rangy, a free library that makes the html selection/range api cross-browser-proof. Well, at least it made what i was trying to accomplish cross-browser...
Hi Smith,
ReplyDeleteI am facing the same problem. Need to wrap a span around selected text in CKEditor. Need some information about the function you wrote. If I am trying my own plugin then what should be the value of iframe here in the function parameter. and in withNodeFunc we need to create an element... do we need to return anything from the function
I've updated the code-- feel free to take a look
ReplyDeletehi there, I am using the ckeditor in drupal, and I don't think it uses iframes, is this possible?
ReplyDeleteIf you're using the version of CKEDITOR that is at Drupal.ckeditor.com, then no. From what i can tell, that is an html textarea on steriods. This code is for CKEDITOR >= 3.5, the "iframe on steroids" version.
ReplyDeleteIn other words, if you inspect the HTML of your editor and don't see an iframe, this code will not work.
Thanks for asking!
that is great
ReplyDeletei also faced same issue and on this i have got solution.
thanks Micah Smith
Facebook Game Development
Is this code still valid? I'm gettin' some errors while using it (i.e. null iframedoc).
ReplyDelete