Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 666595
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T23:50:08+00:00 2026-05-13T23:50:08+00:00

So, I’m working with CKEditor and jQuery, trying to build a pop-out editor. Below

  • 0

So, I’m working with CKEditor and jQuery, trying to build a pop-out editor.
Below is what I have coded so far, and I can’t seem to get it working the way I want it to.
Basically, click the ‘Edit’ link, dialog box pops up, with the content to edit loaded into the CKEditor.

Also, not required, but helpful if you can suggest how to do it. I can’t seem to find out how to make the save button work in CKEditor (though I think the form will do it).

Thanks in advance for any help.

$(document).ready(function(){
    var config = new Array();
    config.height = "350px";
    config.resize_enabled = false;
    config.tabSpaces = 4;
    config.toolbarCanCollapse = false;
    config.width = "700px";
    config.toolbar_Full = [["Save","-","Cut","Copy","Paste","-","Undo","Redo","-","Bold","Italic", "-", "NumberedList","BulletedList","-","Link","Unlink","-","Image","Table"]];

    $("a.opener").click(function(){
        var editid = $(this).attr("href");
        var editwin = \'<form><div id="header"><input type="text"></div><div id="content"><textarea id="content"></textarea></div></form>\';

        var $dialog = $("<div>"+editwin+"</div>").dialog({
            autoOpen: false, 
            title: "Editor", 
            height: 360, 
            width: 710, 
            buttons: {
                "Ok": function(){
                    var data = $(this).val();
                }
            }  
        });
 //$(this).dialog("close");

        $.getJSON("ajax/" + editid, function(data){
            alert("datagrab");
            $dialog.("textarea#content").html(data.content).ckeditor(config);
            alert("winset");
            $dialog.dialog("open");
        });

        return false;
    });
});
  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T23:50:09+00:00Added an answer on May 13, 2026 at 11:50 pm

    After doing some more digging and research, I have hacked together a working solution to my problem. I’m posting here in case anyone else needs to do something like this:

    function redirect(url, outsite){if(outsite){location.href = url;}else{location.href = 'http://siteurl.com/' + url;}}
    
    function editdialog(editid){
        var editwin = '<div><form action="formprocess/'+editid+'" method="post" class="inform"><div id="editorheader"><label for="coltitle">Column Title: </label><input type="text" name="coltitle" id="coltitle"></div><br><div id="editorcontent"><textarea id="ckeditcolcontent"></textarea></div><input type="hidden" value="edit"></form></div>';
        var $dialog = $(editwin).dialog({
            autoOpen: false, title: "Editor", 
            height: 520, width: 640, 
            closeOnEscape: false, modal: true, 
            open: function(event, ui){
                $(this).parent().children().children(".ui-dialog-titlebar-close").hide();
            }, 
            buttons: {
                "Save and Close": function(){
                    var editor = $("#ckeditcolcontent").ckeditorGet(); 
                    var coltitle = $("#coltitle").val(); 
                    var colcontent = $("#ckeditcolcontent").val(); 
                    $.post("formprocess/"+editid, {
                            coltitle: coltitle, 
                            colcontent: colcontent
                        }, function(data){
                            redirect(location.href, 1);
                        }
                    );
                }, 
                "Cancel": function(){
                    redirect(location.href, 1);
                }
            }
        });     
    
        $.getJSON("ajax/" + editid, function(data){
            $("#coltitle").attr("value", data.header); 
                $("#ckeditcolcontent").val(data.content).ckeditor(config);
                $("<div></div>").addClass("ui-widget-overlay").appendTo(document.body).css({width:$(document).width(),height:$(document).height()});
            $dialog.dialog("open");
        }); 
    }
    
    var config = new Array();
    config.height = "280px"; 
    config.resize_enabled = false; 
    config.tabSpaces = 4; 
    config.toolbarCanCollapse = false; 
    config.width = "600px";
    config.toolbar_Full = [["Cut","Copy","Paste","-","Undo","Redo","-","Bold","Italic","Underline", "-", "NumberedList","BulletedList","-","Link","Unlink","-","Image","Table"]];
    
    $(document).ready(function(){
        $("a.admineditlink").click(function(){
            var editid = $(this).attr("href"); 
            editdialog(editid); 
            return false;
        });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a text area in my form which accepts all possible characters from
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.