Edit content tagged schema.org with Chrome or Safari
adou600 opened this issue · 2 comments
As illustrated on https://gist.github.com/4326769, it is currently not possible to edit content with Safari or Chrome, if this content is for example of type http://schema.org.
There is a JS error in vie-min.js preventing to display the edit button:
Uncaught Error: No prefix found for CURIE 'sc:WebPage'!
VIE comes with a set of pre-registered namespaces: https://github.com/bergie/VIE/blob/master/src/VIE.js#L90
For any other ones, you either have to declare them via xmlns
in your DOM, or programmatically using:
vie.namespaces.add("myprefix","http://example.net/ns#");
What I don't get is that the namespace is defined in the DOM via xmlns:
<div xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:sc="http://schema.org/"
xmlns:cw="http://schema.org/CreativeWork/"
xmlns:ar="http://schema.org/Article/"
typeof="sc:WebPage"
about="/cms/simple/get-started">
...
</div>
Isn't that weird that the exact same page works with Firefox and not with Safari and Chrome?
I tried to handle the problem with other solutions like to have a full NS in the typeof attribute, but I could'nt find a case that worked...