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 8576765
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T19:59:55+00:00 2026-06-11T19:59:55+00:00

Hey guys I’m implementing a page that has about 9 separate divs on it

  • 0

Hey guys I’m implementing a page that has about 9 separate divs on it that I want each to be separately editable using ckeditor. The page is being dynamically generated through php with codeigniter but I want a user to be able to make changes to the HTML before finalizing it. I have currently implemented ckeditor to edit divs as demonstrated here: http://nightly.ckeditor.com/7614/_samples/divreplace.html

However after the user is done I want to be able to save the HTML on my server since I will be converting the page to a PDF using wkhtmltopdf. As you can see on the example once you click any of the divs it opens a new editor. I need a way to submit the changes when the user is done editing the page and because I am trying to pdf the resulting HTML i cannot include a button or similar element. I am also worried that since in this example you can’t hide all the editors you can only open a new one that the PDF will show the ckeditor box. I was thinking that I could just grab the document on a javascript event and send it via ajax request to a php function that would save it to a file and then PDF the file but I am unsure how to trigger the html submit event or replace the remaining edit box. Any suggestions?

  • 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-06-11T19:59:56+00:00Added an answer on June 11, 2026 at 7:59 pm

    You can simply wrap the content you’d like to convert to PDF into a div, and serialize it into a hidden field when the form is submitted:

    <form id="yourForm" method="post" action="foo">
        <!-- This DIV will be serialized... -->
        <div id="yourContentToBeSaved">
            <!-- Your editors go here... -->
            <div class="editable">
                Foo
            </div>
            <div class="editable">
                Bar
            </div>
            ...
        </div>
        <input id="hidden" type="hidden" />
        <button type="submit">Serialize the DIV, then save the form</button>
    </form>
    

    jQuery code:

    $( '#yourForm' ).submit(function() {
        // Destroy all the editors.
        for( var instance in CKEDITOR.instances )
            CKEDITOR.instances[ instance ].destroy();
    
        // Store #yourContentToBeSaved HTML in a hidden field. You can 
        // retrieve these data with PHP on the server-side once the form is submitted.
        $( '#hidden' ).val( $( '#yourContentToBeSaved' ).html() );
    });
    

    Voilà!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hey guys (and gals) I'm having a problem using Assembly GetExportedTypes() in .NET 4.0.
Hey guys got an issue with Cakephp validation.. I want to know why is
Hey guys I have about 8 fieldSets and Im iterating over a list. I
Hey guys i want to use the jquery Autocomplete plugin and instead of separating
Hey guys I am making a terminal application using Swing and Apache Commons. I
Hey guys I just noticed that my join statement here SELECT * FROM reports
Hey guys i am currently working on an android app that will allow me
Hey guys I want to be able to replace a tuple in a list
hey guys i wanna ask a question about sending data to database to server
Hey guys I'm using python and I was just wondering how we can make

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.