W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2014

[editing] The spec about execCommand('indent') in inline block.

From: Yoichi Osato <yoichio@google.com>
Date: Wed, 16 Apr 2014 14:07:25 +0900
Message-ID: <CAAEV3pm+BUEpvpqO8kVNtEJ+fgwa1MC5bvdqpqvV39-cxm_Hzg@mail.gmail.com>
To: public-webapps@w3.org
Cc: Ryosuke Niwa <rniwa@apple.com>
Image following HTML ('|' is the caret selection):
<span contenteditable="true" id="span">|text</span>
<script>
document.execCommand('indent', false, null);
</script>

Following current HTML editing, document.execCommand('indent') inserts a
blockquate element inside a span element.
*https://dvcs.w3.org/hg/editing/raw-file/tip/editing.html#indent
<https://dvcs.w3.org/hg/editing/raw-file/tip/editing.html#indent>*
Both Chrome and IE insert a blockquate element inside a span element.
You can try it on:
http://jsfiddle.net/xtk5h/2/

However, the blockquate element is a flow content and HTML standard doesn't
allow flow contents to be contents of a span element:
http://www.whatwg.org/specs/web-apps/current-work/#the-span-element

Which is better we allow indentation in inline element or not?
Received on Wednesday, 16 April 2014 13:03:03 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:14:24 UTC