I am using CKEditor 4.0.1.1 full version and would like to add a Title or Subject text (just like this forum post screen) but I just can't quite figure out how to include the Title or Subject field in the submission. My code is:
<form action="" id="formID" method="post">
<input id="title" name="title" placeholder="Title" type="text" class="input-large"><br />
<textarea name="editor1"><p>Initial value.</p></textarea>
<p> <button class="btn btn-primary btn-large" onclick="test();" style="margin-top: 10px;">Post</button></p>
<script>
CKEDITOR.replace( 'editor1' );
</script>
</form>
and the function test():
function test()
{
var data = CKEDITOR.instances.editor1.getData();
$.post('makePost.php', {
content : data
})
}
Currently the CKEditor info is passed along correctly, I just can't get the title input field to submit too. Is there any easier way than I am doing it?
I appreciate anyone pointing me in the right direction.