To create the new widget, there are four aspects that you need to implement.
Parameters: Define the parameters that your widget needs
Editor: This will edit the widget parameters
Renderer: This will render your widget based on a set of parameters
Define a key for each parameter that your renderer/editor needs. See WidgetConstants
For your widget to be inline, add to the editor's updateDescriptorFromView() method:
descriptor.put(WidgetConstants.INLINE_WIDGET_KEY, "true");
Bind your Widget editor view to the implementation by modifying the Portal gin module:
bind(YouTubeConfigView.class).to(YouTubeConfigViewImpl.class);
bind(YouTubeWidgetView.class).to(YouTubeWidgetViewImpl.class);
Add a unit test for your renderer! (see YouTubeWidgetTest)