Hi
I must show html content in the lightbox. How can I do this?
Is there any idea??
Hello,
You have two options:
- Create custom lightbox section
- Create custom lightbox
The first option obviously is easier. You can find details in the documentation and check the sample - scheduler\samples\02_customization\05_custom_editor.html
Kind regards,
Ilya
Thank u for your answer
I have done what you said. In the following sample worked fine but my response data is a html content. I must show coming html data as text data. The Dhtmlx Editor can show html data but I dont know how to i embed Dhtmlx Editor to details form. How can I do this Ilya?
scheduler.form_blocks[“my_editor”]={
render:function(sns){
return “
},
set_value:function(node,value,ev){
node.childNodes[1].value=value||””;
},
get_value:function(node,ev){
return node.childNodes[1].value;
},
focus:function(node){
var a=node.childNodes[1]; a.select(); a.focus();
}
};
scheduler.config.lightbox.sections=[
{name:“appointmentNoteCombo”, height:23, type:“select”, options:appointmentNotes,map_to:“appointmentNote_id”},
{name:“appointmentNote”, height:200, map_to:“text”, type:“my_editor”},
{name:“time”, height:72, type:“time”, map_to:“auto”}
];
Sorry, didn’t get the problem.
Kind regards,
Ilya
There is html data in the textArea . But I must show text data. How can I show as text?
There is no built in support for reach text editor, so you have two solutions
a) you can pre-process text during event creation and remove all html tags ( beware that it will be saved without tags as well )
b) you can implement custom editor section and use some third-party rich text editor ( somewhere on forum was a post about external editor usage )
Thanks for help… I resolved the problem. I wroted a method in server side. The method convert html data to string data.
private String removeHTML(String htmlString) {
String noHTMLString = htmlString.replaceAll("<br>", "\n");
noHTMLString = noHTMLString.replaceAll("<li>([^<]*)</li>", "$1\n");
noHTMLString = noHTMLString.replaceAll("\\<.*?\\>", "");
noHTMLString = noHTMLString.replaceAll("<br>", "\n");
noHTMLString = noHTMLString.replaceAll("<br/>", "\n");
noHTMLString = noHTMLString.replaceAll(" ", " ");
noHTMLString = noHTMLString.replaceAll("'", "\'");
noHTMLString = noHTMLString.replaceAll(""", "\"");
return noHTMLString;
}