Commit Graph
36 Commits
Author SHA1 Message Date
ramiro@netscape.com 1ec34f6987 delete vs. delete[] vs. free fixes.
Thanks to "Bruce Mitchener, Jr." <bruce@cybersight.com for finding all these
and making patches.
1999-03-30 05:26:59 +00:00
akkana@netscape.com e853f24f66 Editor: Add Insert Link and Image 1999-03-29 22:01:26 +00:00
jfrancis@netscape.com ace30201c5 seperating out html edit rules from text edit rules 1999-03-29 08:02:05 +00:00
joki@netscape.com ab615d379b Changing api uses in editor, rdf, and xpfe to match DOM2 api name/param changes. 1999-03-28 22:27:38 +00:00
tague@netscape.com 6cab55d03f Added support for basic Japanese input on Win32 1999-03-19 23:36:20 +00:00
buster@netscape.com e7062e4844 small change to match change in semantics in nsIDOMRange::GetCommonParent 1999-03-18 21:55:23 +00:00
buster@netscape.com b943f567aa I fixed the content twiddling part of bug 3778. Mike has a fix for the display part of it in his tree, but determined the risk didn't
justify the benefit.  This is partly true because he and I would have had to integrate tonight before checking in, which we thought
presented some additional risk.  In any event, this bug is fixed for all cases except when the user hits enter at the end of the
document.  That is the only case in text editing when the selection will not render correctly.

Some related problems got fixed as a side benefit of my code changes.  I filed bug 3896.
1999-03-17 06:13:46 +00:00
buster@netscape.com 5237fefb1a added WillUndo, DidUndo, WillRedo, DidRedo and some supporting code so
the text edit rule object can maintain it's own state more efficiently and correctly.
1999-03-15 05:08:30 +00:00
buster@netscape.com 27219045e2 added PlaceholderTxn. This is an aggregate transaction that sits on the undo stack
and merges in subsequent transactions indiscriminately until it's told to stop.
It also gives the last transaction in its child list a chance to merge the
next transaction.
All this is in support of complex transactions that result in text insertion
being able to collapse into a single undoable event.
Also improved tracking of bogus content node used when document is empty.
1999-03-15 00:57:32 +00:00
rods@netscape.com a60de0bda2 Added DragListener for Drag & Drop (it's not turned on) 1999-03-14 04:45:00 +00:00
kostello@netscape.com 88878bacc5 Added HACKForceRedraw() when deleting a range or inserting text 1999-03-14 01:02:53 +00:00
buster@netscape.com ff6cf89df5 added delegate code for InsertText (WillInsertText, DidInsertText)
which calls generic WillInsert, DidInsert to test for magic bogus
content and does the right thing.
You now can't delete magic content with user gestures, and when you
insert anything the magic kludgy &nbsp; is deleted first.
1999-03-13 04:53:21 +00:00
kostello@netscape.com 00a42734c4 Force Redraw on Enter: this is a workaround for bug#3356 & bug#3639 1999-03-12 15:40:29 +00:00
buster@netscape.com 84c5e45ab7 deleting the last editable object in a document now causes a bogus placeholder <P>&nbsp;</P> to be added to the document. This node has the
attribute MOZ_EDITOR_BOGUS_NODE set to TRUE.  this solves the problem of when you do a SelectAll then a DEL, you don't have a cursor
or any way to set selection in the document. You do still have the problem that the nbsp is pretty narrow and the frame containing it is hard to hit
with the mouse.  We really need the "set selection to frame nearest the mouse down point" operation.

the intent is for all inserts to look for this node, and if found delete it before the insert.  likewise, all deletes will be no-ops if this node is found.
1999-03-12 02:28:24 +00:00
sfraser@netscape.com b58cd3d211 Fix for 3630 -- terminate text and HTML strings returned from the editor. 1999-03-11 21:31:03 +00:00
akkana@netscape.com 0fd122e53e Fix Solaris build problems -- thanks to braddr & bruce @ puremagic.com 1999-03-10 22:41:18 +00:00
sfraser@netscape.com d501eb13e2 Add Cut, Copy and Paste to editor interfaces and classes, with a stub implemenatioon in nsEditor. 1999-03-10 21:29:41 +00:00
buster@netscape.com bb938b23cd improvements to InsertBreak, and first crack at adding support for rules delegate 1999-03-10 19:48:46 +00:00
warren@netscape.com 35d5e6e062 nsRepository -> nsIComponentManager changes. 1999-03-09 09:44:27 +00:00
sfraser@netscape.com 1b5925105c Modified OutputText and OutputHTML methods to pass out nsStrings instead of nsIOutputStreams. Also fixed return values, and commented out line termination conversion in Mac outoutput. 1999-03-06 20:32:48 +00:00
mcmullen@netscape.com 682964a8eb Adapt to new Write() 1999-03-06 00:27:37 +00:00
cmanske@netscape.com 1f37937813 Changed editor classes to inherited model. Fixed lots of destructor warnings. 1999-03-05 21:05:35 +00:00
kostello@netscape.com 4aa7535d3b Added Implementations for OutputHTML and OutputTXT 1999-03-04 21:53:42 +00:00
scc@netscape.com 7ed0f71600 fixed for nsCOMPtr: no construction or assignment from raw COM interface pointers 1999-03-02 22:27:46 +00:00
buster@netscape.com 3976084fc3 implemented GetTextProperty -- only works for bold and italic now,
trivial to add more properties
finished first cut at SetTextProperty.  This triggers lots of crashes in
range/selection code where we're holding onto a stale frame pointer (at
least, that's my best guess.)
synched with Charlie's change-o-rama
added an assert in DeleteTextTxn::Init() checking aNumCharsToDelete vs.
0
  NS_ASSERTION(0!=aNumCharsToDelete, "bad arg, numCharsToDelete");
if the number of chars to delete is 0, we shouldn't be creating a
transaction at all.  I had never seen this condition arise before
Charlie's checkin, I don't know if he introduced it or if it was a
latent bug I just never tripped over before.
1999-03-02 07:52:41 +00:00
cmanske@netscape.com 786d067af5 Implemented nsHTMLEditor. Changed prototypes to be use NS_IMETHOD and NS_IMETHODIMP. Started table editing transactions 1999-03-02 05:30:53 +00:00
mcafee@netscape.com bf4ec6ca6a Adding do_QueryInterface() to fix Solaris/nxCOMPtr ambiguity. 1999-02-26 03:50:37 +00:00
buster@netscape.com fd794b7ab2 edge conditions now supported for SetTextProperty. You now get correct behavior when you select the beginning of a text block, or the end.
You now get correct behavior if the selection spans multiple text blocks, as long as the blocks have the same grandparent.
1999-02-25 16:05:43 +00:00
buster@netscape.com ec455b8b0d added InsertElementTxn
added nsEditProperty
beginning of implementation for SetTextProperties.  Currently, it only works if the selection is entirely within a single text node.  Currently only
supports bold and italic (mapped to ctrl-b and ctrl-i for testing purposes.)
changed a bunch of interfaces to make things easier, like CreateElement now returns (as an out-param) the element created.
1999-02-24 17:24:37 +00:00
buster@netscape.com bf9f7fb961 caught up to new ScrollIntoView changes.
most transactions now properly set selection after modifying content, for Do, Undo, Redo.
lots of cleanup and minor bug fixes.
1999-02-22 15:53:31 +00:00
buster@netscape.com 482c184a50 beginning work on ScrollToFrame 1999-02-20 21:29:27 +00:00
mcafee@netscape.com 357e75196c Solaris: adding do_QueryInterface() wrappers to finish scc's nsCOMPtr carpool. a=scc 1999-02-19 11:30:31 +00:00
buster@netscape.com 3c2f652691 work in progress 1999-02-18 23:01:06 +00:00
buster@netscape.com 9d5e86374e fix mac build for new nsCOMPtr code 1999-02-17 20:44:44 +00:00
buster@netscape.com cbe2ff0303 Highlights:
updated to new nsCOMPtr usage
nsTextEditor::InsertBreak() implemented
  splits the text node at the caret (deletes any extended selection to force a collapsed selection.)
  inserts a <BR> which I assume we'll convert to a CR when we write to a text stream.
  undo and redo work, except for the bug noted below

More stuff:
interface cleanup
strategic debugging code added
delete selection txn sets the collapses the selection...this is just a placeholder, but I needed it for undo/redo of InsertBreak.
join and split now work for text nodes as well as interior nodes
1999-02-17 19:42:29 +00:00
buster@netscape.com 29eddc6299 * the viewer test app now instantiates an nsITextEditor via nsRepository for "Editor mode"
* the TxnMgr is invoked by the editor via nsRepository
* editor.h|cpp have been renamed nsEditor.h|cpp for consistency
* editorInterfaces.h|cpp have been renamed nsEditorEventListeners.c|hpp
* added nsITextEditor.h, nsTextEditor.h|cpp.  The text editor is a placeholder for the rules unique to text
editing.  It invokes the nsIEditor to do core editing operations.
* reworked nsIEditor and related interfaces as per emerging design.
* nsEditor::BeginTransaction and EndTransaction call nsTransactionManager::BeginBatch and EndBatch.
1999-02-12 17:18:58 +00:00