Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
130
rated 0 times [  133] [ 3]  / answers: 1 / hits: 25938  / 12 Years ago, tue, august 28, 2012, 12:00:00

I am trying to integrate the ckeditor into my website written in java with play2.



Now I downloaded the javascript files and read though the samples.



I figured that the important part is ckeditor.js



<script type=text/javascript src=/assets/javascripts/ckeditor.js></script>


I also used the exact same form from the samples



<form action=sample_posteddata.php method=post>
<label for=editor1>
CKEditor using the <code>docprops</code> plugin and working in the Full Page mode:</label>
<textarea cols=80 id=editor1 name=editor1 rows=10>&lt;html&gt;&lt;head&gt;&lt;title&gt;CKEditor Sample&lt;/title&gt;&lt;/head&gt;&lt;body&gt;&lt;p&gt;This is some &lt;strong&gt;sample text&lt;/strong&gt;. You are using &lt;a href=http://ckeditor.com/&gt;CKEditor&lt;/a&gt;.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</textarea>
<script type=text/javascript>
//<![CDATA[

CKEDITOR.replace( 'editor1',
{
fullPage : true,
extraPlugins : 'docprops'
});

//]]>
</script>
<p>
<input type=submit value=Submit />
</p>
</form>


But it doesn't work, it just renders a normal textarea. I am using twitter bootstrap + jquery 1.7.1.



Maybe I overlooked an important part?



enter


More From » ckeditor

 Answers
26

You just need to use this script



<script type=text/javascript>
CKEDITOR.replace(editor1);
</script>

[#83369] Monday, August 27, 2012, 12 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
jocelynkarsynr

Total Points: 472
Total Questions: 98
Total Answers: 96

Location: Macau
Member since Mon, Nov 16, 2020
4 Years ago
jocelynkarsynr questions
Tue, Feb 8, 22, 00:00, 2 Years ago
Sat, Jul 11, 20, 00:00, 4 Years ago
Sun, May 10, 20, 00:00, 4 Years ago
Sat, Jan 18, 20, 00:00, 4 Years ago
;