How to make an HTML widget?
See original GitHub issueIt says “Can be literal HTML”. Given that, how would I insert a datasource?
<div style="background-color: gray">This is a timestamp: datasources["DS"]["Timestamp"]</div>
Related SO question: http://stackoverflow.com/questions/31592886/adding-literal-html-to-an-html-widget-with-data-from-a-datasource
Issue Analytics
- State:
- Created 8 years ago
- Comments:12 (1 by maintainers)
Top Results From Across the Web
Chapter 5: Creating Web Widget with HTML, CSS, and ...
Create a new HTML page and name it testpage.html and enter the code shown below. The widget code in the page contains few...
Read more >Creating a widget - HTMLWidgets
We provide a name and type for the widget, plus a factory function that takes el (the HTML element that will host this...
Read more >Creating HTML Widgets
Creating HTML Widgets · From the menu, click Digital Touchpoints > Digital Experience Portal > Widgets. · At the top-right corner of the...
Read more >My First Real Project: Creating Widgets with Javascript, HTML ...
The project was to create a series of widgets with javascript, html and css. By definition, a widget is an application, or a...
Read more >Build a HTML widget - Bloomreach Documentation
Build a HTML widget · Getting widget results · Request · Response · Response processing.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@Shamzic If you want to do dynamic html, I would recommend the handlebars plugin that allows you to have clean separation between your html and javascript (view/model) as well as tooling that allows you to do it outside of freeboard’s editor using your favorite dev tools.
Yea this took me a while.
I think this is how the JS data source for the HTML widget works. Whatever you put in there is treated like a “closure”, so it just runs whatever code you put in there. Put “return” at the end and it will return a value out.
So, the trick is