Skip to main content

Enable Preview for source files like html or css with IBM Docs Viewer

IBM Docs Viewer can open source files with syntax highlighting. This feature is default disabled, but sometimes very useful.

You need to enable it with IBM Connections Gatekeeper.

Warning

Be aware that most of Gatekeeper settings are not officially supported by IBM and can have side effects!

Open Gatekeeper with https://your-connections-fqhn/connections/config

editor image 7e5b4698 42c1 41b8 8fd8 3384ce2fe4cc

Now search for FILEVIEWER_PREVIEW_TEXT and change the value to True.

editor image 38576940 5388 4dec 8bcb 6b68227d18fb

Now when you open an html (or other text file) from IBM Connections Files it will open a preview and after a short flickering of the document the source is highlighted.

editor image 85b47fdf 5c91 4d3c 866c 6516a98f1994

Without that setting you just see a message like “no preview available for this” and a download option:

editor image 35e7e787 8610 4943 8f5a 3cda24133efc

Gatekeeper settings can be set in real-time, so no restart of Connections is needed to enable or disable this feature. I tested the preview with html, js and css, but I think nearly everything with mime-type text is possible.

Update 2018-06-15
#

You need the admin role of the Common Application to access the gatekeeper!

Christoph Stoettner
Author
Christoph Stoettner
I work at Vegard IT GmbH as a senior consultant, focusing on collaboration software, Kubernetes, security, and automation. I primarily work with HCL Connections, WebSphere Application Server, Kubernetes, Ansible, Terraform, and Linux. My daily work occasionally leads to technical talks and blog articles, which I share here more or less regularly.

Related

IBM Connections 6.0CR1 Allowlisting, CSS and Wiki TOC

·957 words·5 mins
So up to IBM Connections 6.0 everything was allowed until it was not excluded in one of the blocklist files. This files are stored within the Deployment Manager profile/config/cells/<cellname>/LotusConnections-config/extern. Now with Connections 6.0CR1 everything is forbidden, until it is enabled in the allowlist. This concept is rolled out for widgets (homepage and communities) and active content. Active content means HTML content too. So everything you or your users add to Connections (blog-posts, wiki pages) gets filtered during the save procedure. This removes all HTML tags and attributes which are not explicitly allowed!