[opencms-dev] Problem understanding API of FCKEditor config in OpenCMS 7
Kunicke, Holger
holger.kunicke at av-studio.de
Mon Apr 2 15:28:13 CEST 2012
Hello,
my primary target is to activate the "Link" function in fckeditor for an
xmlcontent type. I don't mean the link button which is actived when I add
",link" to the configuration attribute in the xsd schema. I mean the extra link
button which is available in the xmlpage editor (button with a litte world image
in the background). I'm using OpenCMS 7.0.5 .
My current working fall back plan is, to force replacing the string "oc-link"
with "oc-link","Link" in the jsp script
"/system/workplace/editors/fckeditor/configwidget.js":
// old code:
FCKConfig.ToolbarSets["OpenCmsWidget"] = [
<%= toolbar %>
];
// new code:
FCKConfig.ToolbarSets["OpenCmsWidget"] = [
<%= toolbar.toString().replaceFirst("\"oc-link\"","\"oc-link\",\"Link\"") %>
];
But I don't want to live permanently with this unprofessional solution. I have a
problem to understand this line in the script above:
if (CmsFCKEditorWidget.buildOpenCmsButtonRow(toolbar, configuration)) {
The variable toolbar is of type StringBuffer. But in the API documentation and
also in the source code the method name buildOpenCmsButtonRow is only
implemented in two variants:
A_CmsHtmlWidget.html.buildOpenCmsButtonRow(org.opencms.widgets.I_CmsWidgetDialog, java.lang.String)
A_CmsHtmlWidget.html.buildOpenCmsButtonRow(int,
org.opencms.widgets.I_CmsWidgetDialog)
Then java.lang.StringBuffer would have to implement
org.opencms.widgets.I_CmsWidgetDialog ? This can't be real???
I would expect the variant buildOpenCmsButtonRow(java.lang.StringBuffer,
java.lang.String) but don't found this.
Can anyone explain me where my understanding switches off ?
Kind Regards
Holger
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20120402/3ff22b74/attachment.htm>
More information about the opencms-dev
mailing list