[英]TYPO3 Neos: Create own inspector/editor
I try to create an own editor for the page panel on the right side. 我尝试为右侧的页面面板创建一个自己的编辑器。 For this I use at beginning the HTML-Editor.
为此,我在开始时使用HTML编辑器。 This will work so far.
到目前为止,这将起作用。 After this I tried to adapt it for my package but I'll get always the error from
requirejs
: 在此之后,我尝试将其调整为我的软件包,但始终会从
requirejs
得到错误消息:
Error: Script error for: My.Package/Inspector/Editors/MyEditor
http://requirejs.org/docs/errors.html#scripterror
For two days I tried to find out where the error starts, but fail. 有两天时间,我试图找出错误的出处,但失败了。 Is this warning in the documentation the reason?
文档中的此警告是原因吗?
Adding editors and validators is no fixed API yet, keep an eye on the changelogs if you use this.
添加编辑器和验证器还不是固定的API,如果您使用它,请留意变更日志。
To reproduce the error do the following: 要重现该错误,请执行以下操作:
Settings.yaml: Settings.yaml:
TYPO3:
Neos:
userInterface:
# Register editor
requireJsPathMapping:
'My.Package/Inspector/Editors': 'resource://My.Package/Public/JavaScript/Inspector/Editors/'
NodeTypes.yaml: NodeTypes.yaml:
'TYPO3.Neos.NodeTypes:Page':
properties:
settings:
type: string
# defaultValue: '<p>Enter HTML here</p>'
ui:
label: 'Settings'
# reloadIfChanged: TRUE
inspector:
group: 'layout'
editor: 'My.Package/Inspector/Editors/MyEditor'
The expected behaviour should be to display the property "Settings" after "Layout for subpages of this page" followed by a button like at the HTML content element. 预期的行为应该是在“此页面的子页面的布局”之后显示属性“设置”,然后在HTML内容元素上显示一个按钮。
这个问题的答案是,您的示例按照声明的方式工作,但是您有一个广告拦截器阻止了对自定义编辑器脚本的请求。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.