Closed Bug 208467 Opened 21 years ago Closed 21 years ago

queryCommandValue for "inserthtml" should return serialized html of selection

Categories

(Core :: DOM: Editor, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: Brade, Assigned: Brade)

Details

(Whiteboard: midas)

Attachments

(1 file, 2 obsolete files)

queryCommandValue for "inserthtml" commandshould return the serialized html of the current selection (if there is one, "" if not)
Status: NEW → ASSIGNED
Whiteboard: midas
Attached patch dom side changes to get selection's html string (obsolete) (deleted) — Splinter Review
Attachment #125091 - Flags: superreview?(sfraser)
Attachment #125091 - Flags: review+
Attachment #125092 - Flags: superreview?(sfraser)
Attachment #125092 - Flags: review+
I don't agree with this. Why would a command called "insertHTML" have a 'state' which is the selected HTML? We have another command, "cmd_getContents", to get the doc, or the selection as text or HTML.
This patch is an alternate to both previous patches. It makes the code a little uglier due to queryCommandValue vs ExecCommand. The thinking for earlier patches is that users of "insertHTML" might want to grab the selection that would be replaced before they call ExecCommand("insertHTML").
Attachment #125227 - Flags: superreview?(sfraser)
Comment on attachment 125091 [details] [diff] [review] extend insertHTML command to return selection's raw html minussing, since cmd_getContents already does this
Attachment #125091 - Flags: superreview?(sfraser) → superreview-
Attachment #125092 - Flags: superreview?(sfraser) → superreview-
Attachment #125227 - Flags: superreview?(sfraser) → superreview+
Attachment #125091 - Attachment is obsolete: true
Attachment #125092 - Attachment is obsolete: true
Attachment #125227 - Flags: review+
fix checked into trunk (revision 3.489)
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: