Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

CKEDITOR post into a DIV

Posted on 2013-12-21
7
Medium Priority
?
407 Views
Last Modified: 2014-02-18
Hi,

I  try to post async a CKEDITOR form (ckeditor.com) into a div or CFDIV  (coldfusion)

Here is my code
<form>
<textarea name="editor1">someText</textarea>
<input type="submit">
</form>
		
		



<div name="result" id="result">
</div>

<script src="../ckeditor/ckeditor.js"></script>
<script>
	CKEDITOR.replace( 'editor1',

{
	toolbar: [
		{ name: 'document', items: [ 'Source', '-', 'NewPage', 'Preview','Save'] },	// Defines toolbar group with name (used to create voice label) and items in 3 subgroups.
		[ 'Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo' ],			// Defines toolbar group without name.
			{ name: 'insert', items: [ 'Image', 'Table', 'HorizontalRule', 'SpecialChar', 'PageBreak', ] },		
																		// Line break - next group will be placed in new line.
		{ name: 'basicstyles', items: [ 'Bold', 'Italic' , 'Underline', 'Strike', 'Subscript', 'Superscript', '-', 'RemoveFormat' ] },
		{ name: 'colors', items: [ 'TextColor', 'BGColor' ] },
		
		
		
	]
});</script>

Open in new window


I try a lot of things but when i change value and post the form nothing change.

Thanks in advance.
0
Comment
Question by:quarkmike
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
7 Comments
 
LVL 53

Expert Comment

by:Scott Fell, EE MVE
ID: 39733932
I don't know CF, but when you are posting the data, remember, ck editor is just making your text area (<textarea name="editor1">someText</textarea>) pretty.

You still have to post the data someplace and then display it.  Either another page, the current page and accept the data via your server side code to a database, variable or cookie.
0
 

Author Comment

by:quarkmike
ID: 39734025
The issue is Ckeditor don't act like a classic textarea if i post asynch a classic textarea everything works fine but when i post a ckeditor textarea the data still the same and don't care about the modification i made.
0
 
LVL 53

Expert Comment

by:Scott Fell, EE MVE
ID: 39734130
If you are posting async to another page and it works, that means it is working.  If you post normally and you don't see the extra html it creates, then something is wrong with your code that receives the data.  

To test, please create a page with a text area without ckeditor and post the data to the same page.  Make sure you have your cold fusion page set up to accept the post.  If that does not work, you know it is your own code.  If it does work, add back the code for ckeditor.  Just use the basic for now like
CKEDITOR.replace( 'editor1', {
    toolbar: 'Basic'
});

Open in new window

Now, submit again and what happens?  Select a work and make it bold and submit.  Do you see the extra code wrapped in strong or b?
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:quarkmike
ID: 39734376
If i post normally (not async) everything works fine or don't work only if i post it async to a div. Using coldfusion.ajaxsubmit, or coldfusion.navigate or jquery.
0
 
LVL 53

Expert Comment

by:Scott Fell, EE MVE
ID: 39735355
You can use jquery to post the async.  http://api.jquery.com/jQuery.post/  Look at the example $.post( "test.php", $( "#testform" ).serialize() );

That will post to the page test.php using the form with the id testform.
0
 
LVL 16

Accepted Solution

by:
Gurpreet Singh Randhawa earned 2000 total points
ID: 39737478
please do not use cfdiv, it will create more problems rather than solution,

u want to post data from the cfeditor to div or div data to ckeditor, i am unclear of your questions, please confirm, so i can proceed with valid solution regards
0
 

Author Comment

by:quarkmike
ID: 39737486
I can use a div don't need a cfdiv if there is a solution to save data in file or dbase.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Sometimes databases have MILLIONS of records and we need a way to quickly query that table to return the results me need. Sure you could use CFQUERY but it takes too long when there are millions of records. That is why SOLR was invented. Please …
Recently while working on a project I got a very annoying cfdocument has no body error message. I had never seen this error before. So I checked the code. The code was pretty simple; it was Just showing me the cfdocumnt tag and inside that tag a …
The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question