I have been trying this for a long while and I still can't figure out how to embed CKE into a form in php :-/
Furthermore, there is no luck trying to searcheven 'php'.
I have this in my header.php:
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="description" content="A short description." />
<meta name="keywords" content="put, keywords, here" />
<title>PHP-MySQL forum</title>
<link rel="stylesheet" href="style.css" type="text/css">
<script type="text/javascript" src="/ckeditor/ckeditor.js"></script>
</head>
and the following in another file called create_topic.php:
<?php
include header.php
---more lines---
echo 'Message: <br /><textarea id="post_content" name="post_content" /></textarea><br /><br />
<input type="submit" value="Create topic" />
echo '<script type=\"text/javascript\"> '; <--line 67!
echo 'CKEDITOR.replace( \'post_content\', ';
echo '</script> ';
---more lines---
?>
what I have understood is that to execute javascript lines in php you need to use echo 'code'; and fix the special characters with a \ (backslash). But the output is not what i expect:
Parse error:Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /create_topic.php on line 67
I suspect that I am mishandling the echo function and there is some problems with the first '<' before the word 'script'.
The sample files work fine!!!
I hope somebody can help!! Thanks
Wed, 08/31/2011 - 20:10
#1
Re: how do I set CKEditor into a php?
echo 'Message: <br /><textarea id="post_content" name="post_content" /></textarea><br /><br />
<input type="submit" value="Create topic" />";
$ckeditor = new CKEditor();
$ckeditor->basePath = '/ckeditor/'; <-- line #69
$CKEditor->editor("post_content", "This is some sample text");
which results in:
Warning: Division by zero in /create_topic.php on line 69
files structure:
/posting/create_topic.php
/poting/ckeditor/
css install into my project
I added css and js files to my project , after adding the css fles the font changed, sizes of frames changed and more
how can i fix this