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

  • SEARCH
  • Home
  • 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 753991
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T14:57:39+00:00 2026-05-14T14:57:39+00:00

Greetings, Overflowers! I am writing an application in PHP that will allow for editing

  • 0

Greetings, Overflowers!

I am writing an application in PHP that will allow for editing various blocks of content via a button that loads a CKEditor Instance inside a jQuery-UI Modal Dialog box.

I’ve got the button working to launch the Dialog, as shown in these screenshots:

Edit Button

alt text

The example shows the ‘Main Content’ content inside the Dialog ready to edit. The way I’m doing this presently is a hack simply for demo purposes – I have duplicate content hard-coded into the hidden #dialog div.

What I’d like to be able to do is have it so that when the ‘Edit Main Content’ button is pushed, all content (HTML, Styling, Etc) gets passed by jQuery into the CKEditor instance for edit, and when a ‘Save/Submit’ button is pressed inside the dialog, the changes are saved via Ajax as well as passed back into the page being edited.

I’m not too concerned about the Ajax bit at this point, as I’ll be needing to use the WordPress Ajax API, which is outside the scope of this question.

The main thing, though, is to pass data from the ‘Main_Content’ div -into- the #dialog when the ‘Edit Main Content’ button is clicked, and then pass the edited data from the #dialog window back into the ‘Main_Content’ div after a ‘Save Changes’ button is pressed.

Any help will be greatly appreciated! I’m totally stuck.

Thanks!

~PF

  • 1 1 Answer
  • 0 Views
  • 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-14T14:57:40+00:00Added an answer on May 14, 2026 at 2:57 pm

    Sounds like you’re looking for the html function.

    To pass the data from the ‘Main_Content’ div -into- the #dialog when the ‘Edit Main Content’ button is clicked:

    $('#edit-main-content-button').click(function() {
        var content = $('#Main_Content').html();
        $('#dialog').html(content);
    });
    

    To pass the edited data from the #dialog window back into the ‘Main_Content’ div after a ‘Save Changes’ button is pressed would look like:

    $('#dialog').dialog({
        /*
        your other settings/buttons
        */
        buttons: {
            'Save Changes': function() {
                // TODO: submit changes to server via ajax once its completed:
                var content = $(this).html();
                $('#Main_Content').html(content);
                $(this).dialog('close');
            }
        }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Greetings Overflowers, Is there an SQL DBMS that allows me to create an indexed
Greetings Overflowers, What is wrong with this PHP code: <?php define(DB_FILE, sqlite:database.sql); define(QUERY, INSERT
Greetings! I have a Repeater control that's using an XmlDataSource control. <asp:FormView id=myFormView runat=server
Greetings Everyone. I'm currently writing a multi-language programe in C, C++ and fortran on
Greetings, I'm working on a game project that uses a 3D variant of hexagonal
Greetings, What control in Visual C# 2008 would allow me to set a path
Greetings Stack Overflow community. I'm trying to make a function that can pop all
Greetings, I've taken over from a prior team and writing ETL jobs which process
Greetings, I have a view based application project where I have created an NSObject
Greetings! I am working on an AS2 website with MovieClips for pages that swap

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.