掲示板
How to convert html to bbcode
12年前 に Sudarshan Kumar によって更新されました。
How to convert html to bbcode
Junior Member 投稿: 42 参加年月日: 11/08/12 最新の投稿
Hi all ,
Could u please help me, how to conver html text to bbcode. Actually Liferay message board support bbcode only but I am not getting how they are converting into the bbcoe.
For example if we write bold tag in html you can write like <b></b> or <strong></strong> but while posting message in liferay if you select any text and click on bold button (in editor) it will change something like text (i.e BBCode ). So I need the code where I can pass the String with html and will get String with BBCode.
Thank in advance
Sudarshan
Could u please help me, how to conver html text to bbcode. Actually Liferay message board support bbcode only but I am not getting how they are converting into the bbcoe.
For example if we write bold tag in html you can write like <b></b> or <strong></strong> but while posting message in liferay if you select any text and click on bold button (in editor) it will change something like text (i.e BBCode ). So I need the code where I can pass the String with html and will get String with BBCode.
Thank in advance
Sudarshan
12年前 に Mayur Patel によって更新されました。
RE: How to convert html to bbcode
Expert 投稿: 358 参加年月日: 10/11/17 最新の投稿
<liferay-ui:input-editor name="messageEditor" />
HTML content value for this editor you may retrieve using var customValue = window.messageEditor.getHTML();
you can check the way FCK Editor working from following path,
Thanks
HTML content value for this editor you may retrieve using var customValue = window.messageEditor.getHTML();
you can check the way FCK Editor working from following path,
\portal-web\docroot\html\portlet\message_boards\bbcode_editor.jspf
Thanks
12年前 に Sudarshan Kumar によって更新されました。
RE: How to convert html to bbcode
Junior Member 投稿: 42 参加年月日: 11/08/12 最新の投稿
Hi Mayur ,
Thanks for ur help. But I don't want html. I want a method where If I pass String with html tag it will give String with BBCode tag.
Thanks
Sudarshan
Thanks for ur help. But I don't want html. I want a method where If I pass String with html tag it will give String with BBCode tag.
Thanks
Sudarshan
12年前 に Jitendra Rajput によって更新されました。
RE: How to convert html to bbcode
Liferay Master 投稿: 875 参加年月日: 11/01/07 最新の投稿
Agree with mayur . you can fckeditor for this kind of formatting.
Have a look for example
http://jbrajput.blogspot.in/2012/01/multiple-fckeditor-instance-in-same-pag.html
Have a look for example
http://jbrajput.blogspot.in/2012/01/multiple-fckeditor-instance-in-same-pag.html