Embedded JavaScript and CSS Resources in Doconut DLLs for .NET Standard/Core and .NET 6:
We are excited to announce that the Doconut DLLs for .NET Standard/Core and .NET 6 now include embedded JavaScript and CSS resources, just like in the .NET Framework version. This enhancement simplifies the integration of essential resources into your applications.
To utilize these embedded resources, you can configure the viewer as shown in the following code snippet:
var viewer = new Viewer(_cache, _accessor);
var scriptConfig = new ScriptConfig
{
IncludeViewerScripts = true,
IncludeSearchScripts = true,
IncludeAnnotationScripts = true,
IncludeJQuery = true,
IncludeBootstrap = true
};
var cssConfig = new CssConfig
{
IncludeViewerCss = true,
IncludeAnnotationCss = true,
IncludeBootstrapCss = true
};
ViewBag.ViewerCss = viewer.ReferenceCss(cssConfig);
ViewBag.ViewerScripts = viewer.ReferenceScripts(scriptConfig);
This feature will not disrupt your current implementation. You can continue to manually reference the resources in your HTML as you have been doing. The new embedded options simply provide an additional layer of convenience for developers looking to streamline their resource management.