Click here to Skip to main content
15,880,796 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Dynamically updating the site with progress bar Pin
David Mujica29-Jan-20 5:57
David Mujica29-Jan-20 5:57 
QuestionHow to I fix "The method or operation is not implemented"? Pin
Member 1140330424-Jan-20 8:59
Member 1140330424-Jan-20 8:59 
AnswerRe: How to I fix "The method or operation is not implemented"? Pin
Blikkies26-Jan-20 21:48
professionalBlikkies26-Jan-20 21:48 
QuestionHow to use FCKeditorV2 instead of FreeTextBox ? Pin
Member 245846714-Jan-20 20:41
Member 245846714-Jan-20 20:41 
SuggestionRe: How to use FCKeditorV2 instead of FreeTextBox ? Pin
Richard Deeming15-Jan-20 0:51
mveRichard Deeming15-Jan-20 0:51 
GeneralRe: How to use FCKeditorV2 instead of FreeTextBox ? Pin
jkirkerx15-Jan-20 10:24
professionaljkirkerx15-Jan-20 10:24 
GeneralRe: How to use FCKeditorV2 instead of FreeTextBox ? Pin
Member 245846715-Jan-20 15:17
Member 245846715-Jan-20 15:17 
GeneralRe: How to use FCKeditorV2 instead of FreeTextBox ? Pin
jkirkerx16-Jan-20 7:26
professionaljkirkerx16-Jan-20 7:26 
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_XHTML"]').css('border', 'solid 1px rgb(28,134,238)');
            ckEditor_Update = true;            
        }
    }
    catch (err) {
        $('[id*="_panel_ProductEditor_Basic_Image_UpdateMessage"]').css('background-color', 'rgb(176,23,31)');
        $('[id*="_panel_ProductEditor_Basic_Image_UpdateMessage"]').fadeIn('normal', function () {
            $('[id*="_lbl_ProductEditor_Basic_Image_UpdateMessage"]').text("Could not connect to the ckEditor interface, update has failed");
        });
    }
    if (true === ckEditor_Update) {
        $('[id*="_panel_ProductEditor_Basic_Image_UpdateMessage"]').css('background-color', 'rgb(28,134,238)');
        $('[id*="_lbl_ProductEditor_Basic_Image_UpdateMessage"]').text("Preview Display Page has been updated successfully");
        $('[id*="_panel_ProductEditor_Basic_Image_UpdateMessage"]').fadeIn('normal').delay(5000).fadeOut('normal');
    }
    else {
        $('[id*="_panel_ProductEditor_Basic_Image_UpdateMessage"]').css('background-color', 'rgb(176,23,31)');
        $('[id*="_lbl_ProductEditor_Basic_Image_UpdateMessage"]').text("Could not connect to the ckEditor interface, update has failed");
        $('[id*="_panel_ProductEditor_Basic_Image_UpdateMessage"]').fadeIn('normal').delay(5000).fadeOut('normal');
    }   
    return false;
}
If it ain't broke don't fix it
Discover my world at jkirkerx.com

GeneralRe: How to use FCKeditorV2 instead of FreeTextBox ? Pin
Member 245846716-Jan-20 21:04
Member 245846716-Jan-20 21:04 
GeneralRe: How to use FCKeditorV2 instead of FreeTextBox ? Pin
jkirkerx17-Jan-20 6:55
professionaljkirkerx17-Jan-20 6:55 
GeneralRe: How to use FCKeditorV2 instead of FreeTextBox ? Pin
Richard Deeming16-Jan-20 1:33
mveRichard Deeming16-Jan-20 1:33 
JokeRe: How to use FCKeditorV2 instead of FreeTextBox ? Pin
ZurdoDev16-Jan-20 3:55
professionalZurdoDev16-Jan-20 3:55 
GeneralRe: How to use FCKeditorV2 instead of FreeTextBox ? Pin
jkirkerx16-Jan-20 7:34
professionaljkirkerx16-Jan-20 7:34 
Question.Net Core 2.2.4 - Getting IHostingEnvironment in Program.cs Main Pin
jkirkerx14-Jan-20 10:24
professionaljkirkerx14-Jan-20 10:24 
QuestionHtmlagilitypack -- I'm stuck Pin
Member 175325011-Jan-20 5:40
Member 175325011-Jan-20 5:40 
QuestionHow do I fix System.Net.Mail.SmtException: 'Cannot get IIS pickup directory' error? Pin
Member 1140330410-Jan-20 9:19
Member 1140330410-Jan-20 9:19 
AnswerRe: How do I fix System.Net.Mail.SmtException: 'Cannot get IIS pickup directory' error? Pin
Richard MacCutchan10-Jan-20 11:37
mveRichard MacCutchan10-Jan-20 11:37 
AnswerRe: How do I fix System.Net.Mail.SmtException: 'Cannot get IIS pickup directory' error? Pin
ZurdoDev11-Jan-20 9:03
professionalZurdoDev11-Jan-20 9:03 
QuestionHow do I fix 'object' does not contain a definition for 'Value'? Pin
Member 1140330410-Jan-20 8:27
Member 1140330410-Jan-20 8:27 
AnswerRe: How do I fix 'object' does not contain a definition for 'Value'? Pin
ZurdoDev10-Jan-20 9:09
professionalZurdoDev10-Jan-20 9:09 
QuestionWhy can't I login to the web even though the User and password are correct ? Pin
Member 24584679-Jan-20 21:43
Member 24584679-Jan-20 21:43 
AnswerRe: Why can't I login to the web even though the User and password are correct ? Pin
ZurdoDev10-Jan-20 1:00
professionalZurdoDev10-Jan-20 1:00 
GeneralRe: Why can't I login to the web even though the User and password are correct ? Pin
Member 245846714-Jan-20 16:19
Member 245846714-Jan-20 16:19 
GeneralRe: Why can't I login to the web even though the User and password are correct ? Pin
ZurdoDev14-Jan-20 16:52
professionalZurdoDev14-Jan-20 16:52 
AnswerRe: Why can't I login to the web even though the User and password are correct ? Pin
Richard Deeming10-Jan-20 2:32
mveRichard Deeming10-Jan-20 2:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.