From 76f1156090271e36c31b51e46d7b020bc7a6916d Mon Sep 17 00:00:00 2001 From: "glazman%netscape.com" Date: Tue, 5 Feb 2002 15:16:14 +0000 Subject: [PATCH] Adding noCSS flag to nsHTMLEditor; b=bugscape11956, r=brade, sr=kin --- editor/idl/nsIPlaintextEditor.idl | 4 +++- editor/libeditor/html/nsHTMLEditor.cpp | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/editor/idl/nsIPlaintextEditor.idl b/editor/idl/nsIPlaintextEditor.idl index 94bc3e6136f..c9a8fa2c75c 100644 --- a/editor/idl/nsIPlaintextEditor.idl +++ b/editor/idl/nsIPlaintextEditor.idl @@ -60,6 +60,7 @@ interface nsIPlaintextEditor : nsISupports const short eEditorDisableForcedReflowsBit = 8; /* prevent immediate reflows */ const short eEditorEnableWrapHackBit = 9; /* allow the editor to set font: monospace on the root node */ const short eEditorWidgetBit = 10; /* bit for widgets */ + const short eEditorNoCSSBit = 11; /* this HTML editor should not create css styles */ const long eEditorPlaintextMask = 1; const long eEditorSingleLineMask = 2; @@ -72,7 +73,8 @@ interface nsIPlaintextEditor : nsISupports const long eEditorDisableForcedReflowsMask = 256; const long eEditorEnableWrapHackMask = 512; const long eEditorWidgetMask = 1024; - + const long eEditorNoCSSMask = 2048; + /** * The length of the contents in characters. */ diff --git a/editor/libeditor/html/nsHTMLEditor.cpp b/editor/libeditor/html/nsHTMLEditor.cpp index 99294508016..811f2f34684 100644 --- a/editor/libeditor/html/nsHTMLEditor.cpp +++ b/editor/libeditor/html/nsHTMLEditor.cpp @@ -445,6 +445,8 @@ NS_IMETHODIMP nsHTMLEditor::SetFlags(PRUint32 aFlags) { if (!mRules) { return NS_ERROR_NULL_POINTER; } + mCSSAware = !PRBool(aFlags | nsIPlaintextEditor::eEditorNoCSSMask); + return mRules->SetFlags(aFlags); }