Bug #278312 --> editor changes to support inline spell checking. Includes the interface for the inline spell checker

and editor hooks to call out to an inline spell checker component.


moa/r=glazman
sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@168662 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
scott%scott-macgregor.org
2005-02-01 21:12:53 +00:00
parent 8632f162de
commit 9880b9b613
22 changed files with 525 additions and 53 deletions

View File

@@ -280,7 +280,22 @@ nsHTMLEditor::InsertHTMLWithContext(const nsAString & aInputString,
// create a dom document fragment that represents the structure to paste
nsCOMPtr<nsIDOMNode> fragmentAsNode;
PRInt32 rangeStartHint, rangeEndHint;
res = CreateDOMFragmentFromPaste(aInputString, aContextStr, aInfoStr,
nsAutoString contextStr;
contextStr.Assign(aContextStr);
#ifdef MOZ_THUNDERBIRD
// See Bug #228920 --> editor / parser has trouble inserting single cell data from Excel.
// The details are in the bug. Until we figure out why the parser is not building the right
// document structure for the single cell paste case, we can explicitly check for just such
// a condition and work around it. By setting the contextStr to an empty string we end up
// pasting just the cell text which is what we want anyway.
// A paste from an excel cell always starts with a new line, two spaces and then the td tag
if (StringBeginsWith(aInputString, NS_LITERAL_STRING("\n <td")))
contextStr = NS_LITERAL_STRING("");
#endif
res = CreateDOMFragmentFromPaste(aInputString, contextStr, aInfoStr,
address_of(fragmentAsNode),
&rangeStartHint, &rangeEndHint);
NS_ENSURE_SUCCESS(res, res);