You are not logged in.
Pages: 1
I have been trying to get this to work -all- day in IE.
I am getting absolutely no output from IE. No matter what I try to do. What am I missing?
function CSSPicker(editor, args) {
this.editor = editor;
var CSSPicker = this;
}
CSSPicker._pluginInfo = {
name : "CSSPicker",
version : "2008-07-00"
};
CSSPicker.prototype.onGenerateOnce = function() {
var editor = this.editor;
var CSSPicker = this;
editor._cssPicker = editor.addPanel("right");
editor._cssPicker.appendChild(CSSPicker.gen());
editor.showPanel(editor._cssPicker);
};
CSSPicker.prototype.gen = function() {
var editor = this.editor;
this.d = document.createElement("div");
this.d.innerHTML = " - TEST - ";
this.d.href = 'javascript:void(0)';
this.d.onclick = function() {
//var sel = editor._getSelection(); // - Works in FF
var sel = editor._createRange(editor._getSelection()); //supposed to work in IE?
alert(sel.text);
};
return this.d;
};
[url]http://rovangju.blogspot.com[/url] | [url]http://bitbucket.org/rovangju/[/url]
Offline
it should be noted this is with 0.95 / IE7, the objective is to get the alert in the 'gen' function to output the selected text.
[url]http://rovangju.blogspot.com[/url] | [url]http://bitbucket.org/rovangju/[/url]
Offline
Problem solved. It seems as though you need to hook the call for getSelection/getSelectedHTML to a timeout.
[url]http://rovangju.blogspot.com[/url] | [url]http://bitbucket.org/rovangju/[/url]
Offline
Pages: 1