【发布时间】:2016-10-17 15:00:13
【问题描述】:
我正在使用带有fluid styled content 的TYPO3 7.6,并且我允许我的编辑器将iframe 插入富文本编辑器(RTE 或htmlarea)。因为Snippet,所以显示了iframe。没关系。
现在我想用typoscript 包装这个iframe,因为iframe 必须是响应式的,所以我需要……像这样,作为包装器:
<div class="embed-container">
<iframe width="560" height="315" src="https://www.youtube.com/embed/7DRU" frameborder="0" allowfullscreen></iframe>
</div>
CSS
.embed-container {
position: relative;
padding-bottom: 56.25%; /* ratio 16x9 */
height: 0;
overflow: hidden;
width: 100%;
height: auto;
}
.embed-container iframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
如何用一些 HTML 代码包装来自 TYPO3-RTE 的 iframe?
我试过了。像这样......但它不起作用。
### wrap iframe at RTE
lib.parseFunc_RTE {
externalBlocks := addToList(iframe)
externalBlocks {
iframe.stripNL = 1
iframe.callRecursive = 1
iframe.callRecursive.tagStdWrap.HTMLparser = 1
iframe.callRecursive.tagStdWrap.HTMLparser.tags.iframe {
fixAttrib.class.default = classOfiframe
wrap = <div>|</div>
}
}
}
或
lib.parseFunc_RTE.tags.iframe = TEXT
lib.parseFunc_RTE.tags.iframe {
wrap = <div class="test">|</div>
}
【问题讨论】:
标签: iframe typo3 typoscript rte