~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to ivle/webapp/filesystem/browser/media/editor.js

  • Committer: William Grant
  • Date: 2009-08-11 00:44:27 UTC
  • Revision ID: grantw@unimelb.edu.au-20090811004427-mivvczejev8v2009
Use textarea.value to set the content of the editor's textarea.

Inserting a DOM text node was dirty, evil, sick, wrong, bad, nasty,
and worst of all broke IE for files with UNIX newlines.

Show diffs side-by-side

added added

removed removed

Lines of Context:
110
110
    var div = document.createElement("div");
111
111
    div.style.height = '100%';
112
112
    files.appendChild(div);
113
 
    var txt_elem = dom_make_text_elem("textarea",
114
 
        text.toString())
 
113
    var txt_elem = document.createElement("textarea");
 
114
    txt_elem.value = text.toString();
115
115
    div.appendChild(txt_elem);
116
116
    txt_elem.setAttribute("id", "editbox");
117
117
    language = language_from_mime(current_file.type);