rem
stringlengths
0
126k
add
stringlengths
0
441k
context
stringlengths
15
136k
editorShell.InsertElement(hLine, true);
try { editorShell.InsertElementAtSelection(hLine, true); } catch (e) { dump("Exception occured in InsertElementAtSelection\n"); }
function EditorInsertHLine(){ // Inserting an HLine is different in that we don't use properties dialog // unless we are editing an existing line's attributes // We get the last-used attributes from the prefs and insert immediately tagName = "hr"; hLine = editorShell.GetSelectedElement(tagName); if (hLine) { ...
window.openDialog("chrome: contentWindow.focus();
return _EditorObsolete();
function EditorInsertHTML(){ // Resizing doesn't work! window.openDialog("chrome://editor/content/EdInsSrc.xul","_blank", "chrome,close,titlebar,modal,resizable"); contentWindow.focus();}
top.editorShell.InsertElement(scriptElement,true);
try { top.editorShell.InsertElementAtSelection(scriptElement,true); } catch (e) { dump("Exception occured in InsertElementAtSelection\n"); }
function EditorInsertJSFile(url){ var scriptElement = top.editorShell.CreateElementWithDefaults("script"); // TODO: do some smartass string parsing to find relative file // location so we don't need this big chunky URLs.. // must utilize document dirty flag. scriptElement.setAttribute("src",...
tagName = "hr"; hLine = editorShell.GetSelectedElement(tagName); if (hLine) { dump("HLine was found -- opening dialog...!\n"); window.openDialog("chrome: } else { hLine = editorShell.CreateElementWithDefaults(tagName); if (hLine) { var prefs = Components.classes['component: if (prefs) { prefs = prefs.getService();...
return _EditorObsolete();}
function EditorInsertOrEditHLine(){ // Inserting an HLine is different in that we don't use properties dialog // unless we are editing an existing line's attributes // We get the last-used attributes from the prefs and insert immediately tagName = "hr"; hLine = editorShell.GetSelectedElement(tagName); if (hLine...
window.openDialog("chrome: contentWindow.focus();
return _EditorObsolete();
function EditorInsertOrEditImage(){ window.openDialog("chrome://editor/content/EdImageProps.xul","_blank", "chrome,close,titlebar,modal"); contentWindow.focus();}
window.openDialog("chrome: contentWindow.focus();
return _EditorObsolete();
function EditorInsertOrEditLink(){ window.openDialog("chrome://editor/content/EdLinkProps.xul","_blank", "chrome,close,titlebar,modal"); contentWindow.focus();}
window.openDialog("chrome: contentWindow.focus();
return _EditorObsolete();
function EditorInsertOrEditNamedAnchor(){ window.openDialog("chrome://editor/content/EdNamedAnchorProps.xul", "_blank", "chrome,close,titlebar,modal", ""); contentWindow.focus();}
dump("Function not implemented\n"); return;
function EditorInsertOrEditTable(insertAllowed){ var table = editorShell.GetElementOrParentByTagName("table", null); if (table) { //TEMP FOR BETA1: Disable item - dialog not working dump("Function not implemented\n"); return; // Edit properties of existing table dump("Existing table found ... Editing ...
if (IsInTableCell()) window.openDialog("chrome: else window.openDialog("chrome:
window.openDialog("chrome:
function EditorInsertOrEditTable(insertAllowed){ if (IsInTable()) { // Edit properties of existing table if (IsInTableCell()) window.openDialog("chrome://editor/content/EdTableProps.xul", "_blank", "chrome,close,titlebar,modal", "","CellPanel"); else window.openDialog("chrome://editor/content/EdTa...
dump("EditorInsertTableColumn, after="+after+"\n");
function EditorInsertTableColumn(after){ editorShell.InsertTableColumn(1,after); contentWindow.focus();}
dump("EditorInsertTableRow, below="+below+"\n");
function EditorInsertTableRow(below){ editorShell.InsertTableRow(1,below); contentWindow.focus();}
if (event.shiftKey) {
if (event.shiftKey && !event.getPreventDefault()) {
function editorKeyPress(event){ if (event.keyCode == 9) { if (event.shiftKey) { document.getElementById('msgSubject').focus(); event.preventDefault(); } }}
window.openDialog("chrome: contentWindow.focus();
return _EditorObsolete();
function EditorListProperties(){ window.openDialog("chrome://editor/content/EdListProps.xul","_blank", "chrome,close,titlebar,modal"); contentWindow.focus();}
var theButton = document.getElementById(listType + "Button"); if (theButton) { var buttonFormat = theButton.getAttribute("format"); var isOn = (listType == buttonFormat); if (isOn == 1) { editorShell.RemoveList(listType); } else { editorShell.MakeOrChangeList(listType); } contentWindow.focus(); } else { dump("No but...
return _EditorObsolete();
function EditorMakeOrChangeList(listType){ // check the observer node, // which is the appropriate button var theButton = document.getElementById(listType + "Button"); if (theButton) { var buttonFormat = theButton.getAttribute("format"); var isOn = (listType == buttonFormat); if (isOn == 1) { edit...
dump("In EditorNewPlaintext..\n");
function EditorNewPlaintext(){ dump("In EditorNewPlaintext..\n"); window.openDialog( "chrome://editor/content/TextEditorAppShell.xul", "_blank", "chrome,dialog=no,all", "chrome://editor/content/EditorInitPagePlain.html" );}
dump("EditorObjectProperties: element="+element+"\n");
function EditorObjectProperties(){ var element = GetSelectedElementOrParentCell(); dump("EditorObjectProperties: element="+element+"\n"); if (element) { dump("TagName="+element.nodeName+"\n"); switch (element.nodeName) { case 'IMG': EditorInsertOrEditImage(); break; case 'HR': ...
dump("TagName="+element.nodeName+"\n");
function EditorObjectProperties(){ var element = GetSelectedElementOrParentCell(); dump("EditorObjectProperties: element="+element+"\n"); if (element) { dump("TagName="+element.nodeName+"\n"); switch (element.nodeName) { case 'IMG': EditorInsertOrEditImage(); break; case 'HR': ...
EditorInsertOrEditImage();
goDoCommand("cmd_image");
function EditorObjectProperties(){ var element = GetSelectedElementOrParentCell(); dump("EditorObjectProperties: element="+element+"\n"); if (element) { dump("TagName="+element.nodeName+"\n"); switch (element.nodeName) { case 'IMG': EditorInsertOrEditImage(); break; case 'HR': ...
EditorInsertOrEditHLine();
goDoCommand("cmd_hline");
function EditorObjectProperties(){ var element = GetSelectedElementOrParentCell(); dump("EditorObjectProperties: element="+element+"\n"); if (element) { dump("TagName="+element.nodeName+"\n"); switch (element.nodeName) { case 'IMG': EditorInsertOrEditImage(); break; case 'HR': ...
EditorInsertOrEditLink();
goDoCommand("cmd_link");
function EditorObjectProperties(){ var element = GetSelectedElementOrParentCell(); dump("EditorObjectProperties: element="+element+"\n"); if (element) { dump("TagName="+element.nodeName+"\n"); switch (element.nodeName) { case 'IMG': EditorInsertOrEditImage(); break; case 'HR': ...
EditorInsertOrEditNamedAnchor();
goDoCommand("cmd_anchor");
function EditorObjectProperties(){ var element = GetSelectedElementOrParentCell(); dump("EditorObjectProperties: element="+element+"\n"); if (element) { dump("TagName="+element.nodeName+"\n"); switch (element.nodeName) { case 'IMG': EditorInsertOrEditImage(); break; case 'HR': ...
var styleMenu = document.getElementById("stylesheetMenu") if (styleMenu) styleMenu.removeAttribute("hidden"); WebCompose = true;
function EditorOnLoad() { // See if argument was passed. if ( window.arguments && window.arguments[0] ) { // Opened via window.openDialog with URL as argument. // Put argument where EditorStartup expects it. document.getElementById( "args" ).setAttribute( "value", window.arguments[0] ); ...
if (fp.file) {
if (fp.file && fp.file.path.length > 0) {
function EditorOpen(){ dump("In EditorOpen..\n"); var fp = Components.classes["component://mozilla/filepicker"].createInstance(nsIFilePicker); fp.init(window, editorShell.GetString("OpenHTMLFile"), nsIFilePicker.modeOpen); // While we include "All", include filters that prefer HTML and Text files fp.setFilters(nsI...
dump("In EditorOpen..\n"); var fp = Components.classes["component: fp.init(window, editorShell.GetString("OpenHTMLFile"), nsIFilePicker.modeOpen); fp.setFilters(nsIFilePicker.filterText | nsIFilePicker.filterHTML | nsIFilePicker.filterAll); /* doesn't handle *.shtml files */ try { fp.show(); /* need to handle cance...
return _EditorObsolete();
function EditorOpen(){ dump("In EditorOpen..\n"); var fp = Components.classes["component://mozilla/filepicker"].createInstance(nsIFilePicker); fp.init(window, editorShell.GetString("OpenHTMLFile"), nsIFilePicker.modeOpen); // While we include "All", include filters that prefer HTML and Text files fp.setFilters(nsI...
filePicker.chooseInputFile(editorShell.GetString("OpenHTMLFile"), filePicker.eHTMLFiles+filePicker.eTextFiles+filePicker.eAllFiles, 0, 0);
try { filePicker.chooseInputFile(editorShell.GetString("OpenHTMLFile"), filePicker.eHTMLFiles+filePicker.eTextFiles+filePicker.eAllFiles, 0, 0); } catch (ex) { dump("filePicker.chooseInputFile threw an exception\n"); }
function EditorOpen(){ dump("In EditorOpen..\n"); var filePicker = Components.classes["component://netscape/filespecwithui"].createInstance(); filePicker = filePicker.QueryInterface(Components.interfaces.nsIFileSpecWithUI); /* doesn't handle *.shtml files */ filePicker.chooseInputFile(editorShell.GetString("...
window.openDialog( "chrome:
return _EditorObsolete();
function EditorOpenRemote(){ /* The last parameter is the current browser window. Use 0 and the default checkbox will be to load into an editor and loading into existing browser option is removed */ window.openDialog( "chrome://navigator/content/openLocation.xul", "_blank", "chrome,modal", 0);}
if (IsInHTMLSourceMode()) FinishHTMLSource();
function EditorOpenUrl(url){ if (!url) return; // if the existing window is untouched, just load there if (!FindAndSelectEditorWindowWithURL(url)) { if (PageIsEmptyAndUntouched()) { window.editorShell.LoadUrl(url); } else { // open new window window.openDialog("chrome://editor/conte...
window.openDialog("chrome: contentWindow.focus();
return _EditorObsolete();
function EditorPageProperties(){ window.openDialog("chrome://editor/content/EdPageProps.xul","_blank", "chrome,close,titlebar,modal,resizable", ""); contentWindow.focus();}
if (!editorShell.CheckAndSaveDocument(editorShell.GetString("BeforePreview"))) return; fileurl = ""; try { fileurl = window.content.location; } catch (e) { return; } if (fileurl != "" && fileurl != "about:blank") { window.openDialog(getBrowserURL(), "EditorPreview", "chrome,all,dialog=no", fileurl ); }
return _EditorObsolete();
function EditorPreview(){ if (!editorShell.CheckAndSaveDocument(editorShell.GetString("BeforePreview"))) return; fileurl = ""; try { fileurl = window.content.location; } catch (e) { return; } // CheckAndSave doesn't tell us if the user said "Don't Save", // so make sure we have a url: if (fileurl != ""...
dump("In EditorPrint..\n"); editorShell.Print(); contentWindow.focus();
return _EditorObsolete();
function EditorPrint(){ dump("In EditorPrint..\n"); editorShell.Print(); contentWindow.focus();}
_EditorNotImplemented(); contentWindow.focus();
return _EditorObsolete();
function EditorPrintPreview(){ _EditorNotImplemented(); contentWindow.focus();}
window.openDialog("resource:/res/samples/printsetup.html", "_blank", "chrome,close,titlebar", "");
_EditorNotImplemented();
function EditorPrintPreview(){ window.openDialog("resource:/res/samples/printsetup.html", "_blank", "chrome,close,titlebar", ""); contentWindow.focus();}
_EditorNotImplemented(); contentWindow.focus();
return _EditorObsolete();
function EditorPrintSetup(){ // Old code? Browser no longer is doing this //window.openDialog("resource:/res/samples/printsetup.html", "_blank", "chrome,close,titlebar", ""); _EditorNotImplemented(); contentWindow.focus();}
if (ColorWellID) { var menupopup = document.getElementById("BackColorPopup"); if (menupopup) menupopup.closePopup(); }
function EditorRemoveBackColor(ColorWellID){ //TODO: Set colorwell to browser's default color editorShell.SetBackgroundColor(""); contentWindow.focus();}
gContentWindow.focus();
window.content.focus();
function EditorRemoveBackColor(ColorWellID){ if (ColorWellID) { var menupopup = document.getElementById("BackColorPopup"); if (menupopup) menupopup.closePopup(); } //TODO: Set colorwell to browser's default color editorShell.SetBackgroundColor(""); gContentWindow.focus();}
editorShell.RemoveTextProperty("a", "");
editorShell.RemoveTextProperty("href", "");
function EditorRemoveLinks(){ editorShell.RemoveTextProperty("a", ""); contentWindow.focus();}
gContentWindow.focus();
window.content.focus();
function EditorRemoveLinks(){ editorShell.RemoveTextProperty("href", ""); gContentWindow.focus();}
editorShell.RemoveTextProperty(tagName, ""); contentWindow.focus();
return _EditorObsolete();
function EditorRemoveStyle(tagName){ editorShell.RemoveTextProperty(tagName, ""); contentWindow.focus();}
if (ColorWellID) { var menupopup = document.getElementById("TextColorPopup"); if (menupopup) menupopup.closePopup(); }
function EditorRemoveTextColor(ColorWellID){ //TODO: Set colorwell to browser's default color editorShell.SetTextProperty("font", "color", ""); contentWindow.focus();}
bodyelement.removeAttribute("text"); bodyelement.removeAttribute("bgcolor");
gEditor.removeAttributeOrEquivalent(bodyelement, "text", true); gEditor.removeAttributeOrEquivalent(bodyelement, "bgcolor", true);
function EditorResetFontAndColorAttributes(){ document.getElementById("cmd_fontFace").setAttribute("state", ""); EditorRemoveTextProperty("font", "color"); EditorRemoveTextProperty("font", "bgcolor"); EditorRemoveTextProperty("font", "size"); EditorRemoveTextProperty("small", ""); EditorRemoveTextProperty("big", ...
bodyelement.removeAttribute("background");
gEditor.removeAttributeOrEquivalent(bodyelement, "background", true);
function EditorResetFontAndColorAttributes(){ document.getElementById("cmd_fontFace").setAttribute("state", ""); EditorRemoveTextProperty("font", "color"); EditorRemoveTextProperty("font", "bgcolor"); EditorRemoveTextProperty("font", "size"); EditorRemoveTextProperty("small", ""); EditorRemoveTextProperty("big", ...
dump("In EditorSave...\n"); EditorSaveDocument(false, false) contentWindow.focus();
return _EditorObsolete();
function EditorSave(){ dump("In EditorSave...\n"); EditorSaveDocument(false, false) contentWindow.focus();}
EditorSaveDocument(true, false); contentWindow.focus();
return _EditorObsolete();
function EditorSaveAs(){ EditorSaveDocument(true, false); contentWindow.focus();}
editorShell.SelectAllTableCells();
function EditorSelectAllTableCells(){//TEMP FOR BETA1: Disable item - dialog not working// editorShell.SelectAllTableCells(); contentWindow.focus();}
dump("EditorSelectBackColor: "+color+"\n");
dump("EditorSelectBackColor: "+color+"\n"); var menupopup; if (ColorPickerID == "menuBackCP") menupopup = document.getElementById("formatMenuPopup"); else if (ColorPickerID == "BackColorPicker") menupopup = document.getElementById("BackColorPopup"); if (menupopup) menupopup.closePopup();
function EditorSelectBackColor(ColorPickerID, ColorWellID){ var color = getColorAndSetColorWell(ColorPickerID, ColorWellID); dump("EditorSelectBackColor: "+color+"\n"); EditorSetBackgroundColor(color);}
contentWindow.focus();
function EditorSelectBackColor(ColorPickerID, ColorWellID){ var color = getColorAndSetColorWell(ColorPickerID, ColorWellID); dump("EditorSelectBackColor: "+color+"\n"); EditorSetBackgroundColor(color);}
gContentWindow.focus();
window.content.focus();
function EditorSelectBackColor(ColorPickerID, ColorWellID){ var color = getColorAndSetColorWell(ColorPickerID, ColorWellID);dump("EditorSelectBackColor: "+color+"\n"); // Close appropriate menupopup var menupopup; if (ColorPickerID == "menuBackCP") menupopup = document.getElementById("formatMenuPopup"); else ...
contentWindow.focus();
function EditorSelectFontFace() { var select = document.getElementById("FontFaceSelect");//dump("EditorSelectFontFace: "+gFontFaceNames[select.selectedIndex]+"\n"); if (select) { if (select.selectedIndex == -1) return; EditorSetFontFace(gFontFaceNames[select.selectedIndex]); }}
dump("EditorSelectFontSize: "+gFontSizeNames[select.selectedIndex]+"\n");
function EditorSelectFontSize(){ var select = document.getElementById("FontSizeSelect");dump("EditorSelectFontSize: "+gFontSizeNames[select.selectedIndex]+"\n"); if (select) { if (select.selectedIndex == -1) return; EditorSetFontSize(gFontSizeNames[select.selectedIndex]); }}
contentWindow.focus();
function EditorSelectParagraphFormat(){ var select = document.getElementById("ParagraphSelect"); if (select) { if (select.selectedIndex == -1) return; editorShell.SetParagraphFormat(gParagraphTagNames[select.selectedIndex]); }}
editorShell.SelectTableCell();
function EditorSelectTable(){//TEMP FOR BETA1: Disable item - dialog not working// editorShell.SelectTableCell(); contentWindow.focus();}
var selection = editorShell.editorSelection; if (selection) { var tableNode = editorShell.GetElementOrParentByTagName("table",selection.anchorNode); if (tableNode) { selection.clearSelection(); AppendNodeToSelection(selection, tableNode); } }
editorShell.SelectTableCell();
function EditorSelectTable(){ var selection = editorShell.editorSelection; if (selection) { var tableNode = editorShell.GetElementOrParentByTagName("table",selection.anchorNode); if (tableNode) { selection.clearSelection(); AppendNodeToSelection(selection, tableNode); } } contentWindow.focu...
editorShell.SelectTableCell();
function EditorSelectTableCell(){//TEMP FOR BETA1: Disable item - dialog not working// editorShell.SelectTableCell(); contentWindow.focus();}
var selection = editorShell.editorSelection; if (selection) { var cellNode = editorShell.GetElementOrParentByTagName("td",selection.anchorNode); if (cellNode) { selection.clearSelection(); AppendNodeToSelection(selection, cellNode); } }
editorShell.SelectTableCell();
function EditorSelectTableCell(){ var selection = editorShell.editorSelection; if (selection) { var cellNode = editorShell.GetElementOrParentByTagName("td",selection.anchorNode); if (cellNode) { selection.clearSelection(); AppendNodeToSelection(selection, cellNode); } } contentWindow.focus(...
editorShell.SelectTableColumn();
function EditorSelectTableColumn(){//TEMP FOR BETA1: Disable item - dialog not working// editorShell.SelectTableColumn(); contentWindow.focus();}
editorShell.SelectTableColumn();
function EditorSelectTableColumn(){ //TODO: FINISH THIS! contentWindow.focus();}
editorShell.SelectTableRow();
function EditorSelectTableRow(){//TEMP FOR BETA1: Disable item - dialog not working// editorShell.SelectTableRow(); contentWindow.focus();}
var tagNameObj = new Object(); var isSelectedObj = new Object(); var tagName; var isSelected; var tableElement = editorShell.GetSelectedOrParentTableElement(tagNameObj,isSelectedObj); tagName = tagNameObj.value; isSelected = isSelectedObj.value; dump("Table element="+tableElement+" Tagname="+tagName+" IsSelected="+isSe...
editorShell.SelectTableRow();
function EditorSelectTableRow(){ var tagNameObj = new Object(); var isSelectedObj = new Object(); var tagName; var isSelected; var tableElement = editorShell.GetSelectedOrParentTableElement(tagNameObj,isSelectedObj); tagName = tagNameObj.value; isSelected = isSelectedObj.value;dump("Table element="+tableElement+...
contentWindow.focus();
function EditorSelectTextColor(ColorPickerID, ColorWellID){ var color = getColorAndSetColorWell(ColorPickerID, ColorWellID); dump("EditorSelectTextColor: "+color+"\n"); EditorSetFontColor(color);}
dump("EditorSelectTextColor: "+color+"\n");
function EditorSelectTextColor(ColorPickerID, ColorWellID){ var color = getColorAndSetColorWell(ColorPickerID, ColorWellID);dump("EditorSelectTextColor: "+color+"\n"); // Close appropriate menupopup var menupopup; if (ColorPickerID == "menuTextCP") menupopup = document.getElementById("formatMenuPopup"); else ...
gContentWindow.focus();
window.content.focus();
function EditorSetBackgroundColor(color){ editorShell.SetBackgroundColor(color); gContentWindow.focus();}
var prefAuthorString = prefs.CopyCharPref("editor.author");
prefAuthorString = prefs.CopyCharPref("editor.author");
function EditorSetDefaultPrefs(){ /* only set defaults for new documents */ var url = document.getElementById("args").getAttribute("value"); if ( url != "about:blank" ) return; var domdoc; try { domdoc = window.editorShell.editorDocument; } catch (e) { dump( e + "\n"); } if ( !domdoc ) return; // try to ge...
editButton = document.getElementById("EditModeButton"); browserButton = document.getElementById("BrowserModeButton");
var editButton = document.getElementById("EditModeButton"); var browserButton = document.getElementById("BrowserModeButton"); var showMenu = document.getElementById("ShowExtraMarkup"); var hideMenu = document.getElementById("HideExtraMarkup");
function EditorSetDisplayStyle(mode){ EditorDisplayMode = mode; editorShell.SetDisplayMode(mode); editButton = document.getElementById("EditModeButton"); browserButton = document.getElementById("BrowserModeButton"); var editSelected = 0; var browserSelected = 0; if (mode == 0) editSelected = 1; if (mode == 1) b...
if (mode == 0) editSelected = 1; if (mode == 1) browserSelected = 1; dump(editButton+browserButton+" Display mode: EditSelected="+editSelected+" BrowserSelected="+browserSelected+"\n");
if (mode == 0) { editSelected = 1; showMenu.setAttribute("hidden","true"); hideMenu.removeAttribute("hidden"); } if (mode == 1) { browserSelected = 1; showMenu.removeAttribute("hidden"); hideMenu.setAttribute("hidden","true"); }
function EditorSetDisplayStyle(mode){ EditorDisplayMode = mode; editorShell.SetDisplayMode(mode); editButton = document.getElementById("EditModeButton"); browserButton = document.getElementById("BrowserModeButton"); var editSelected = 0; var browserSelected = 0; if (mode == 0) editSelected = 1; if (mode == 1) b...
contentWindow.focus();
function EditorSetDisplayStyle(mode){ EditorDisplayMode = mode; editorShell.SetDisplayMode(mode); editButton = document.getElementById("EditModeButton"); browserButton = document.getElementById("BrowserModeButton"); var editSelected = 0; var browserSelected = 0; if (mode == 0) editSelected = 1; if (mode == 1) b...
editorShell.editorDocument.SetDocumentCharacterSet(aCharset);
editorShell.SetDocumentCharacterSet(aCharset);
function EditorSetDocumentCharacterSet(aCharset){ dump(aCharset); editorShell.editorDocument.SetDocumentCharacterSet(aCharset);}
dump(aCharset); editorShell.SetDocumentCharacterSet(aCharset);
if(window.editorShell && (! window.editorShell.documentModified) && editorShell.editorDocument.locatoin != "about:blank") { dump(aCharset); editorShell.SetDocumentCharacterSet(aCharset); editorShell.LoadUrl(editorShell.editorDocument.location); }
function EditorSetDocumentCharacterSet(aCharset){ dump(aCharset); editorShell.SetDocumentCharacterSet(aCharset);}
gContentWindow.focus();
window.content.focus();
function EditorSetFontColor(color){ editorShell.SetTextProperty("font", "color", color); gContentWindow.focus();}
dump("Setting focus to content window...\n");
function EditorSetFontFace(fontFace){ if( fontFace == "tt") { // The old "teletype" attribute editorShell.SetTextProperty("tt", "", ""); // Clear existing font face editorShell.RemoveTextProperty("font", "face"); } else { // Remove any existing TT nodes editorShell.RemoveTextProperty("tt", "", "")...
function EditorSetFontFace(fontFace)
function EditorSetFontFace(commandID, fontFace)
function EditorSetFontFace(fontFace){ if (fontFace == "tt") { // The old "teletype" attribute editorShell.SetTextProperty("tt", "", ""); // Clear existing font face editorShell.RemoveTextProperty("font", "face"); } else { // Remove any existing TT nodes editorShell.RemoveTextProperty("tt", "", "")...
if (fontFace == "tt") {
dump("Setting font face to " + fontFace + "\n"); var commandNode = document.getElementById(commandID); commandNode.setAttribute("state", fontFace); window.content.focus(); goDoCommand(commandID); /* if (fontFace == "tt") {
function EditorSetFontFace(fontFace){ if (fontFace == "tt") { // The old "teletype" attribute editorShell.SetTextProperty("tt", "", ""); // Clear existing font face editorShell.RemoveTextProperty("font", "face"); } else { // Remove any existing TT nodes editorShell.RemoveTextProperty("tt", "", "")...
gContentWindow.focus();
window.content.focus(); */
function EditorSetFontFace(fontFace){ if (fontFace == "tt") { // The old "teletype" attribute editorShell.SetTextProperty("tt", "", ""); // Clear existing font face editorShell.RemoveTextProperty("font", "face"); } else { // Remove any existing TT nodes editorShell.RemoveTextProperty("tt", "", "")...
dump("Setting focus to content window...\n");
function EditorSetFontFace(fontFace){ if( fontFace == "tt") { // The old "teletype" attribute editorShell.SetTextProperty("tt", "", ""); // Clear existing font face editorShell.RemoveTextProperty("font", "face"); } else { // Remove any existing TT nodes editorShell.RemoveTextProperty("tt", "", "")...
editorShell.RemoveTextProperty("small", ""); editorShell.RemoveTextProperty("big", "");
function EditorSetFontSize(size){ if( size == "0" || size == "normal" || size == "medium" ) { editorShell.RemoveTextProperty("font", "size"); } else { // Temp: convert from new CSS size strings to old HTML size strings switch (size) { case "xx-small": case "x-small": size = "-2"; ...
editorShell.RemoveTextProperty("font", size);
editorShell.RemoveTextProperty("font", "size");
function EditorSetFontSize(size){ if( size == "0" || size == "normal" || size == "medium" ) { editorShell.RemoveTextProperty("font", size); dump("Removing font size\n"); } else { dump("Setting font size\n"); // Temp: convert from new CSS size strings to old HTML size strings switch (size) { ...
dump("Saving para format state " + paraFormat + "\n");
function EditorSetParagraphFormat(commandID, paraFormat){ // editorShell.SetParagraphFormat(paraFormat); var commandNode = document.getElementById(commandID); dump("Saving para format state " + paraFormat + "\n"); commandNode.setAttribute("state", paraFormat); window.content.focus(); // needed for command dispat...
function EditorSetParagraphFormat(paraFormat)
function EditorSetParagraphFormat(commandID, paraFormat)
function EditorSetParagraphFormat(paraFormat){ editorShell.SetParagraphFormat(paraFormat); contentWindow.focus();}
editorShell.SetParagraphFormat(paraFormat); contentWindow.focus();
var commandNode = document.getElementById(commandID); dump("Saving para format state " + paraFormat + "\n"); commandNode.setAttribute("state", paraFormat); window.content.focus(); goDoCommand(commandID);
function EditorSetParagraphFormat(paraFormat){ editorShell.SetParagraphFormat(paraFormat); contentWindow.focus();}
selection.clearSelection();
selection.removeAllRanges();
function EditorSetSelectionFromOffsets(selRanges){ var rangeArr, start, end, node, offset; var selection = editorShell.editorSelection; selection.clearSelection(); for (var i = 0; i < selRanges.length; i++) { rangeArr = selRanges[i]; start = rangeArr[0]; end = rangeArr[1]; var range = editorShe...
HideImage();
function EditorSharedStartup(){ // set up JS-implemented commands SetupControllerCommands(); // Just for convenience gContentWindow = window._content; gIsWin = navigator.appVersion.indexOf("Win") != -1; gIsUNIX = (navigator.appVersion.indexOf("X11") || navigator.appVersion.indexOf("nux")) != -1; gIs...
editorShell.contentsMIMEType = "text/html";
editorShell.contentsMIMEType = kHTMLMimeType;
function EditorSharedStartup(){ // Just for convenience gContentWindow = window._content; switch (editorShell.editorType) { case "html": case "htmlmail": gIsHTMLEditor = true; break; case "text": case "textmail": gIsHTMLEditor = false; break; default: dump...
editorShell.contentsMIMEType = "text/plain";
editorShell.contentsMIMEType = kTextMimeType;
function EditorSharedStartup(){ // Just for convenience gContentWindow = window._content; switch (editorShell.editorType) { case "html": case "htmlmail": gIsHTMLEditor = true; break; case "text": case "textmail": gIsHTMLEditor = false; break; default: dump...
dump("In EditorShutdown..\n"); return editorShell.Shutdown();
function EditorShutdown(){ dump("In EditorShutdown..\n"); return editorShell.Shutdown();}
RemoveToolbarPrefListener();
gEditorToolbarPrefListener.shutdown();
function EditorShutdown(){ RemoveToolbarPrefListener(); gCSSPrefListener.shutdown(); try { var commandManager = GetCurrentCommandManager(); commandManager.removeCommandObserver(gEditorDocumentObserver, "obs_documentCreated"); commandManager.removeCommandObserver(gEditorDocumentObserver, "obs_documentWillBeD...
gReturnInParagraphPrefListener.shutdown();
function EditorShutdown(){ RemoveToolbarPrefListener(); gCSSPrefListener.shutdown(); try { var commandManager = GetCurrentCommandManager(); commandManager.removeCommandObserver(gEditorDocumentObserver, "obs_documentCreated"); commandManager.removeCommandObserver(gEditorDocumentObserver, "obs_documentWillBeD...
catch(ex) { dump("Can't start logging!:\n" + ex + "\n");
catch(ex) { dump("Can't start logging!:\n" + ex + "\n"); }
function EditorStartLog(){ try { var edlog = gEditor.QueryInterface(Components.interfaces.nsIEditorLogging); var fs = EditorGetScriptFileSpec(); edlog.startLogging(fs); window._content.focus(); fs = null; } catch(ex) { dump("Can't start logging!:\n" + ex + "\n");}function EditorStopLog(){ try { va...
function EditorStopLog() { try { var edlog = gEditor.QueryInterface(Components.interfaces.nsIEditorLogging); edlog.stopLogging(); window._content.focus(); } catch(ex) { dump("Can't stop logging!:\n" + ex + "\n"); } function EditorRunLog() { var fs; fs = EditorGetScriptFileSpec(); EditorExecuteScript(fs); window._conte...
function EditorStartLog(){ try { var edlog = gEditor.QueryInterface(Components.interfaces.nsIEditorLogging); var fs = EditorGetScriptFileSpec(); edlog.startLogging(fs); window._content.focus(); fs = null; } catch(ex) { dump("Can't start logging!:\n" + ex + "\n");}function EditorStopLog(){ try { va...
window.focus();
contentWindow.focus();
function EditorStartup(editorType){ dump("Doing Startup...\n"); contentWindow = window.frames[0]; dump("Trying to make an editor appcore through the component manager...\n"); var editorShell = Components.classes["component://netscape/editor/editorshell"].createInstance(); editorShell = editorShell.QueryInterface(C...
EditorSetup(editorName, appCore)
EditorSetup(editorName, appCore); window.focus();
function EditorStartup(){ dump("Doing Startup...\n"); /* Get the global Editor AppCore and the XPFE toolkit core into globals here */ appCore = XPAppCoresManager.Find(editorName); dump("Looking up EditorAppCore...\n"); if (appCore == null) { dump("Creating EditorAppCore...\n"); appCore = new EditorAppCore...
ToggleEditModeType(gNormalModeButton.getAttribute("type"));
function EditorStartup(editorType, editorElement){ gIsHTMLEditor = (editorType == "html"); if (gIsHTMLEditor) { gSourceContentWindow = document.getElementById("content-source"); gEditModeBar = document.getElementById("EditModeToolbar"); gEditModeLabel = document.getElementById("EditModeLabel"); ...
EditorSharedStartup()
EditorSharedStartup(); SetupHTMLSourceController();
function EditorStartup(editorType, editorElement){ gIsHTMLEditor = (editorType == "html"); if (gIsHTMLEditor) { gSourceContentWindow = document.getElementById("content-source"); gEditModeBar = document.getElementById("EditModeToolbar"); gEditModeLabel = document.getElementById("EditModeLabel"); ...
editorShell.Init();
function EditorStartup(editorType, editorElement){ gIsHTMLEditor = (editorType == "html"); if (gIsHTMLEditor) { gSourceContentWindow = document.getElementById("content-source"); gEditModeBar = document.getElementById("EditModeToolbar"); gNormalModeButton = document.getElementById("NormalModeButton");...
editorShell.SetWebShellWindow(window); editorShell.SetToolbarWindow(window)
function EditorStartup(editorType, editorElement){ contentWindow = window.content; // store the editor shell in the window, so that child windows can get to it. editorShell = editorElement.editorShell; editorShell.Init(); editorShell.SetWebShellWindow(window); editorShell.SetToolbarWindow(window) editorShell...
editorShell.SetContentWindow(contentWindow);
function EditorStartup(editorType, editorElement){ contentWindow = window.content; // store the editor shell in the window, so that child windows can get to it. editorShell = editorElement.editorShell; editorShell.Init(); editorShell.SetWebShellWindow(window); editorShell.SetToolbarWindow(window) editorShell...
window.updateCommands("create");
function EditorStartup(editorType, editorElement){ contentWindow = window.content; // store the editor shell in the window, so that child windows can get to it. editorShell = editorElement.editorShell; editorShell.Init(); editorShell.SetWebShellWindow(window); editorShell.SetToolbarWindow(window) editorShell...
window.addEventListener("load", EditorDocumentLoaded, true, false); dump("Trying to make an Editor Shell through the component manager...\n");
function EditorStartup(editorType, editorElement){ dump("Doing Editor Startup...\n"); contentWindow = window.content; // set up event listeners window.addEventListener("load", EditorDocumentLoaded, true, false); dump("Trying to make an Editor Shell through the component manager...\n"); // store the editor she...
AddToolbarPrefListener();
gEditorToolbarPrefListener = new nsPrefListener(kEditorToolbarPrefs);
function EditorStartup(){ var ds = GetCurrentEditorElement().docShell; var root = ds.QueryInterface(Components.interfaces.nsIDocShellTreeItem). rootTreeItem.QueryInterface(Components.interfaces.nsIDocShell); root.QueryInterface(Components.interfaces.nsIDocShell).appType = Components.interfaces.nsIDocShell.APP_...
gCSSPrefListener = new nsButtonPrefListener();
gCSSPrefListener = new nsPrefListener(kUseCssPref); gReturnInParagraphPrefListener = new nsPrefListener(kCRInParagraphsPref);
function EditorStartup(){ var ds = GetCurrentEditorElement().docShell; var root = ds.QueryInterface(Components.interfaces.nsIDocShellTreeItem). rootTreeItem.QueryInterface(Components.interfaces.nsIDocShell); root.QueryInterface(Components.interfaces.nsIDocShell).appType = Components.interfaces.nsIDocShell.APP_...
var prefs = GetPrefs(); var useCSS = prefs.getBoolPref("editor.use_css");
var useCSS = prefs.getBoolPref(kUseCssPref);
function EditorStartup(){ var ds = GetCurrentEditorElement().docShell; var root = ds.QueryInterface(Components.interfaces.nsIDocShellTreeItem). rootTreeItem.QueryInterface(Components.interfaces.nsIDocShell); root.QueryInterface(Components.interfaces.nsIDocShell).appType = Components.interfaces.nsIDocShell.APP_...
catch(ex) { dump("Can't stop logging!:\n" + ex + "\n");
catch(ex) { dump("Can't stop logging!:\n" + ex + "\n"); }
function EditorStopLog(){ try { var edlog = gEditor.QueryInterface(Components.interfaces.nsIEditorLogging); edlog.stopLogging(); window._content.focus(); } catch(ex) { dump("Can't stop logging!:\n" + ex + "\n");}function EditorRunLog(){ var fs; fs = EditorGetScriptFileSpec(); EditorExecuteScript(fs); wi...