17 Commits

Author SHA1 Message Date
sfraser%netscape.com
64b0f22ee5 Change the transactions to have non-owning pointers to the editor.
git-svn-id: svn://10.0.0.236/trunk@33043 18797224-902f-48f8-a5cc-f745e15eee43
1999-05-28 00:16:55 +00:00
kin%netscape.com
ee983116d2 Changed all occurrences of GetUndoString() and GetRedoString() to accept nsString *.
git-svn-id: svn://10.0.0.236/trunk@32955 18797224-902f-48f8-a5cc-f745e15eee43
1999-05-27 20:50:52 +00:00
buster%netscape.com
9a004fa0f0 1. block transformation infrastructure is now in place. We can go ahead and implement interesting
features like set paragraph style, set list type, indent, etc.  I'm sure there's holes in my
implementation that these high level features will make obvious.

2. I've factored a lot of utility methods from several modules into nsEditor as public static methods.
This makes them easily accessable to all, and will help Joe and I remove redundant methods.

3. I changed the HTML tags to lower case, and made all string compares case-insensitive.  No, this
isn't quite the right thing to do, but we don't have atoms from layout yet.  The Right Thing is for us
to reuse those atoms.


git-svn-id: svn://10.0.0.236/trunk@30367 18797224-902f-48f8-a5cc-f745e15eee43
1999-05-05 04:05:19 +00:00
jfrancis%netscape.com
cd95192e53 fixing problem with undo of join txn
git-svn-id: svn://10.0.0.236/trunk@30096 18797224-902f-48f8-a5cc-f745e15eee43
1999-05-04 08:03:51 +00:00
buster%netscape.com
cbaf88c3e7 more factoring
git-svn-id: svn://10.0.0.236/trunk@28331 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-20 22:02:02 +00:00
buster%netscape.com
5649bb420a fix warning
git-svn-id: svn://10.0.0.236/trunk@28245 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-20 17:41:00 +00:00
buster%netscape.com
64e11a9d2f vastly improved RemoveTextProperty
turned off debug output


git-svn-id: svn://10.0.0.236/trunk@27115 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-11 22:55:40 +00:00
buster%netscape.com
e124ff90ed RemoveTextPropery works in all cases now.
git-svn-id: svn://10.0.0.236/trunk@26481 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-06 18:21:43 +00:00
buster%netscape.com
a29a790970 fixed bug 4517
WIP on remove text attributes


git-svn-id: svn://10.0.0.236/trunk@26317 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-05 20:52:29 +00:00
buster%netscape.com
0fe8e1324d As a reminder, we decided to do this based strictly content. Some support for style-based text properties is written, but not used
anywhere any more.

* Cleaned up split and join undo/redo.
* Added TypeInState, a data struct that remembers things about text properties for collapsed selections, so you can type
* Ctrl-B with an insertion point and the next character will be bold.
* Added all the logic to handle inline vs. block elements when setting text properties.
* Added some support for italic and underline as well.  Adding these things is pretty easy now.  Ctrl-B, Ctrl-I, Ctrl-U for testing bold, italic, underline.
* Added all the logic to make sure we only add style tags where they're needed, so you should never get the same style tag nested within itself, except as needed for block elements.
* Added methods for testing a node to see if a particular style is set.  This isn't 100% done yet, but with very little work we could have toolbar buttons that respond to selection changed notification that show the state of bold, italic, underline, etc. in real time.  Supports tri-state:  whole selection is bold, some of selection is bold, none of selection is bold, ...
* Fully undoable and redoable.
* Added some debug printfs to transactions and editors.  all controlled by a gNoisy static in each module.  helps me track down undo/redo problems.  if the output bugs people enough, I'll shut it off and re-enable it in my local tree.

Noticably missing:  make un-bold, make un-italic, etc.  This is coming soon.


git-svn-id: svn://10.0.0.236/trunk@25869 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-01 17:58:07 +00:00
buster%netscape.com
3ee55b4626 split and join now properly remember which content gets deleted, and which content remains in the tree
split and join now properly set selection to the remaining node, at the proper offset.
fixes bugs 3910 3881, with approval from chofmann


git-svn-id: svn://10.0.0.236/trunk@24272 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-17 20:56:10 +00:00
buster%netscape.com
8851e742d6 fixed join.
made a special case for typing with BR as the selection (as after an InsertBreak.)
made DEL and BACKSPACE at the beginning and end of a text node
fixes bugs 3742 and 3756 (with permission from choff and gkostello)


git-svn-id: svn://10.0.0.236/trunk@24209 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-16 16:38:09 +00:00
cmanske%netscape.com
202c5b89dc Implemented nsHTMLEditor. Changed prototypes to be use NS_IMETHOD and NS_IMETHODIMP. Started table editing transactions
git-svn-id: svn://10.0.0.236/trunk@22534 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-02 05:30:53 +00:00
mcafee%netscape.com
92753a46b3 Solaris: adding do_QueryInterface() wrappers to finish scc's nsCOMPtr carpool. a=scc
git-svn-id: svn://10.0.0.236/trunk@21297 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-19 11:30:31 +00:00
buster%netscape.com
f62022c72f 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


git-svn-id: svn://10.0.0.236/trunk@21009 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-17 19:42:29 +00:00
buster%netscape.com
ea9a76f945 changed nsIEditor to enable undo separately from Init
work in progress API changes to nsIEditor and nsEditor


git-svn-id: svn://10.0.0.236/trunk@18914 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-28 06:02:53 +00:00
buster%netscape.com
b48e2caf7c * added TransactionFactory. Editor no longer allocates its own transactions. This gives us an oppurtunity for a recycler.
* added DeleteSelection to editor.  Doesn't work very well yet because selection is giving me random offsets into text content.
* lots of work in the various transactions.


git-svn-id: svn://10.0.0.236/trunk@18122 18797224-902f-48f8-a5cc-f745e15eee43
1999-01-21 01:51:09 +00:00