54726: Add link to W3C Validator

90550: Need to rewrite URLs for publishing and for save as
91388: Link checker, Work in progress (doesn't work yet)
r=brade, sr=kin


git-svn-id: svn://10.0.0.236/trunk@232513 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
akkana%netscape.com 2007-08-22 04:53:09 +00:00
parent d0001e2da0
commit 03a1abb210

View File

@ -25,12 +25,6 @@
// --------------------------- Output ---------------------------
function EditorSerialize()
{
var s = new XMLSerializer();
dump(s.serializeToString(editorShell.editorDocument) + "\n");
}
function EditorGetText()
{
if (editorShell) {
@ -74,7 +68,9 @@ function EditorTestSelection()
dump("Selection contains:\n");
// 3rd param = column to wrap
dump(selection.toString("text/plain", gOutputFormatted & gOutputSelectionOnly, 0) + "\n");
dump(selection.toStringWithFormat("text/plain",
gOutputFormatted & gOutputSelectionOnly,
0) + "\n");
var output;
@ -346,45 +342,6 @@ function EditorRunLog()
window._content.focus();
}
function EditorTableize()
{
// 1 = OutputSelectionOnly, 1024 = OutputLFLineBreak
// 256 = OutputEncodeEntities
var str = editorShell.GetContentsAs("text/html", 1+1024);
var newstr;
//dump("String to tableize is '" + str + "'\n");
// Replace nbsp with spaces:
newstr = str.replace(/\u00a0/g, " ");
// Trim trailing <p> or <br>
str = newstr.replace(/\s*<br>\s*$/, "");
newstr = str.replace(/\s*<p>\s*$/, "");
// Trim leading and trailing spaces
str = newstr.replace(/^\s+/, "");
newstr = str.replace(/\s+$/, "");
// Trim whitespace adjacent to <p> and <br> tags
str = newstr.replace(/\s+<p>\s+/g, "<br>");
newstr = str.replace(/\s+<br>\s+/g, "<br>");
// Put <td> wherever we see whitespace
str = newstr.replace(/ +/g, " <td>");
// End table row and start another for each br or p
newstr = str.replace(/\s*<br>\s*/g, "</tr>\n<tr><td>");
// Add the table tags and the opening and closing tr/td tags
str = "<table border=\"1\">\n<tr><td>" + newstr + "</tr>\n</table>\n";
//dump("Trying to insert '" + str + "'\n");
window.editorShell.InsertSource(str);
window._content.focus();
}
// --------------------------- TransactionManager ---------------------------