[opencms-dev] We made a slight change on the function doEditHTML(50) in opencms_edithtml.js

??? shiys at langhua.cn
Thu Dec 9 20:41:26 CET 2004


Hi list,

My client met a problem when editing a large html body in IE DHTMLEdit, he couldn't add/edit a link.

Finally we located the error was caused by this sentence: 
	linkEditorAll = EDITOR.EDIT_HTML.DOM.all.tags("A");
and we changed it to:
	linkEditorAll = EDITOR.EDIT_HTML.DOM.getElementsByTagName("A");
then it's ok.

The new No. 50 branch of doEditHTML(param) is:
    case 50:
        var winheight = (USE_LINKSTYLEINPUTS?240:175);
        linkEditor = EDITOR.EDIT_HTML;
        if(document.EDITOR.EDIT_HTML.DOM.documentElement) {
            // IE5
            linkEditorAll = EDITOR.EDIT_HTML.DOM.getElementsByTagName("A");
        } else {
            // IE4
            linkEditorAll = EDITOR.EDIT_HTML.DOM.all.tags("A");
        }
        linkEditorRange = EDITOR.EDIT_HTML.DOM.body.createTextRange();
        linkEditorSelection = EDITOR.EDIT_HTML.DOM.selection;
        linkEditorStyleInputs = USE_LINKSTYLEINPUTS;
        linkwin = window.open('edit_html_linkall.html','SetLink', "width=450, height=" + winheight + ", resizable=no, top=300, left=250");        
        break;

The enviorment tested on:
IE 6 SP1
Windows 2000
Opencms 5.0.1

Regards,

Shi Yusen/Beijing Langhua Ltd.


More information about the opencms-dev mailing list