From 19c96db73d6c5b5eb5d3914781f1d8432fef6a36 Mon Sep 17 00:00:00 2001 From: "akkana%netscape.com" Date: Wed, 3 May 2000 23:38:36 +0000 Subject: [PATCH] Restoring one of Joe's fixes, apparently lost in a CVS merge in the last checkin --- editor/base/nsHTMLEditor.cpp | 8 +++++++- editor/libeditor/html/nsHTMLEditor.cpp | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/editor/base/nsHTMLEditor.cpp b/editor/base/nsHTMLEditor.cpp index 54c4df2f8b1d..3b4d0c819be8 100644 --- a/editor/base/nsHTMLEditor.cpp +++ b/editor/base/nsHTMLEditor.cpp @@ -4687,7 +4687,13 @@ nsHTMLEditor::InsertAsPlaintextQuotation(const nsString& aQuotedText, // Do this after the insertion, so that nsCOMPtr preElement (do_QueryInterface(preNode)); if (preElement) - preElement->SetAttribute(NS_ConvertASCIItoUCS2("_moz_quote"), NS_ConvertASCIItoUCS2("true")); + { + preElement->SetAttribute(NS_ConvertASCIItoUCS2("_moz_quote"), + NS_ConvertASCIItoUCS2("true")); + // set style to not have unwanted vertical margins + preElement->SetAttribute(NS_ConvertASCIItoUCS2("style"), + NS_ConvertASCIItoUCS2("margin: 0 0 0 0px;")); + } // and set the selection inside it: selection->Collapse(preNode, 0); diff --git a/editor/libeditor/html/nsHTMLEditor.cpp b/editor/libeditor/html/nsHTMLEditor.cpp index 54c4df2f8b1d..3b4d0c819be8 100644 --- a/editor/libeditor/html/nsHTMLEditor.cpp +++ b/editor/libeditor/html/nsHTMLEditor.cpp @@ -4687,7 +4687,13 @@ nsHTMLEditor::InsertAsPlaintextQuotation(const nsString& aQuotedText, // Do this after the insertion, so that nsCOMPtr preElement (do_QueryInterface(preNode)); if (preElement) - preElement->SetAttribute(NS_ConvertASCIItoUCS2("_moz_quote"), NS_ConvertASCIItoUCS2("true")); + { + preElement->SetAttribute(NS_ConvertASCIItoUCS2("_moz_quote"), + NS_ConvertASCIItoUCS2("true")); + // set style to not have unwanted vertical margins + preElement->SetAttribute(NS_ConvertASCIItoUCS2("style"), + NS_ConvertASCIItoUCS2("margin: 0 0 0 0px;")); + } // and set the selection inside it: selection->Collapse(preNode, 0);