Webix use object html tag and run it in my view

Hello i want to add on my webix application weather widget. I need to add some js in code and object html tag. Trying to use richtext view, and template but it does not work. How it possible to do ?

Hello @roma ,

You may include HTML in templates. However, they are meant to work with simple HTML more. They are mostly used for rendering data and are re-rendered quite often. So they are not suitable for working with third party widgets.

Instead, you could create a view container / wrapper for the widget with the help of protoUI.
This works in the following way:

  • The component should be inherited from the base view and the event module (webix.ui.view, webix.EventSystem). The event module is optional and only needed if you want to use our system (with on: { } in configuration, methods such as attachEvent, callEvent)

  • Then, create an HTML container (a regular div)

  • Render the widget inside the HTML container

  • If the component does not automatically adjust to the container, use $setSize to set the current size of the Webix view

  • Then, you could also add any methods to the component

In general, you may integrate everything that can be embedded in an HTML container. In our github you may find examples of such integrations with various maps, charts, text editors and other things.

1 Like

@roma ,
there are also similar topics that can be helpful for you. For example, you could check this topic also:
help on wrapping third party widget .

1 Like

@MariyaDemy thank you, i guess it will help me a lot