简体   繁体   English

Typo3-在RTE中启用微数据属性itemprop,itemscope和itemtype

[英]Typo3 - Enable microdata attributes itemprop, itemscope and itemtype in RTE

To enable microdata in RTE i think i have to add the attributes for each tag in RTE config in the root pages TSconfig. 为了在RTE中启用微数据 ,我想我必须在根页面TSconfig中为RTE config中的每个标签添加属性。

There are many examples, how to add a attribute for a tag, eg xml:lang: 有许多示例,说明如何为标签添加属性,例如xml:lang:

RTE.default.proc {
  entryHTMLparser_db = 1
  entryHTMLparser_db.allowTags < RTE.default.proc.allowTags
  entryHTMLparser_db.tags.div.allowedAttribs = xml:lang
} 

This works very fine. 这很好。

But when i try to adopt this for itemprop, itemscope and itemtype: 但是当我尝试对itemprop,itemscope和itemtype采用此方法时:

RTE.default.proc {
  entryHTMLparser_db = 1
  entryHTMLparser_db.allowTags < RTE.default.proc.allowTags
  entryHTMLparser_db.tags.div.allowedAttribs = itemprop, itemscope, itemtype
} 

it's not working. 它不起作用。 Does somebody know how to add microdata attributes in RTE? 有人知道如何在RTE中添加微数据属性吗?

@pgampe Did you mean the TYPO3 4.7 Specifications? @pgampe您是说TYPO3 4.7规范吗? http://wiki.typo3.org/TYPO3_4.7#HTML5_frontend_rendering http://wiki.typo3.org/TYPO3_4.7#HTML5_frontend_rendering

The site, where i want to enable microdata attributes, is a Typo3 4.5 LTS. 我要启用微数据属性的站点是Typo3 4.5 LTS。 So i think there is no possibility to use microdata in Typo3 < 4.7 ? 所以我认为在Typo3 <4.7中不可能使用微数据吗?

Did you enter this into the tsconfig ? 您是否将此输入到tsconfig It seems to work fine for me. 对我来说似乎很好。 You will need to specify the attributes itemscope="itemscope" on the div tag. 您将需要在div标签上指定属性itemscope="itemscope"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM