cancel
Showing results for 
Search instead for 
Did you mean: 

How to preview javascript files in alfresco document Previewer

manjrak
Champ on-the-rise
Champ on-the-rise
Hello guys,

I am working on the new alfresco 5 enterprise edition.
In this version, New html 5 document previewer has been added, which is awesome, finally i don't have to rely on flash anymore.
Now the problem is Media Viewers add-on hasn't been updated to support Alfresco 5.
(In Alfresco 4, we made use of the Share Extras add-on ​Media Viewers to provide previews of a wider range of file formats)

* I want to preview option in for .js and .css files.
* This might just be listing the mime types for these against one of the new/upgraded previewers in Alfresco 5
* Is there a way i can preview Javascript/CSS files in the alfresco document previwer.

What do I need to have in order to start the preview? (Any alternatives, what should I check and where?).

Thanks in advance.

Regards,
Manjunath.s
1 REPLY 1

ddraper
World-Class Innovator
World-Class Innovator

In terms of alternatives you might want to consider looking at the Aikau preview options. This Sandpit page shows them working - all you need is the nodeRef of the node you want to preview. There's also a dedicated service for assisting with the generation of previews. There's also a chapter in the tutorial on how to use the previews.

Since you're just interested in JS and CSS files you might also want to consider looking at the CodeMirrorEditor widget as this could provide you with syntax formatting appropriate to the file type. If you were to use it in read only mode then it would act like a previewer.