Hi.
I'm using a CMS to control my website.
Till now, I used a text editor called htmlarea to add news to my site.
When I try to replace it with CKEditor version 3.6.2 It doesnt work.
Here is the original code of the page running the text editor (with my old text editor, htmlarea):
notice line 188
and this is the code after I tried to change it so it will show CKEditor (and it shows just a box with my text as a html code):
notice line 190
what should I do in order to make it work?
I'm using a CMS to control my website.
Till now, I used a text editor called htmlarea to add news to my site.
When I try to replace it with CKEditor version 3.6.2 It doesnt work.
Here is the original code of the page running the text editor (with my old text editor, htmlarea):
notice line 188
<!-- #include virtual="contentManagment/admin/includes/header.asp" --> <!-- #INCLUDE File="func.asp" --> <!-- #include virtual="contentManagment/admin/includes/menuLinks.asp" --> <% action = Request.QueryString("action") if action <> "changeCategory" then 'get user info for edit (my translation from hebrew) ID = trim(Request.Form("selectedRow")) if ID <> "" then mySQL = "select * from articles_table where ID = " & ID & ";" Set RS = Server.CreateObject( "ADODB.Recordset" ) RS.Open mySQL, Con, adOpenStatic, adLockOptimistic if not RS.EOF then ID = RS("ID") article_category = RS("article_category") article_title = RS("article_title") article_short_description= RS("article_short_description") foll_artile = RS("foll_artile") article_date = RS("article_date") article_by = RS("article_by") main_image = RS("main_image") show = RS("show") show_on_main_page = RS("show_on_main_page") news_flash = RS("news_flash") lang = RS("lang") RS.Close Set RS = Nothing else RS.Close Set RS = Nothing end if else Response.Redirect "articlesIndex.asp?action=update&errorMsg=" & errMsg_noRowSelected end if else ID = Request.Form("ID") article_title = Request.Form("article_title") article_short_description= Request.Form("article_short_description") foll_artile = Request.Form("foll_artile") article_date = Request.Form("article_date") article_by = Request.Form("article_by") main_image = Request.Form("main_image") show = Request.Form("show") show_on_main_page = Request.Form("show_on_main_page") news_flash = Request.Form("news_flash") lang = Request.Form("lang") end if %> <SCRIPT language=JavaScript type=text/javascript> function changeLang() { document.myForm.action = "articlesEdit.asp?action=changeCategory"; document.myForm.submit(); } </SCRIPT> <form action=articlesIndex.asp?action=update method=post id=myForm name=myForm> <tr> <td colspan=4 class=menubackgr> <div align="center"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <!-- #include virtual="contentManagment/admin/includes/navigatorBar.asp" --> <!-- #INCLUDE File="toolBar.asp" --> </tr> </table> </div> </td> </tr> </table> <table width=100%> <!-- #include virtual="contentManagment/admin/includes/pageMessage.asp" --> </table> <DIV align=center style="padding-top: 10px"> <DIV class=main> <TABLE width="100%" border=0> <TBODY> <TR> <TD vAlign=center align=middle> <TABLE class=adminheading> <TBODY> <TR> <TH> <%=getPageName()%> </TH> </TR> </TBODY> </TABLE> <TABLE class=adminlist border=1> <TBODY> <TR> <TD class=sbl_SimpleCaption> <LABEL for=ReligionID> <%=lang_lang%> </LABEL> </TD> <TD> <SELECT id=lang name=lang onchange="changeLang()"> <% mySQL = "select * from language_table order by ID;" Set RS_userType = Server.CreateObject( "ADODB.Recordset" ) RS_userType.Open mySQL, Con, adOpenStatic, adLockOptimistic if not RS_userType.EOF then while not RS_userType.EOF %> <OPTION value="<%=RS_userType("ID")%>" <%if lang = RS_userType("ID") then%>selected<%end if%>><%=RS_userType("NAME")%></OPTION> <% RS_userType.MoveNext wend RS_userType.Close Set RS_userType = Nothing else RS_userType.Close Set RS_userType = Nothing end if %> </SELECT> </TD> </TR> <TR> <TD class=sbl_SimpleCaption> <LABEL for=ReligionID> <%=lang_article_category_NAME%> <INPUT type="hidden" id=ID name=ID value="<%=ID%>"> </LABEL> </TD> <TD> <SELECT id=article_category name=article_category> <% mySQL = "select * from article_category_table where lang = " & lang & " and RECICLE = false;" Set RS_userType = Server.CreateObject( "ADODB.Recordset" ) RS_userType.Open mySQL, Con, adOpenStatic, adLockOptimistic if not RS_userType.EOF then while not RS_userType.EOF %> <OPTION dir=ltr value="<%=RS_userType("ID")%>" <%if article_category = RS_userType("ID") then%>selected<%end if%>><%=RS_userType("NAME") & " - " & getRecordName("language_table",RS_userType("lang"),"NAME")%></OPTION> <% RS_userType.MoveNext wend RS_userType.Close Set RS_userType = Nothing else RS_userType.Close Set RS_userType = Nothing end if %> </SELECT> </TD> </TR> <TR> <TD class=sbl_SimpleCaption> <LABEL for=ReligionID> <%=lang_article_title%> </LABEL> </TD> <TD> <INPUT id=article_title name=article_title size="40" value="<%=article_title%>"> </TD> </TR> <!-- <TR> <TD class=sbl_SimpleCaption valign=top> <LABEL for=ReligionID> <%=lang_article_short_description%> </LABEL> </TD> <TD> <TEXTAREA id=article_short_description name=article_short_description style="width:800px; height:100px"><%=article_short_description%></TEXTAREA> </TD> </TR> --> <TR> <TD class=sbl_SimpleCaption valign=top> <LABEL for=ReligionID> <%=lang_foll_artile%> </LABEL> </TD> <TD> <script language="Javascript1.2"><!-- // load htmlarea _editor_url = "../includes/htmlarea/"; // URL to htmlarea files var win_ie_ver = parseFloat(navigator.appVersion.split("MSIE")[1]); if (navigator.userAgent.indexOf('Mac') >= 0) { win_ie_ver = 0; } if (navigator.userAgent.indexOf('Windows CE') >= 0) { win_ie_ver = 0; } if (navigator.userAgent.indexOf('Opera') >= 0) { win_ie_ver = 0; } if (win_ie_ver >= 5.5) { document.write('<scr' + 'ipt src="' +_editor_url+ 'editor.js"'); document.write(' language="Javascript1.2"></scr' + 'ipt>'); } else { document.write('<scr'+'ipt>function editor_generate() { return false; }</scr'+'ipt>'); } // --></script> <textarea name="foll_artile" style="width:450px; height:200px" dir=rtl><%=foll_artile%></textarea> <script language="javascript1.2"> editor_generate('foll_artile'); </script> </TD> </TR> <TR> <TD class=sbl_SimpleCaption> <LABEL for=ReligionID> <%=lang_article_date%> </LABEL> </TD> <TD> <INPUT id=article_date name=article_date size="40" value="<%=article_date%>"> <IMG onclick=getDate(article_date) src="../images/adminPic/pick.bmp" align=absMiddle> </TD> </TR> <!-- <TR> <TD class=sbl_SimpleCaption> <LABEL for=EventTypeID> <%=lang_article_by%> </LABEL> </TD> <TD> <INPUT id=article_by name=article_by size="40" value="<%=article_by%>"> </TD> </TR> --> <TR> <TD class=sbl_SimpleCaption> <LABEL for=ReligionID> <%=lang_main_image%> </LABEL> </TD> <TD> <INPUT id=main_image name=main_image size="40" value="<%=main_image%>"> <IMG onclick=getFile(main_image) src="../images/adminPic/pick.bmp" align=absMiddle> </TD> </TR> <!-- <TR> <TD class=sbl_SimpleCaption> <LABEL for=ReligionID> <%=lang_article_show_on_main_page2%> </LABEL> </TD> <TD> <INPUT type="checkbox" id=show_on_main_page name=show_on_main_page <%if getShow(show_on_main_page) then%>checked<%end if%>> </TD> </TR> <TR> <TD class=sbl_SimpleCaption> <LABEL for=ReligionID> <%=lang_article_news_flash2%> </LABEL> </TD> <TD> <INPUT type="checkbox" id=news_flash name=news_flash <%if getShow(news_flash) then%>checked<%end if%>> </TD> </TR> --> <TR> <TD class=sbl_SimpleCaption> <LABEL for=ReligionID> <%=lang_article_show2%> </LABEL> </TD> <TD> <INPUT type="checkbox" id=show name=show <%if getShow(show) then%>checked<%end if%>> </TD> </TR> <!-- <tr> <td colspan=2 align=center> <iframe src=../includes/files.asp?file_folder=articles&table_name=articles_table&record_id=<%=ID%> width=800 height=200> </td> </tr> --> </TBODY> </TABLE> </TD> </TR> </TBODY> </TABLE> </DIV> </DIV> </form> <!-- #include virtual="contentManagment/admin/includes/footer.asp" -->
and this is the code after I tried to change it so it will show CKEditor (and it shows just a box with my text as a html code):
notice line 190
<!-- #include virtual="contentManagment/admin/includes/header.asp" --> <!-- #INCLUDE File="func.asp" --> <!-- #include virtual="contentManagment/admin/includes/menuLinks.asp" --> <% action = Request.QueryString("action") if action <> "changeCategory" then 'קבלת נתוני משתמש לעריכה ID = trim(Request.Form("selectedRow")) if ID <> "" then mySQL = "select * from articles_table where ID = " & ID & ";" Set RS = Server.CreateObject( "ADODB.Recordset" ) RS.Open mySQL, Con, adOpenStatic, adLockOptimistic if not RS.EOF then ID = RS("ID") article_category = RS("article_category") article_title = RS("article_title") article_short_description= RS("article_short_description") foll_artile = RS("foll_artile") article_date = RS("article_date") article_by = RS("article_by") main_image = RS("main_image") show = RS("show") show_on_main_page = RS("show_on_main_page") news_flash = RS("news_flash") lang = RS("lang") RS.Close Set RS = Nothing else RS.Close Set RS = Nothing end if else Response.Redirect "articlesIndex.asp?action=update&errorMsg=" & errMsg_noRowSelected end if else ID = Request.Form("ID") article_title = Request.Form("article_title") article_short_description= Request.Form("article_short_description") foll_artile = Request.Form("foll_artile") article_date = Request.Form("article_date") article_by = Request.Form("article_by") main_image = Request.Form("main_image") show = Request.Form("show") show_on_main_page = Request.Form("show_on_main_page") news_flash = Request.Form("news_flash") lang = Request.Form("lang") end if %> <SCRIPT language=JavaScript type=text/javascript> function changeLang() { document.myForm.action = "articlesEdit.asp?action=changeCategory"; document.myForm.submit(); } </SCRIPT> <form action=articlesIndex.asp?action=update method=post id=myForm name=myForm> <tr> <td colspan=4 class=menubackgr> <div align="center"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <!-- #include virtual="contentManagment/admin/includes/navigatorBar.asp" --> <!-- #INCLUDE File="toolBar.asp" --> </tr> </table> </div> </td> </tr> </table> <table width=100%> <!-- #include virtual="contentManagment/admin/includes/pageMessage.asp" --> </table> <DIV align=center style="padding-top: 10px"> <DIV class=main> <TABLE width="100%" border=0> <TBODY> <TR> <TD vAlign=center align=middle> <TABLE class=adminheading> <TBODY> <TR> <TH> <%=getPageName()%> </TH> </TR> </TBODY> </TABLE> <TABLE class=adminlist border=1> <TBODY> <TR> <TD class=sbl_SimpleCaption> <LABEL for=ReligionID> <%=lang_lang%> </LABEL> </TD> <TD> <SELECT id=lang name=lang onchange="changeLang()"> <% mySQL = "select * from language_table order by ID;" Set RS_userType = Server.CreateObject( "ADODB.Recordset" ) RS_userType.Open mySQL, Con, adOpenStatic, adLockOptimistic if not RS_userType.EOF then while not RS_userType.EOF %> <OPTION value="<%=RS_userType("ID")%>" <%if lang = RS_userType("ID") then%>selected<%end if%>><%=RS_userType("NAME")%></OPTION> <% RS_userType.MoveNext wend RS_userType.Close Set RS_userType = Nothing else RS_userType.Close Set RS_userType = Nothing end if %> </SELECT> </TD> </TR> <TR> <TD class=sbl_SimpleCaption> <LABEL for=ReligionID> <%=lang_article_category_NAME%> <INPUT type="hidden" id=ID name=ID value="<%=ID%>"> </LABEL> </TD> <TD> <SELECT id=article_category name=article_category> <% mySQL = "select * from article_category_table where lang = " & lang & " and RECICLE = false;" Set RS_userType = Server.CreateObject( "ADODB.Recordset" ) RS_userType.Open mySQL, Con, adOpenStatic, adLockOptimistic if not RS_userType.EOF then while not RS_userType.EOF %> <OPTION dir=ltr value="<%=RS_userType("ID")%>" <%if article_category = RS_userType("ID") then%>selected<%end if%>><%=RS_userType("NAME") & " - " & getRecordName("language_table",RS_userType("lang"),"NAME")%></OPTION> <% RS_userType.MoveNext wend RS_userType.Close Set RS_userType = Nothing else RS_userType.Close Set RS_userType = Nothing end if %> </SELECT> </TD> </TR> <TR> <TD class=sbl_SimpleCaption> <LABEL for=ReligionID> <%=lang_article_title%> </LABEL> </TD> <TD> <INPUT id=article_title name=article_title size="40" value="<%=article_title%>"> </TD> </TR> <!-- <TR> <TD class=sbl_SimpleCaption valign=top> <LABEL for=ReligionID> <%=lang_article_short_description%> </LABEL> </TD> <TD> <TEXTAREA id=article_short_description name=article_short_description style="width:800px; height:100px"><%=article_short_description%></TEXTAREA> </TD> </TR> --> <TR> <TD class=sbl_SimpleCaption valign=top> <LABEL for=ReligionID> <%=lang_foll_artile%> </LABEL> </TD> <TD> <textarea class="ckeditor" name="foll_artile" style="width:450px; height:200px" dir=rtl><%=foll_artile%></textarea> </TD> </TR> <TR> <TD class=sbl_SimpleCaption> <LABEL for=ReligionID> <%=lang_article_date%> </LABEL> </TD> <TD> <INPUT id=article_date name=article_date size="40" value="<%=article_date%>"> <IMG onclick=getDate(article_date) src="../images/adminPic/pick.bmp" align=absMiddle> </TD> </TR> <!-- <TR> <TD class=sbl_SimpleCaption> <LABEL for=EventTypeID> <%=lang_article_by%> </LABEL> </TD> <TD> <INPUT id=article_by name=article_by size="40" value="<%=article_by%>"> </TD> </TR> --> <TR> <TD class=sbl_SimpleCaption> <LABEL for=ReligionID> <%=lang_main_image%> </LABEL> </TD> <TD> <INPUT id=main_image name=main_image size="40" value="<%=main_image%>"> <IMG onclick=getFile(main_image) src="../images/adminPic/pick.bmp" align=absMiddle> </TD> </TR> <!-- <TR> <TD class=sbl_SimpleCaption> <LABEL for=ReligionID> <%=lang_article_show_on_main_page2%> </LABEL> </TD> <TD> <INPUT type="checkbox" id=show_on_main_page name=show_on_main_page <%if getShow(show_on_main_page) then%>checked<%end if%>> </TD> </TR> <TR> <TD class=sbl_SimpleCaption> <LABEL for=ReligionID> <%=lang_article_news_flash2%> </LABEL> </TD> <TD> <INPUT type="checkbox" id=news_flash name=news_flash <%if getShow(news_flash) then%>checked<%end if%>> </TD> </TR> --> <TR> <TD class=sbl_SimpleCaption> <LABEL for=ReligionID> <%=lang_article_show2%> </LABEL> </TD> <TD> <INPUT type="checkbox" id=show name=show <%if getShow(show) then%>checked<%end if%>> </TD> </TR> <!-- <tr> <td colspan=2 align=center> <iframe src=../includes/files.asp?file_folder=articles&table_name=articles_table&record_id=<%=ID%> width=800 height=200> </td> </tr> --> </TBODY> </TABLE> </TD> </TR> </TBODY> </TABLE> </DIV> </DIV> </form> <!-- #include virtual="contentManagment/admin/includes/footer.asp" -->
what should I do in order to make it work?