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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user