Closed
Bug 546631
Opened 15 years ago
Closed 13 years ago
execCommand formatBlock does not insert <DIV> elements
Categories
(Core :: DOM: Editor, defect)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: hdn, Unassigned)
References
Details
Attachments
(1 file)
|
1001 bytes,
text/html
|
Details |
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2)
Build Identifier: 3.7a2pre
Calls to document.execCommand('formatBlock', false, '<div>') returns true but nothing happens. No <div> element is inserted.
Reproducible: Always
To reproduce:
Open the attached file select some text and click the "Test <P> element" link. Everything works as expected. Refresh the page, select some text and click the "Test <DIV> element" link. Nothing happens.
Quote: "Virtually all block style tags can be used"
https://developer.mozilla.org/en/Rich-Text_Editing_in_Mozilla#
Allthough it does not explicitly say that <DIV> elements are supported, I believe they qualify as reasonable block element to support. Otherwise the execCommand method should return false and not true.
Updated•15 years ago
|
Component: DOM: Core & HTML → Editor
QA Contact: general → editor
Comment 3•13 years ago
|
||
In Firefox 11.0, I get the following output:
"""
Select this text and wrap in in a block element using the links below...
execCommand return value: true
HTML after:
<div>
Select this text and wrap in in a block element using the links below...
</div>
"""
So it seems like this has been fixed. Please reopen if you can still reproduce.
Status: UNCONFIRMED → RESOLVED
Closed: 13 years ago
Flags: in-testsuite?
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•