[opencms-dev] Adding own custom widget

Gebert, Anne a.gebert at comundus.com
Tue Feb 23 13:58:53 CET 2021


Hi Daniel,

do I have to implement the method setValue in Java or in the js file? How can I access values from the editor in js which are already filled in?

Regards,
Anne

Von: opencms-dev <opencms-dev-bounces at opencms.org> Im Auftrag von Daniel Seidel
Gesendet: Dienstag, 23. Februar 2021 10:45
An: opencms-dev at opencms.org
Betreff: Re: [opencms-dev] Adding own custom widget


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/?

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.

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. 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/0e19b32a/attachment.htm>


More information about the opencms-dev mailing list