Foros de discusión
Messageboard BBcode parsing
Rochad Tlusty, modificado hace 11 años.
Messageboard BBcode parsing
Junior Member Mensajes: 42 Fecha de incorporación: 18/01/12 Mensajes recientes
Im currently writing a plugin for CKEditor, which uses a custom bbcode tag. Inside the editor, everything works fine, it's being displayed properly and I can see the bbcode tags being stored in the database. The problem is when I go to view a thread that has a tag published with this plugin, Liferay doesn't seem to parse the custom bbcode tag. So I started looking around and I found this article on the BBcode implementation for Liferay. Now it looks like I will need to replace com.liferay.portal.kernel.parsers.bbcode.BBCodeTranslatorUtil. I was just wondering if anyone had some input on this, for example can I implement this without using the ext environment? Any help is very greatly appreciated.
jelmer kuperus, modificado hace 11 años.
RE: Messageboard BBcode parsing
Liferay Legend Mensajes: 1191 Fecha de incorporación: 10/03/10 Mensajes recientes
If you want to use a different implementation of BBCodeTranslator then yes you'll need to use an ext plugin
In docroot/WEB-INF/ext-impl/src/META-INF/ you create a file called ext-spring.xml
In docroot/WEB-INF/ext-impl/src/META-INF/ you create a file called ext-spring.xml
<!--?xml version="1.0" encoding="UTF-8"?-->
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemalocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean id="com.liferay.portal.kernel.parsers.bbcode.BBCodeTranslatorUtil" class="com.liferay.portal.kernel.parsers.bbcode.BBCodeTranslatorUtil">
<property name="BBCodeTranslator">
<bean class="com.yourcompany.YourImpl" />
</property>
</bean>
</beans>
<br><br>com.yourcompany.YourImpl you create under docroot/WEB-INF/ext-impl/src
Rochad Tlusty, modificado hace 11 años.
RE: Messageboard BBcode parsing
Junior Member Mensajes: 42 Fecha de incorporación: 18/01/12 Mensajes recientes
Thank you Jelmer this is perfect! I really appreciate your help.