Opened 5 years ago

Last modified 5 years ago

#12186 confirmed New Feature

Provide better support for HTML5 'block' elements like article, aside etc.

Reported by: Matti Järvinen Owned by:
Priority: Normal Milestone:
Component: General Version: 4.0
Keywords: Cc:

Description

TinyMCE has HTML5 sections and articles editing with wrapping elements. IMHO worth checking it out.

http://www.tinymce.com/tryit/html5_formats.php

Change History (4)

comment:1 Changed 5 years ago by Jakub Ś

Status: newconfirmed
Summary: HTML5 article, aside supportShow Blocks plugins should supplort all HTML5 'block' elements e.g article, aside
Version: 4.0

CKEditor also has support for these elements.

Please don't forget about ACF and that plugins, inserting such elements, need to report to it. For simplicity you can set allowedcontent:true. Now as you can see, elements are kept in editing area, they are shown by element's path but when you turn on Show Blocks plugin, they aren't marked. IMO this is the only part that needs to be adjusted.

comment:2 Changed 5 years ago by Matti Järvinen

What I was going for was something like current DIV plugin only better. HTML5 is what most of us should/must work with and with that in mind I would like to see is the possibility to add a wrapping element to existing HTML. I'm not saying TinyMCE is doing it the right way I could see that dropdown length in their example explode quite fast.

Let's say I select 2 heading elements that are adjacent to each other and want to wrap them in hgroup. Currently there is no possibility to do so (okay I could go and make a widget for it but hgroup could contain almost anything would it still make any sense usability wise to do so, I doubt it).

comment:3 in reply to:  1 Changed 5 years ago by Piotrek Koszuliński

Replying to j.swiderski:

CKEditor also has support for these elements.

Please don't forget about ACF and that plugins, inserting such elements, need to report to it. For simplicity you can set allowedcontent:true. Now as you can see, elements are kept in editing area, they are shown by element's path but when you turn on Show Blocks plugin, they aren't marked. IMO this is the only part that needs to be adjusted.

CKEditor has support in its parser and many editing algorithms, but does not have such feature. I don't agree with the description change you made. Show blocks is not the only thing we need to change - we also need wrapping styles that could be defined in format/styles dropdowns or perhaps some special buttons. Though, creating semantic blocks is one thing, but how to edit them afterwards? Remove, nest, change their classes, ids? How much functionality do we need to make them usable? So much as the div plugin has? I wouldn't want that, but simple way to wrap some contents with a semantic block is definitely not enough.

So this is a very general issue and a pretty tough one.

comment:4 Changed 5 years ago by Jakub Ś

Summary: Show Blocks plugins should supplort all HTML5 'block' elements e.g article, asideProvide better support for HTML5 'block' elements like article, aside etc.
Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy