WYSIWYG online editors

Thread Solved

Join Date: Sep 2006
Posts: 16
Reputation: sunflowerz is an unknown quantity at this point 
Solved Threads: 0
sunflowerz's Avatar
sunflowerz sunflowerz is offline Offline
Newbie Poster

WYSIWYG online editors

 
0
  #1
Jan 15th, 2007
Hi there!

I am currently creating a website that needs to be editable by the client and have been looking into free online WYSIWYG editors. I have been focusing on FCKeditor, but also looking into TinyMCE.

I managed to partly integrate FCKeditor - it saves the text, but doesn't display it at the start. I am not using it with a database, could that be why it's not working properly?

Any suggestions/comments (good or bad) on free online WYSIWYG editors avaliable?

- Thanks.
Reply With Quote Quick reply to this message  
Join Date: Oct 2005
Posts: 521
Reputation: pty is on a distinguished road 
Solved Threads: 37
pty's Avatar
pty pty is offline Offline
Posting Pro

Re: WYSIWYG online editors

 
0
  #2
Jan 15th, 2007
What exactly was the problem you're having with FCKEditor?

Of the open-source ones FCKEditor and TinyMCE seem to be the best for general development and Kupu is geared at Zope/Plone and that kind of stuff.

There are a few proprietary ones (a quick google will no-doubt find them) but I'd try the open ones first - you have nothing to lose that way and I'm sure one of them will do the job
Note to self... pocket cup
Reply With Quote Quick reply to this message  
Join Date: Sep 2006
Posts: 16
Reputation: sunflowerz is an unknown quantity at this point 
Solved Threads: 0
sunflowerz's Avatar
sunflowerz sunflowerz is offline Offline
Newbie Poster

Re: WYSIWYG online editors

 
0
  #3
Jan 16th, 2007
Hi pty.

I've also tried out having a main page with a submit button that then sends the file name (as a hidden field) to the page with the editor and then putting it into a variable, but no result.

I'm using the JavaScript version of the editor and working in PHP. Should I be using the PHP version of the editor?

The pages and code is as follows:


Admin page (admin/index.php page)

in head:
<script type="text/javascript" src="/FCKeditor/fckeditor.js"></script>


in body:
<div id="content">
<form method="post" action="savefile.php">
<script type="text/javascript">
var oFCKeditor = new FCKeditor('FCKeditor1');
oFCKeditor.BasePath = "/FCKeditor/";
oFCKeditor.Value = "<?php include('../test/test.html') ?>";
oFCKeditor.Create();
</script>
<input type="submit" value="Submit!" />
</form>
</div><!-- end content -->
Save File page (admin/savefile.php page)
<?php
$newContent = stripslashes($_POST['FCKeditor1']);
 
$fileLocation = "../test/test.html";
 
$fh = fopen($fileLocation, 'w') or die("Sorry, can't open file...");
 
$stringData = $newContent;
 
 
fwrite($fh, $stringData);
 
fclose($fh);
 
?>
Viewed page (test/index.php)
<div id="content"><?php include('test.html'); ?></div><!-- end content -->
Content file (test/test.html)
<h1>Welcome!</h1>
<p> Lorem ipsum dolor sit…</p>
- sunflowerz
Reply With Quote Quick reply to this message  
Join Date: Sep 2006
Posts: 16
Reputation: sunflowerz is an unknown quantity at this point 
Solved Threads: 0
sunflowerz's Avatar
sunflowerz sunflowerz is offline Offline
Newbie Poster

Re: WYSIWYG online editors

 
0
  #4
Jan 20th, 2007
Hi!
I have just worked out why it didn't work... the editor wants the code all on one line... strangely the output from the editor is not on one line... hmmm...

I also changed code for editor to:

[php] <script type="text/javascript">
<?php
print "var oFCKeditor = new FCKeditor('FCKeditor1');
oFCKeditor.BasePath = '/FCKeditor/';
oFCKeditor.Value = '";
include('../test/test.html');
print "';
oFCKeditor.Create();"; ?>
</script>[/php]
- sunflowerz
Reply With Quote Quick reply to this message  
Join Date: Oct 2005
Posts: 521
Reputation: pty is on a distinguished road 
Solved Threads: 37
pty's Avatar
pty pty is offline Offline
Posting Pro

Re: WYSIWYG online editors

 
0
  #5
Jan 22nd, 2007
Originally Posted by sunflowerz View Post
Hi!
I have just worked out why it didn't work... the editor wants the code all on one line... strangely the output from the editor is not on one line... hmmm...

I also changed code for editor to:

[php] <script type="text/javascript">
<?php
print "var oFCKeditor = new FCKeditor('FCKeditor1');
oFCKeditor.BasePath = '/FCKeditor/';
oFCKeditor.Value = '";
include('../test/test.html');
print "';
oFCKeditor.Create();"; ?>
</script>[/php]
Ah, nice one. I wouldn't have thought it'd cause a problem
Note to self... pocket cup
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 1
Reputation: MoonKa is an unknown quantity at this point 
Solved Threads: 0
MoonKa MoonKa is offline Offline
Newbie Poster

Re: WYSIWYG online editors

 
0
  #6
Mar 18th, 2008
But.. i do your example and show me a mistake....my code is:

<?php
$oFCKeditor = new FCKeditor('TextArea') ;
$oFCKeditor->BasePath = 'FCKEditor/';
$oFCKeditor->Width = '700' ;
$oFCKeditor->Height = '500' ;

// this is my mistake.. i want to include pag2.php in the textarea... please help me!!!
$oFCKeditor->Value = '";
include('/templates/indexk.html');"';
$oFCKeditor->Create() ;

?>
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Existing Scripts Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC