Closed
Bug 136774
Opened 24 years ago
Closed 23 years ago
Can't create plaintext editor through embedding API
Categories
(Core :: DOM: Editor, defect)
Core
DOM: Editor
Tracking
()
VERIFIED
FIXED
mozilla1.0.1
People
(Reporter: mcguirk, Assigned: mjudge)
References
Details
Attachments
(2 files, 2 obsolete files)
|
11.74 KB,
patch
|
jag+mozilla
:
superreview+
|
Details | Diff | Splinter Review |
|
11.78 KB,
patch
|
cmanske
:
review+
mjudge
:
superreview+
|
Details | Diff | Splinter Review |
I'd like to create a plaintext editor using the embedding APIs, but this doesn't
appear to be possible. (nsEditingSession::SetupEditorOnWindow has the HTML
editor contract ID hardcoded.)
I can create the HTML editor and then set the eEditorPlaintextMask flag using
nsIEditor::SetFlags, but that's not the same thing.
Comment 1•24 years ago
|
||
Confirming.
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows 2000 → All
Hardware: PC → All
moving to 1.01
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.0.1
Comment 6•23 years ago
|
||
changing component so this shows up in Syd's editor embedding queries
Component: Embedding: APIs → Editor: Core
Comment 8•23 years ago
|
||
Comment on attachment 102232 [details] [diff] [review]
patch to flow through editortype to the actual editor flags as well as the classid
if the string passed in is null, do we want to create html by default and
return an error?
Interestingly, in editorShell, a plaintext editor is never really created; it
always creates an html editor
The comment in the idl file should be changed to match up with the editor types
we accept (htmlmail, textmail, html, text for now)
We need to handle the case of "textmail" which is an htmleditor but has the
mailmask flag (see editorshell).
I don't see any need to add "aEditorType" to setupEditorOnWindow; it isn't used
there.
Attachment #102232 -
Flags: needs-work+
| Assignee | ||
Comment 10•23 years ago
|
||
fixes kathy's issues. adds smarts for textmail. Also leaves door open for
further additions of different types of editors. Right now I still keep the
mEditorType string in there even though they all use the same. This is because
we may need to change this soon for embedders.
Attachment #102232 -
Attachment is obsolete: true
Attachment #102240 -
Attachment is obsolete: true
Comment 11•23 years ago
|
||
Comment on attachment 102282 [details] [diff] [review]
patch from editor/composer
>Index: src/nsEditingSession.cpp
>===================================================================
>-nsEditingSession::MakeWindowEditable(nsIDOMWindow *aWindow, PRBool inDoAfterUriLoad)
>+nsEditingSession::MakeWindowEditable(nsIDOMWindow *aWindow, const char *aEditorType, PRBool inDoAfterUriLoad)
> {
>+ PRBool htmlController = PR_FALSE;
>+ mEditorType = nsnull;
>+ mEditorFlags = 0;
>+ mEditorType = "@mozilla.org/editor/htmleditor;1";
Maybe add a comment here that this is transitional.
>+ const char *editortype = nsnull;
Unused code?
sr=jag with these nits addressed.
Attachment #102282 -
Flags: superreview+
| Assignee | ||
Comment 12•23 years ago
|
||
fixes stuff from jags comments. remove dead code and added a comment
Attachment #102282 -
Attachment is obsolete: true
| Assignee | ||
Comment 13•23 years ago
|
||
Comment on attachment 102284 [details] [diff] [review]
patch from editor/composer
carrying over SR
Attachment #102284 -
Flags: superreview+
Comment 14•23 years ago
|
||
Comment on attachment 102282 [details] [diff] [review]
patch from editor/composer
why not use
: mDoneSetup(PR_FALSE)
, mEditorType(nsnull
in the constructor?
I wonder if you should call mEditorType something else since it's not the same
as the passed in aEditorType ?
mEditorComponent ?
Attachment #102282 -
Attachment is obsolete: false
Attachment #102282 -
Flags: needs-work+
| Assignee | ||
Comment 15•23 years ago
|
||
ok no prob I will make changes before commiting.
Comment 16•23 years ago
|
||
Comment on attachment 102284 [details] [diff] [review]
patch from editor/composer
r=cmanske, but please
consider the comments I mentioned in previous patch.
Note that I actually tested this for Composer in an experimental build that has
no editorShell.
But my Mail tree is hosed so I couldn't test that part.
Attachment #102284 -
Flags: review+
Updated•23 years ago
|
QA Contact: mdunn → depstein
Comment 17•23 years ago
|
||
resolving this as fixed since Mike says he checked it in
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Comment 18•23 years ago
|
||
Patch verified against Mozilla 1.2b Mozilla/5.0 (Windows; U; WinNT4.0; en-US;
rv:1.2b) Gecko/20021026 build. mEditorType is now mEditorClassString and (const
char *editortype = null) line was removed.
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•