Closed bitpshr closed 12 years ago
As of commit 3ae14ef996dce8206993 :
TODO:
We now have ops being queued, and we are operating on a string copy of the current textarea's value attr, then blasting this copy into the DOM only once for each cycle of iterate( ). Cursor position is holding strong even in some pretty extreme cases.
The problem: In toying around with switching from a textarea to a contentEditable div, cursor position getting/setting is horrendous. Even solutions that (somewhat) work are blown out the water as soon as html tags are entered into the mix.
Proposed solution: use dijit.editor instead of textarea.
Anything we do with a contentEditable div is a hack, and even that's an extreme understatement.
Let's bite the bullet and use dijit.editor? Why reinvent the wheel? Coweb is about making things collaborative, not building rich text editors. Plus, we ARE a part of the Dojo Foundation, right? :) I will begin experimenting with this now.
Dijit.editor is definitely the way to go; we have all rich text functionality syncing beautifully: bold, italic, underline, center justify, left justify, right justify, strikethrough, etc.
Unfortunately, we hit the same problem: caret position is a pain. Why are there no native dijit.Editor functions to programmatically get / set caret position?
Toying with dijit.range currently.
Two comments:
This should be a second widget, RichTextEditor, not replace the simple one which is useful in its own right.
When I last looked at dijit.Editor and others, none of thm offered the caret tracking and control needed for a collab editor.
You're definitely correct, no caret tracking or control on the dijit.Editor, or with a content editable div. I've got to research this one a little more if we can't pull in any other open source library.
As Pete suggested and Dan confirmed, I began independently developing the RichTextEditor widget.
Due to caret position woes with contentEditable divs and time constraints, the decision was to wrap the current Editor widget with basic rich text functionality, and apply styling to the whole textarea, since we can't selectively style this type of html tag.
As of 0bf2e87ab3c70fc7b1ff :
Will add any further functionality we desire
Not sure I understand the last commit. It's syncing style over the whole area? Or span of text within it?
@parente :
For time's sake and for sanity's sake we decided to demonstrate rich text functionality over the textarea as a whole, so we don't have to dig into contentEditable div's or the like, since caret tracking is a shoddy hack.
The last commit should include a new widget, RichTextEditor, that extends the Editor widget, wrapping it with a dijit.Toolbar, and the basic functions above. When a user uses any of these functions it's respective style is applied to the textarea as a whole, collaboratively.
Was the final decision to keep the RichTextEditor even though it risks looking incomplete? If so, as discussed, I feel we should change the name.
I still say if we do the RTE, we should do it right, built on top of a canvas element or something similar. It will be an in depth project, but a strong application with actual user appeal. I'm in the process of implementing visible remote carets, aka who wrote what, who's editing where, etc. on the plain Editor, and this may make that widget powerful enough for most users for collab text editing and render the current RichTextEditor widget pretty useless.
* DESIGN REDIRECTION * Issue #56 allowed us to capture two very basic cooperative web enabled text editors based on the HTML Textbox element. As noted in this issue and in issue #56 the textbook element has several limitations. Given that we have captured and demonstrated the basic editor functionality, we will now use this issue to explore the creation of a proper Cooperative Web enabled Rich Text Editor based on an HTML
The resulting widget from this effort will represent a 3rd entry in our cowebx widgets pertinent to Cooperative Editors:
All three editors will provide support for persistence via emailing snapshots of the editor content. As such, analogous to how Issue #91 updated the Basic and Enhanced textbook Editors, the widget produced for this issue (#95) should have an export/share button.
Update to RTE progress:
Once we get the caret movement up-to-snuff, RTE functions are next...
As of 36146089697102781faf :
TODO:
As of d89c35b89b9f11fbf2f5 :
All cross browser. Cleaning things up now, making things look clean. Optimizing.
As of 6b7a233dd8573ff614be :
TODO:
As of 005c63f6506cb37cc80f :
TODO:
As of 4020c0925c1af948ac01 :
As of 388f05776bff2013ead6 :
TODO:
Implemented pseudo-session control. Parses relative url of app, if not unique, makes unique and hides splash screen:
Application facelift, progress:
As of d89d855a9cffb618e27b :
Application progress:
Just to note the main TODOs:
As of 1db60e28fb99287b43a3 :
In this commit
Remaining bugs:
Remaining features:
As of bbcfa06fa6f1c5bf8dbb :
In this commit
Remaining features:
Remaining bugs:
As of 6dbe1eaf5ae38150d085de0eaa5a2f39b044ede7 , the RTE widget first pass is complete, with the following features / improvements / bugs still remaining for the future:
Any new errors experienced when using the Editor should be filed as a new issue.
This issue should serve as a running discussion on how to implement basic rich text functions for the coweb editor widget.
I've begun the basic implementation, and my thinking is as follows:
I'll keep updating this with progress I make. Feel free to post any ideas, corrections, etc.