Doc-To-Help now has seven Widgets that you can use to enhance your content.
But, with the “Meet the Widgets” blog series, I want to take a deep dive into each Widget, starting with “Note”.
Most of us need to call out warnings, cautions, important information, and tips in our content. The Note widget makes that easy. There are three default types — Note, Tip, and Warning. They each include an image, but you can change the default image and do other customizations.
Here is how each widget looks by default:
First we’ll cover how to create a Note widget, then we’ll talk a bit about how to make some customizations.
Creating a Note Widget
- In the Content Editor, put your cursor where you would like to insert the Note widget.
- Choose the Insert tab.
- Click the Widgets button in the Components ribbon group.
- Choose the Note Widget.
- The Widget Properties dialog box will open.
- Choose the Type of Note widget from the type drop-down. You can choose Note, Tip or Warning. Choose Note and click OK to insert the Widget (we will discuss further customizations later).
- After the Note widget is inserted, click inside the widget and enter your text.
- Click the Preview button to see what the Note will look like in your output.
Customizing your Widget: The image
As you have noticed, the default image for our widget is a piece of paper. You can change that to something else if you like, perhaps even a company logo.
- Since our widget has already been created, we’ll right click on it and choose Edit Widget. The Widget Properties dialog box will reopen so we can make changes.
- Click inside the customImage field and click the Ellipses button (it won’t appear until you click in the field). Navigate to the desired image.
- Doc-To-Help will ask if you want to store the image inside your project. Click Yes.
- Click OK. Your image will be updated.
Customizing your Widget: The widget text and background color
You need to create a custom style to do this customization. After you have created the style, you simply enter the name of the style in the customStyle field.
How to create a new Style
- On the Editor tab, click the Style List button to open the Style List window.
- Click the New Style button.
- The Style Formatting dialog box will open. Name your new style.
- Then open the Font tab to change the font and the text color.
- Then open the Background tab to update the background color.
- Click OK, the new style — SunnyWidget — will appear in the Style List. Now you can enter it in the Widget Properties dialog box, in the customStyle field.
- Here is what it will look like:
Customizing your Widget: The border
The final customization you might want to make is customizing the border of the Note Widget because the current one is thinner than you would like. This is done by creating a style and entering it in the CSS Class field at the top of the Widget Properties dialog box.
- To start, create a new style and name it, just as you did earlier. We’ll name ours SunnyWidgetBorder.
- Go to the Border tab and set the border style, width, and color.
- Click Ok. The new Style will appear in your Style List and you can enter the name of the style in the CSS Class field of the Widget Properties dialog box.
Finishing up our Widget
Now we need to do a build so we can see how our Widget looks in our output. For this example, we will build NetHelp, Doc-To-Help’s browser-based output.
- Confirm that the Target CSS is NetHelp.css, then click the Build button.
Our customized Note Widget is complete.
(By the way — the Note widget is very flexible, it works in all outputs, except WinHelp.)