2 init : function(ed) {
\r
3 var dom = ed.dom, f = document.forms[0], n = ed.selection.getNode(), w;
\r
5 w = dom.getAttrib(n, 'width');
\r
6 f.width.value = w ? parseInt(w) : '';
\r
7 f.size.value = dom.getAttrib(n, 'size');
\r
8 f.noshade.checked = !!dom.getAttrib(n, 'noshade');
\r
9 selectByValue(f, 'width2', w.indexOf('%') != -1 ? '%' : 'px');
\r
12 update : function() {
\r
13 var ed = tinyMCEPopup.editor, h, f = document.forms[0];
\r
18 h += ' size="' + f.size.value + '"';
\r
21 h += ' width="' + f.width.value + (f.width2.value == '%' ? '%' : '') + '"';
\r
23 if (f.noshade.checked)
\r
24 h += ' noshade="noshade"';
\r
28 ed.execCommand("mceInsertContent", false, h);
\r
29 tinyMCEPopup.close();
\r
33 tinyMCEPopup.requireLangPack();
\r
34 tinyMCEPopup.onInit.add(AdvHRDialog.init, AdvHRDialog);
\r