How to use FCKeditorV2 instead of FreeTextBox ?
-
I want to use FCKeditorV2 (Figure 2) http://www.mediafire.com/view/pdmvi0aezyqpil5/website2010\_10b.jpg/file instead of FreeTextBox (Figure 1) http://www.mediafire.com/view/oahtm7k3883elow/website2010\_10a.jpg/file The code I have edited
In file ArticleAddEdit.aspx
line 5:
original
<%@ Register TagPrefix="FTB" Namespace="FreeTextBoxControls" Assembly="FreeTextBox" %>edit
<%@ Register TagPrefix="FCKeditorV2" Namespace="FredCK.FCKeditorV2" Assembly="FredCK.FCKeditorV2" %>line 79:
original:edit:
But when I change the code the following error message: http://www.mediafire.com/view/zpze8g7k7o3wm4a/website2010\_10c.jpg/file Line 40: txtTitle.Text = obj.Title; Line 41: txtExcerpt.Text = obj.Excerpt; Line 42: txtBody.Text = obj.Body; Line 43: if (obj.Priority == 1) Line 44: chkPriority.Checked = true; For the original code
In file In file ArticleAddEdit.aspx
<%@ Page ValidateRequest="false" Language="C#" Theme="WebMaster" MasterPageFile="~/WebMaster/MasterPage.master" AutoEventWireup="true" CodeFile="ArticleAddEdit.aspx.cs" Inherits="webapp4U.UI.ArticleAddEdit" %>
<%@ Register Src="~/WebMaster/Controls/Title.ascx" TagName="Title" TagPrefix="uc" %>
<%@ Import Namespace="webapp4U" %>
<%@ Register TagPrefix="webapp4U" Namespace="webapp4U.UI" %>
<%@ Register TagPrefix="FTB" Namespace="FreeTextBoxControls" Assembly="FreeTextBox" %> -
I want to use FCKeditorV2 (Figure 2) http://www.mediafire.com/view/pdmvi0aezyqpil5/website2010\_10b.jpg/file instead of FreeTextBox (Figure 1) http://www.mediafire.com/view/oahtm7k3883elow/website2010\_10a.jpg/file The code I have edited
In file ArticleAddEdit.aspx
line 5:
original
<%@ Register TagPrefix="FTB" Namespace="FreeTextBoxControls" Assembly="FreeTextBox" %>edit
<%@ Register TagPrefix="FCKeditorV2" Namespace="FredCK.FCKeditorV2" Assembly="FredCK.FCKeditorV2" %>line 79:
original:edit:
But when I change the code the following error message: http://www.mediafire.com/view/zpze8g7k7o3wm4a/website2010\_10c.jpg/file Line 40: txtTitle.Text = obj.Title; Line 41: txtExcerpt.Text = obj.Excerpt; Line 42: txtBody.Text = obj.Body; Line 43: if (obj.Priority == 1) Line 44: chkPriority.Checked = true; For the original code
In file In file ArticleAddEdit.aspx
<%@ Page ValidateRequest="false" Language="C#" Theme="WebMaster" MasterPageFile="~/WebMaster/MasterPage.master" AutoEventWireup="true" CodeFile="ArticleAddEdit.aspx.cs" Inherits="webapp4U.UI.ArticleAddEdit" %>
<%@ Register Src="~/WebMaster/Controls/Title.ascx" TagName="Title" TagPrefix="uc" %>
<%@ Import Namespace="webapp4U" %>
<%@ Register TagPrefix="webapp4U" Namespace="webapp4U.UI" %>
<%@ Register TagPrefix="FTB" Namespace="FreeTextBoxControls" Assembly="FreeTextBox" %>FCKeditor hasn't been updated since 2007. Whilst it might work, there's a good chance there will be problems using it in newer browsers. And if you do encounter any problems, you won't get any support or bug fixes. You'll probably have better luck using the replacement, CKeditor. You'll just need to be aware of the licensing restrictions for the free version.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
-
FCKeditor hasn't been updated since 2007. Whilst it might work, there's a good chance there will be problems using it in newer browsers. And if you do encounter any problems, you won't get any support or bug fixes. You'll probably have better luck using the replacement, CKeditor. You'll just need to be aware of the licensing restrictions for the free version.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
That was a common error with FCKeditor, getting the text from the JavaScript object. You will have the same issue with CKeditor as well, because it uses the same code to place and grab text from the ckeditor object. I remember having to link some Javascript to transfer the text, and check for ckinstance and ckdirty before accessing the ckobject. From your post, I can tell your pretty new to CKeditor and haven't gotten to using js files to program the environment yet, or didn't run the sample project provided for you to learn from that is fully functional. I suggest you run the tutorial project in ckeditor.
If it ain't broke don't fix it Discover my world at jkirkerx.com
-
That was a common error with FCKeditor, getting the text from the JavaScript object. You will have the same issue with CKeditor as well, because it uses the same code to place and grab text from the ckeditor object. I remember having to link some Javascript to transfer the text, and check for ckinstance and ckdirty before accessing the ckobject. From your post, I can tell your pretty new to CKeditor and haven't gotten to using js files to program the environment yet, or didn't run the sample project provided for you to learn from that is fully functional. I suggest you run the tutorial project in ckeditor.
If it ain't broke don't fix it Discover my world at jkirkerx.com
I did my own research, tinkering and programming, according to you in addition to FCKeditor and CKeditor, currently the programming tool supports better than CKeditor what tool do you use ?
-
That was a common error with FCKeditor, getting the text from the JavaScript object. You will have the same issue with CKeditor as well, because it uses the same code to place and grab text from the ckeditor object. I remember having to link some Javascript to transfer the text, and check for ckinstance and ckdirty before accessing the ckobject. From your post, I can tell your pretty new to CKeditor and haven't gotten to using js files to program the environment yet, or didn't run the sample project provided for you to learn from that is fully functional. I suggest you run the tutorial project in ckeditor.
If it ain't broke don't fix it Discover my world at jkirkerx.com
Why have you replied to me instead of the OP? :laugh:
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
-
Why have you replied to me instead of the OP? :laugh:
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
Richard Deeming wrote:
instead of the OP?
Maybe he's not down with OPP? :laugh:
Social Media - A platform that makes it easier for the crazies to find each other. Everyone is born right handed. Only the strongest overcome it. Fight for left-handed rights and hand equality.
-
I did my own research, tinkering and programming, according to you in addition to FCKeditor and CKeditor, currently the programming tool supports better than CKeditor what tool do you use ?
I'm not sure what you mean by tool. I used both, starting with FCKEditor and then CKEditor in a Asp.Net Webform app. I got as far as writing JS files to program the editor, JS scripts to load the HTML, get the HTML back, and wrote Custom tools or controls to ... Upload new images, Set images from the Product database Place images and text, Load custom HtmlTemplates to showcase products Load custom HTML sections I got pretty good with CKEditor and customers liked it. But I haven't touched it in 3 years, I dropped Webforms and went Angular now. I think this is what your looking for. It took me a long time to understand how to save the HTML in the editor without reloading the form, and saving when posting the entire form back to the server. It's JQuery, that can write to input elements on the webform. This file calls functions in the main ckEditor JS file. I don't remember all the details to CKEditor, but I needed a JavaScript interface to write the HTML in the content container to a textbox or input form element, since the ckEditor container is not a form element. So you create a form element that represents the CKEditor HTML content data, and create sort of a hook to go back and forth to ckEditor object, and a panel/container to hold the CKEditor JavaScript object inside. The function is tied to a webform button OnClientClick(update_ckEditor_Preview())
function update_ckEditor_Preview() {
var ckEditor\_XHTML, ckEditor\_Instance, ckEditor\_Update, classic\_template; classic\_template = $('\[id\*="\_txt\_ProductEditor\_Template"\]').val(); try { var ckInstance = ckEditor\_GetInstance(); if (ckInstance !== null) { var ckDirty = ckInstance.checkDirty; ckEditor\_XHTML = ckInstance.getData(); ckEditor\_Instance = ckInstance.getData(); if (ckDirty) { ckInstance.resetDirty(); } $('\[id\*="\_panel\_Display\_Classic\_XHTML"\]').empty(); $('\[id\*="\_panel\_Display\_Classic\_XHTML"\]').append(ckEditor\_XHTML); $('\[id\*="\_panel\_Display\_Classic\_XHTML"\]').css('display', 'inline-block'); ckEditor\_Update = true; } else { ckEditor\_XHTML = $('\[id\*="\_ck\_Editor\_ProductXHTML"\]').val(); $('\[id\*="\_panel\_Display\_Classic\_XHTML"\]').empty(); $('\[id\*="\_panel\_Display\_Classic\_XHTML"\]').append(ckEditor\_XHTML); $('\[id\*="\_panel\_Display\_Classic\_X
-
Why have you replied to me instead of the OP? :laugh:
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
Good question. It wasn't intentional. Perhaps lack of sleep, woke up at 4:30 and could not go back to sleep, so I went to work.
If it ain't broke don't fix it Discover my world at jkirkerx.com
-
I'm not sure what you mean by tool. I used both, starting with FCKEditor and then CKEditor in a Asp.Net Webform app. I got as far as writing JS files to program the editor, JS scripts to load the HTML, get the HTML back, and wrote Custom tools or controls to ... Upload new images, Set images from the Product database Place images and text, Load custom HtmlTemplates to showcase products Load custom HTML sections I got pretty good with CKEditor and customers liked it. But I haven't touched it in 3 years, I dropped Webforms and went Angular now. I think this is what your looking for. It took me a long time to understand how to save the HTML in the editor without reloading the form, and saving when posting the entire form back to the server. It's JQuery, that can write to input elements on the webform. This file calls functions in the main ckEditor JS file. I don't remember all the details to CKEditor, but I needed a JavaScript interface to write the HTML in the content container to a textbox or input form element, since the ckEditor container is not a form element. So you create a form element that represents the CKEditor HTML content data, and create sort of a hook to go back and forth to ckEditor object, and a panel/container to hold the CKEditor JavaScript object inside. The function is tied to a webform button OnClientClick(update_ckEditor_Preview())
function update_ckEditor_Preview() {
var ckEditor\_XHTML, ckEditor\_Instance, ckEditor\_Update, classic\_template; classic\_template = $('\[id\*="\_txt\_ProductEditor\_Template"\]').val(); try { var ckInstance = ckEditor\_GetInstance(); if (ckInstance !== null) { var ckDirty = ckInstance.checkDirty; ckEditor\_XHTML = ckInstance.getData(); ckEditor\_Instance = ckInstance.getData(); if (ckDirty) { ckInstance.resetDirty(); } $('\[id\*="\_panel\_Display\_Classic\_XHTML"\]').empty(); $('\[id\*="\_panel\_Display\_Classic\_XHTML"\]').append(ckEditor\_XHTML); $('\[id\*="\_panel\_Display\_Classic\_XHTML"\]').css('display', 'inline-block'); ckEditor\_Update = true; } else { ckEditor\_XHTML = $('\[id\*="\_ck\_Editor\_ProductXHTML"\]').val(); $('\[id\*="\_panel\_Display\_Classic\_XHTML"\]').empty(); $('\[id\*="\_panel\_Display\_Classic\_XHTML"\]').append(ckEditor\_XHTML); $('\[id\*="\_panel\_Display\_Classic\_X
123/5000 In this place I have replaced FCKeditorV2 for FreeTextBox but when running it does not appear the editor, do you know why ? you see attach file [http://www.mediafire.com/file/lvc6m3pupnd4430/website2010\_10d.jpg\](http://www.mediafire.com/file/lvc6m3pupnd4430/website2010\_10d.jpg)
-
123/5000 In this place I have replaced FCKeditorV2 for FreeTextBox but when running it does not appear the editor, do you know why ? you see attach file [http://www.mediafire.com/file/lvc6m3pupnd4430/website2010\_10d.jpg\](http://www.mediafire.com/file/lvc6m3pupnd4430/website2010\_10d.jpg)
Well that solves linking a textbox to ckEditor and having to write JavaScript. I didn't want to download your image.
If it ain't broke don't fix it Discover my world at jkirkerx.com