Extension for Alfresco Share

WebPreviewer Alfresco Share

Inline displaying HTML, XML and other plain text documents on detail page

Alfresco Logo

Diese Seite auf deutsch

HtmlWebPreviewer Extension enables rendering of HTML and other plain text formats directly on documents detail pages of Alfresco Share.

You can view plain formats directly in web browser without the need of downloading it. Furthermore no implicit text to pdf transformations to display it with PDF web previewer module is required anymore. Usage will be more intuitive and faster.


  • displays HTML documents directly in the webb browser
  • shows other plain text formats e.g. JS, CSS, Mail (extendable)
  • works out of the box, install and use
  • customize by CSS
  • optional Wikipedia like Table of Contents


Inline display
View rendered HTML on document detail page
Inline edit of HTML with Rich-Text-Editor
Inline CSS display
Inline rendering CSS and other plain text formats on document detail page

Supported Alfresco Versions

  • Alfresco Community 4.2.x, 5.1.x
  • Alfresco One 4.2.x, 5.1.x (should also work, but not evaluated)

License / Costs

This extension is free. It is Open Source under Apache License 2.0


You can dowload this extension as Alfresco Module Package (AMP) at Github.



You can install this extension with Alfresco Module Management tool to Alfresco Share.

Go to the root directory of your Alfresco installation:

java -jar bin/alfresco-mmt.jar install <AMPFileLocation> <ShareWARFileLocation>

For example:

java -jar bin/alfresco-mmt.jar install htmlwebpreviewer-1.0.0.amp webapps/share.war

Further information about module installation you findhere.


Customize this extension in share-config-custom.xml.

<config evaluator="string-compare" condition="HtmlWebPreview"> <mimetypes> <mimetype>text/plain</mimetype> .... </mimetypes> <show-toc>true</show-toc> <toc-min-headlines>1</toc-min-headlines> <toc-max-headline-level>3</toc-max-headline-level> <stylesheets> <src>components/htmlwebpreview/htmlwebpreview.css</src> </stylesheets> </config>

Configuration value Description Default value
<mimetypes> List of mimetype definitions the HTML Web Previewer will deal with.  
<mimetypes>.<mimetype> MimeType text/plain, text/html, text/xhtml+xml, application/javascript, application/x-javascript, text/css, text/xml, message/rfc822
<show-toc> Show table of content? If enabled a TOC based on headlines from second level (H2) and below within the HTML will be rendered. false
<toc-min-headlines> Minimum amount (threshold) of headlines within the HTML to show up a TOC. If less than this number appears TOC will not rendered. 3
<toc-max-headline-level> Amount of levels that will be shown below H2. By default H2 and H3 headlines will be listed in TOC. If you change this setting you may extend CSS definition to support headline numbering. 3
<stylesheets> List of included CSS files. If set default CSS file will be replaced by your custom files.  
<stylesheets>.<src> Path to CSS file. Path definition expect to be located in share resource directory components/htmlwebpreview/htmlwebpreview.css