#13 open
Oscar Kuchuk

Align parameter for MooEditable.Image error

Reported by Oscar Kuchuk | 2009-11-20 00:05:39 UTC | in 0.5

Tested with firefox 3.5 and ie7 doesen't get align parameter when dialog opens. Also doesen't set value for ie7.
works well with following corrections:

Line 30 of MooEditable.Image.js:
+ 'align noneleftcenterright '

also:
change onOpen:

   onOpen: function(){
        var input = this.el.getElement('.dialog-url');
        var node = editor.selection.getNode();
        if (node.get('tag') == 'img'){
            this.el.getElement('.dialog-url').set('value', node.get('src'));
            this.el.getElement('.dialog-alt').set('value', node.get('alt'));
            this.el.getElement('.dialog-class').set('value', node.className);
            var al=this.el.getElement('.dialog-align')
            var o=al.getElement('option[selected=selected]');
            if(o)
            {
                o.set('selected',false);
            }
            alval=node.get('align');
            if(!alval)
                alval='none';
            o=al.getElement('option[text='+ alval+']');
            if(o)
                o.set('selected',true);
        }
        (function(){
            input.focus();
            input.select();
        }).delay(10);
    },

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

A simple web-based WYSIWYG editor, written in Mootools.

People watching this ticket

Pages