Javier Gutierrez
Javier Gutierrez

Reputation: 559

playframework external taglib

I'm trying to use an external library in view, ckeditor. that use sometinhg like this:

<ckeditor:replace replace="editor1" basePath="/ckeditor/"/>

but, html extension of playframework don't accept the taglib

<%@ taglib uri="http://ckeditor.com" prefix="ckeditor" %>

and if I change the html extension for jsp the controller don't find his view

Please, how can I use external taglibs?

Upvotes: 1

Views: 533

Answers (2)

Codemwnci
Codemwnci

Reputation: 54894

The reason why Play does not accept the taglib, is because taglib is JSP. Play is not based on Java EE, and therefore JSP is not the way the View is constructed. Play instead uses Groovy as the View layer. Groovy and JSP are not compatible.

This is not a bad thing. It does mean JSP tag libraries are not available, but there are nearly always another alternative, as @Jean has identified in his blog post.

Upvotes: 1

Jean-Philippe Briend
Jean-Philippe Briend

Reputation: 3525

My answer is not perfect, but here is how I used an editor in my view in a Play application : http://blog.infin-it.fr/2010/12/16/play-framework-enrichir-votre-application-avec-un-editeur-riche-textile/ (in french but you can check the code).

I have chosen MarkItUp because it is providing markup syntaxt and Play has a build-in library for it.

I hope this could help you.

Upvotes: 0

Related Questions