CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> Tips & Solutions

 the simplest way to implement fckeditor in ccs

Print topic Send  topic

Author Message
ssk

Posts: 1
Posted: 06/23/2006, 5:08 AM

All you have to do is to add the following code manually at the begining of your htlm document:


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

window.onload = function()
{
var sBasePath = './fckeditor/' ;

var oFCKeditor = new FCKeditor('textarea_name') ;
oFCKeditor.BasePath = sBasePath ;
oFCKeditor.Width = '600px';
oFCKeditor.Height = '400px';
oFCKeditor.ReplaceTextarea() ;



}

</script>
And in the htlm:
<textarea id="textarea_name" name="textarea_name" rows="3" cols="10"></textarea>

One more thing is to enter into the "src" and in the "sBasePath" the correct path to the fckeditor folder. In my example the fckeditor folder in directly in the root folder.

That's all.......
I hope I've been usefull....

;-)
View profile  Send private message
Damian Hupfeld
Posted: 06/25/2006, 2:54 AM

Many of you probably use Windows as your local/development machine and linux
as your live server... One thing to remember is that Windows and Linux
address relative path names slightly differently!

"ssk" <ssk@forum.codecharge> wrote in message
news:25449bd9a183f08@news.codecharge.com...
> All you have to do is to add the following code manually at the begining
> of your
> htlm document:
>
>
> <script type="text/javascript" src="./fckeditor/fckeditor.js"></script>
> <script type="text/javascript">
>
> window.onload = function()
> {
> var sBasePath = './fckeditor/' ;
>
> var oFCKeditor = new FCKeditor('textarea_name') ;
> oFCKeditor.BasePath = sBasePath ;
> oFCKeditor.Width = '600px';
> oFCKeditor.Height = '400px';
> oFCKeditor.ReplaceTextarea() ;
>
>
>
> }
>
> </script>
> And in the htlm:
> <textarea id="textarea_name" name="textarea_name" rows="3"
> cols="10"></textarea>
>
> One more thing is to enter into the "src" and in the "sBasePath" the
> correct
> path to the fckeditor folder. In my example the fckeditor folder in
> directly
> in the root folder.
>
> That's all.......
> I hope I've been usefull....
>
> ;-)
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>

marcwolf


Posts: 361
Posted: 06/26/2006, 5:26 AM

If you have several text area's to work on - having multiple copies of the FCK toolbar can use a lot of space.

What we often do is to have a hidden field on the form that holds the formatted text, and also display it inside of a div.

When FCK is called - it appears in a popup window and the hidden field contents is passed to the editor.

After the editor closes - the changed html is re-inserted into the hidden field and then the contents of the hidden field is displayed in the div.

It works for us very well..
Take care

Marcwolf
_________________
' Coding Coding Coding
Keep Those Keyboards Coding.
Raw Code!!!!!!!
View profile  Send private message
marcwolf


Posts: 361
Posted: 06/26/2006, 5:26 AM

Seems to be an issue with the forum - BulkEmail error
_________________
' Coding Coding Coding
Keep Those Keyboards Coding.
Raw Code!!!!!!!
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.