-
Notifications
You must be signed in to change notification settings - Fork 206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EZP-23831: As a UI dev, I need format of RichText field over REST to be semantically enhanced xhtml5 #1435
Conversation
Review ping @dpobel @andrerom @bdunogier @lolautruche POV on schema appreciated, do we need it here in the first place? |
<xsl:template match="docbook:ezembed"> | ||
<xsl:element name="div" namespace="{$outputNamespace}"> | ||
<xsl:attribute name="data-ezelement"> | ||
<xsl:value-of select="'ezembed'"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick: can be simplified to
<xsl:attribute name="data-ezelement">ezembed</xsl:attribute>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Simplified in 0f2c9f6
Looks good AFAICT |
<ezlink href="ezlocation://202" class="linkClass2"/> | ||
</ezembed> | ||
<div data-ezelement="ezembed" href="ezcontent://106" id="embed-id-1" data-ezview="embed" class="embed-class" data-ezalign="left"> | ||
<a data-ezelement="ezlink" href="ezurl://95#fragment1" target="_blank" id="link-id-1" title="Link title" class="link-class"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's a weird markup, to improve it a bit, I would rather use a link
tag here. According to http://www.w3.org/html/wg/drafts/html/master/semantics.html#the-link-element, it should have an itemprop
attribute, I suggest to set its value to url
and that also means the div
has to have an itemscope
attribute as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't that element supposed to occur only in metadata content (head)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see: http://www.w3.org/html/wg/drafts/html/master/dom.html#phrasing-content-2
When it has itemprop
it can be used as phrasing-content.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it, updated in 4eba931.
Looks, good so far, I'm a bit concerned by usage of same tag for different things, but I'm also aware we should stay as close to the format supported by editor as possible to avoid tons of issues over the next couple of years (see ezoe). |
Removed schema for |
All remarks taken care of BTW :)
|
+1 fwiw, simplification sounds good. |
+1, side: should we consider renaming this format to |
@andrerom I was thinking something in the |
ok, lets leave the name discussion for later, get your point :) |
1da8dd2
to
8c8889c
Compare
EZP-23831: As a UI dev, I need format of RichText field over REST to be semantically enhanced xhtml5
This PR resolves https://jira.ez.no/browse/EZP-23831
This replaces usage of custom elements in
xhtml5edit
format with standard XHTML5 elements.Replaced elements are only those relating to embeds:
Template elements are also affected but skipped here as they are not in the current scope from the UI side and there seems to be some questions to answer there first.
Using same elements in different context is done through
data-ezelement
attribute. A format like that can't be properly described using XSD, which will become a problem when template elements are handled in the same way. This could be described using RelaxNG and/or Schematron.