Before going to development, I'll start with the overview of Newgen HTML Widgets System.
Newgen uses the virtual web server created using
TcpListener. This server is created by Newgen at runtime at any free
port available that time. <Newgen>\Widgets is the base directory for this server.
The HTML Widgets, in simple, are just HTML files run
by the Webkit. There are some reasons, for why I wasted time on creating the server. I'll not tell that.
Basic requirements and information ->
More details. For a widget, to be identified by Newgen, the widget definition must
be present in the same directory as widget files. The definition file is Widget.Definition.xml and below is template for it.
<Name>My HTML Widget</Name>
Their is also a widget sample, you can get it from here.
Also download Widget Packing Tool (You'll need it, if you want your widget in Newgen Store).
First step: Preparing ->
Ok, let's start. Follow the process.
- Create a folder <Newgen>\Widgets\<Widget Name>.
- Then, create a file in above folder as Widget.Definition.xml with the given template above. NOTE: The folder name and widget name must be same.
- Then open Photoshop or any Image editor and create a logo (Icon) and a default preview of your widget's Tile (Content.FallbackImage) for your widget in .png format.
- Fill out and correct the file names in Widget.Definition.xml.
- Now, create a file Tile.html in folder at step 1. You can use any name for file, just make sure that you correct it in definition.
- You have made a widget for Newgen, which'll show only a white space. Now, run Newgen and test it.