Tell me more ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

How do i use ckeditor.

I downloaded it, and extracted followed the guide on how to load and configure
ckeditor, but. It doesn't explain on how it saves. This is what is one the guide.

As stated above, the editor works just like a field. This means that when submitting a form containing an editor instance, its data will be simply posted, using the element name as the key to retrieve it.

For example, following the above example, we could create the following PHP code:

<?php
    $editor_data = $_POST[ 'editor1' ];
?>

I don't know where to save this.

could someone provide a detailed howto?

Thanks in advanced :)

share|improve this question

closed as not a real question by John Conde Jan 25 at 0:21

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, see the FAQ.

1 Answer

You don't need to use the PHP method since you can call upon the replace within a SCRIPT. Checkout the below code.

Try this

<html>
<head>
<title>Sample CKEditor Site</title>
<script type="text/javascript" src="/ckeditor/ckeditor.js"></script>
</head>
<body>
<form method="post">
    <p>
        My Editor:<br />
        <textarea id="editor1" name="editor1">&lt;p&gt;Initial value.&lt;/p&gt;</textarea>
        <script type="text/javascript">
            CKEDITOR.replace( 'editor1' );
        </script>
    </p>
    <p>
        <input type="submit" />
    </p>
</form>

share|improve this answer
But, how do i save the edits made on the page? – blade19899 Jan 25 at 11:47

Not the answer you're looking for? Browse other questions tagged or ask your own question.