Click here to Skip to main content
14,696,609 members
Home » Discussions » ASP.NET
   

ASP.NET

 
AnswerRe: Dynamically updating the site with progress bar Pin
David Mujica29-Jan-20 6:57
MemberDavid Mujica29-Jan-20 6:57 
QuestionHow to I fix "The method or operation is not implemented"? Pin
Member 1140330424-Jan-20 9:59
MemberMember 1140330424-Jan-20 9:59 
AnswerRe: How to I fix "The method or operation is not implemented"? Pin
Blikkies26-Jan-20 22:48
professionalBlikkies26-Jan-20 22:48 
QuestionHow to use FCKeditorV2 instead of FreeTextBox ? Pin
Member 245846714-Jan-20 21:41
MemberMember 245846714-Jan-20 21:41 
SuggestionRe: How to use FCKeditorV2 instead of FreeTextBox ? Pin
Richard Deeming15-Jan-20 1:51
mveRichard Deeming15-Jan-20 1:51 
GeneralRe: How to use FCKeditorV2 instead of FreeTextBox ? Pin
jkirkerx15-Jan-20 11:24
professionaljkirkerx15-Jan-20 11:24 
GeneralRe: How to use FCKeditorV2 instead of FreeTextBox ? Pin
Member 245846715-Jan-20 16:17
MemberMember 245846715-Jan-20 16:17 
GeneralRe: How to use FCKeditorV2 instead of FreeTextBox ? Pin
jkirkerx16-Jan-20 8:26
professionaljkirkerx16-Jan-20 8: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 22:04
MemberMember 245846716-Jan-20 22:04 
GeneralRe: How to use FCKeditorV2 instead of FreeTextBox ? Pin
jkirkerx17-Jan-20 7:55
professionaljkirkerx17-Jan-20 7:55 
GeneralRe: How to use FCKeditorV2 instead of FreeTextBox ? Pin
Richard Deeming16-Jan-20 2:33
mveRichard Deeming16-Jan-20 2:33 
JokeRe: How to use FCKeditorV2 instead of FreeTextBox ? Pin
ZurdoDev16-Jan-20 4:55
mveZurdoDev16-Jan-20 4:55 
GeneralRe: How to use FCKeditorV2 instead of FreeTextBox ? Pin
jkirkerx16-Jan-20 8:34
professionaljkirkerx16-Jan-20 8:34 
Question.Net Core 2.2.4 - Getting IHostingEnvironment in Program.cs Main Pin
jkirkerx14-Jan-20 11:24
professionaljkirkerx14-Jan-20 11:24 
AnswerMessage Closed Pin
23-Mar-20 4:09
MemberNerea Clark23-Mar-20 4:09 
QuestionHtmlagilitypack -- I'm stuck Pin
Member 175325011-Jan-20 6:40
MemberMember 175325011-Jan-20 6:40 
QuestionHow do I fix System.Net.Mail.SmtException: 'Cannot get IIS pickup directory' error? Pin
Member 1140330410-Jan-20 10:19
MemberMember 1140330410-Jan-20 10:19 
AnswerRe: How do I fix System.Net.Mail.SmtException: 'Cannot get IIS pickup directory' error? Pin
Richard MacCutchan10-Jan-20 12:37
mveRichard MacCutchan10-Jan-20 12:37 
AnswerRe: How do I fix System.Net.Mail.SmtException: 'Cannot get IIS pickup directory' error? Pin
ZurdoDev11-Jan-20 10:03
mveZurdoDev11-Jan-20 10:03 
QuestionHow do I fix 'object' does not contain a definition for 'Value'? Pin
Member 1140330410-Jan-20 9:27
MemberMember 1140330410-Jan-20 9:27 
AnswerRe: How do I fix 'object' does not contain a definition for 'Value'? Pin
ZurdoDev10-Jan-20 10:09
mveZurdoDev10-Jan-20 10:09 
QuestionWhy can't I login to the web even though the User and password are correct ? Pin
Member 24584679-Jan-20 22:43
MemberMember 24584679-Jan-20 22:43 
AnswerRe: Why can't I login to the web even though the User and password are correct ? Pin
ZurdoDev10-Jan-20 2:00
mveZurdoDev10-Jan-20 2:00 
GeneralRe: Why can't I login to the web even though the User and password are correct ? Pin
Member 245846714-Jan-20 17:19
MemberMember 245846714-Jan-20 17:19 
GeneralRe: Why can't I login to the web even though the User and password are correct ? Pin
ZurdoDev14-Jan-20 17:52
mveZurdoDev14-Jan-20 17:52 

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.