[opencms-dev] Adding own custom widget

Daniel Seidel d.seidel at alkacon.com
Tue Feb 23 10:44:49 CET 2021


Hi Anne,

have you checked out the example from the OpenCms documentation: 
https://documentation.opencms.org/opencms-documentation/extending-opencms/extending-the-content-editor/writing-native-editor-widgets/ 
<https://documentation.opencms.org/opencms-documentation/extending-opencms/extending-the-content-editor/writing-native-editor-widgets/>?

It basically refers to the demo implementation from 
https://github.com/alkacon/opencms-documentation/tree/branch_11_0_x/com.alkacon.opencms.documentation.examples.contenteditor.nativewidget 
<https://github.com/alkacon/opencms-documentation/tree/branch_11_0_x/com.alkacon.opencms.documentation.examples.contenteditor.nativewidget>.

In particular in example's JS there are hints how to get the value: 
https://github.com/alkacon/opencms-documentation/blob/branch_11_0_x/com.alkacon.opencms.documentation.examples.contenteditor.nativewidget/resources/system/modules/com.alkacon.opencms.documentation.examples.contenteditor.nativewidget/resources/js/examplewidget.js 
<https://github.com/alkacon/opencms-documentation/blob/branch_11_0_x/com.alkacon.opencms.documentation.examples.contenteditor.nativewidget/resources/system/modules/com.alkacon.opencms.documentation.examples.contenteditor.nativewidget/resources/js/examplewidget.js>. 
It tells to implement a setValue method that should be called by the 
editor for filling in the value.

Best, Daniel.

Am 22.02.21 um 13:57 schrieb Gebert, Anne:
>
> Hi list,
>
> I try to develop a custom widget (opencms 11.0.2) with access to the 
> values already filled in but I am not able to read the values. Do I 
> have to do that in der js? How can I access values from the content 
> element?
>
> Thanks in advance!
>
> Regards,
>
> Anne
>
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> https://lists.opencms.org/mailman/listinfo/opencms-dev
>
>
>
-- 
Kind Regards

Daniel.

-------------------

Daniel Seidel
Alkacon Software GmbH & Co. KG - The OpenCms Experts
https://www.alkacon.com - http://www.opencms.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.opencms.org/pipermail/opencms-dev/attachments/20210223/6e1cc08d/attachment.htm>


More information about the opencms-dev mailing list