I am putting together a basic wysiwyg and i have <ul
class="editorIcons"> with my editing icons e.g bold etc.
and then i have an iframe that displays the page i am editing.

my problem is, when i have focus on the editable area , or am clicking
on an icon to edit the page i want to call a function called
"enableIcons();"

and if i am not focusing on .editorIcons or .contentEditable' i wand
to call the function disableIcons();

this is my code so far:

var frame=$("iframe");
$(frame).load(function () {

var iBody = $("iframe").contents().find("body");

    $('.contentEditable', iBody).focus(function () {
        enableIcons();
     });

    $('.contentEditable', iBody).not('.editorIcons').blur(function ()
{
        disableIcons();
     });

});


this code calls disableIcons(); when i focus anywhere that is
not .contentEditable but i need to be able to use the .editorIcons so
i can edit my page.

any thoughts would be appreciated.

Robin

Reply via email to