Jump to content

problem with the fckeditor , help please .


crazy.works
 Share

Recommended Posts

hello ,

 

well , it is my first time to use  fckeditor in my scripts because i still try to make my way on the php programming

 

so about the  fckeditor , i downloaded the files from

http://sourceforge.net/project/downloading.php?group_id=75348&filename=FCKeditor_2.6.2.zip

 

then i put the fckeditor  folder with php file in folder called editor

 

in the php file just a normal simple textarea with the fckeditor  codes that i saw on the documentation

 

so here is my code , please help me to find why the editor and the texarea didnt appear in my browser

 

-------------------------------------

 

<?php

include_once("fckeditor/fckeditor.php") ;

?>

 

 

<html >

 

<head>

<title>New Page 1</title>

</head>

 

<body>

 

<form method="POST" action="submit.php">

<p> </p>

<p> </p>

<p><textarea rows="15" name="world" cols="56"></textarea></p>

<p><input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p>

 

<?php

 

$oFCKeditor = new FCKeditor ("world") ;

$oFCKeditor->BasePath = 'fckeditor/' ;

$oFCKeditor->Value = '<p>This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</p>' ;

$oFCKeditor->Create() ;

?>

 

 

</form>

 

</body>

</html>

 

------------------------------------------

 

and here is othere code that i got by friend on mine and it didnt work too

 

 

-------------------------

 

 

<script type="text/javascript" src="fckeditor/fckeditor.js"></script>

<script type="text/javascript" src="fckeditor/fckconfig.js"></script>

 

<html >

 

<head>

<title>New Page 1</title>

</head>

 

<body>

 

<form method="POST" action="submit.php">

<p> </p>

<p> </p>

<p><textarea rows="15" name="world" cols="56"></textarea></p>

<p><input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p>

 

</form>

 

<script type="text/javascript">

var oFCKeditoren = new FCKeditor ( "world");

oFCKeditoren.BasePath = "fckeditor/";

oFCKeditoren.Height = 300 ;

oFCKeditoren.ReplaceTextarea();

</script>

 

 

</body>

</html>

 

--------------------------------

 

please help me to find the error

 

thanks

Link to comment
Share on other sites

You need everything. Just dump the fckeditor (whole folder). The files named:

    fckconfig.js

    fckeditor.js

    fckeditor.php

    fckeditor_php4.php

    fckeditor_php5.php

need to be there.

then you need this folder:

<editor> in the folder that contains those files.

 

Without the .js files, it will never work. those are the actual editor and config files.

I have a couple projects that have fckeditor, so if you need further help, just ask.

Link to comment
Share on other sites

oh ok i think i made all of that ,

 

so please i have some thing to ask about

 

just can u upload for me  compress file that include the fckeditor with php file in it the normal textarea code that u tested on your localhost , just to try it and to know the error  and the problem in my files please ?? :(

Link to comment
Share on other sites

oh ok thanks

 

so i have other thing to ask about ,

 

i got other editor and it called TinyMCE , u can download it from here  http://tinymce.moxiecode.com/download.php

 

so it works very well and i didnt got problem with it like the fckeditor .

 

about my question , if my code will be like that

 

-------------

 

<html >

<head>

<title>New Page 1</title>

 

<script type="text/javascript" src="tiny_mce/tiny_mce_gzip.js"></script>

<script type="text/javascript">

tinyMCE_GZ.init({

plugins : 'style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,'+

        'searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras',

themes : 'simple,advanced',

languages : 'en',

disk_cache : true,

debug : false

});

</script>

 

<!-- Needs to be seperate script tags! -->

<script type="text/javascript">

tinyMCE.init({

mode : "textareas",

theme : "advanced"

});

 

</script>

 

</head>

<body>

<form method="POST" action="submit.php">

<p> </p>

<p> </p>

<p><textarea rows="15" name="world" cols="56"></textarea></p>

<p><input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p>

</form>

</body>

</html>

 

---------------------------

 

and it works good and the editor appear

 

so how will i save the form data on the database and what code will i  use to show the data with other php file ?

Link to comment
Share on other sites

iam saying this because when i made the form as i show u and i made the submit.php file to receive the data and to show it

 

the submit.php file in it that code

 

<?

$cool = $_POST['world'];

echo $cool;

?>

 

simple and easy , just receive the data from the textarea and showing it but i got problem

 

it show the text that i write with the preference ,font size , color , every thing is ok , but when i add pic with the the form in the textarea

 

it didnt appear on the submit.php file 

 

if the image link was on the textarea like http://localhost/1.jpg

it appear on the submit.php fie like that  http://localhost/2/tinymce/1.jpg%5C%22

 

so please can u tell me why it being like that ?

Link to comment
Share on other sites

This thread is more than a year old. Are you sure you have something important to add to it?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.