473,387 Members | 1,516 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

FCKEditor and ASP.NET

Has anyone had any success using ASP.NET with FCKEditor?
Mar 7 '06 #1
2 1390
Quite a few people have. If you are looking for a Rich Text Box
editor, check out this blog post and associated comments for a list of
great RTB controls (some pay, some free).

http://scottonwriting.net/sowblog/posts/4252.aspx

HTH,
Darren Kopp
http://blog.secudocs.com/

Mar 7 '06 #2

Well, I didn't have much success using the library file he supplied for it.
But I manged to get it working anyway. While scanning through a number of
documents and discussion boards on FCKEditor and ASP.NET I made three
discoveries:

1) The editor had a function that can convert an HTML Text Area into an
HTML I-Frame object and, subsequently, use it as an HTML editor.

2) Multi-line TextBox objects (ASPX) appear as HTML Text Areas on the
client side that have the same object or ID reference.

3) I can register client-side script with the "behind code" for each ASPX
page.

So, to make it all work I:

A) Copied the "FCKEditor" folder into the folder of the web application.

B) Created a multi-line textbox in my ASPX page ("txtBox1" in this case)

C) Registered the following client-side scripts within my VB code:

Private Sub ClientScriptFCKJSLib()
'Register _JavaScript block for centering panel objects on the screen
Dim JavaScriptCode as String = "

RegisterClientScriptBlock("FCKJSLib", JavaScriptCode)
End Sub

Private Sub ClientScriptFCKActivate()
'Register _JavaScript block for Search Incident button (HTML Control)
Dim JavaScriptCode as String = "
&"function ActivateFCKEditor(objName)"& vbCRLF _
&"{"& vbCRLF _
&" var oFCKeditor = new FCKeditor( objName ) ;"& vbCRLF _
&" oFCKeditor.BasePath = './FCKeditor/' ;"& vbCRLF _
&" oFCKeditor.Height = 300 ;"& vbCRLF _
&" oFCKeditor.Width = 600 ;"& vbCRLF _
&" oFCKeditor.ReplaceTextarea() ;"& vbCRLF _
&"} //--> </SCRIPT>"& vbCRLF

If IsClientScriptBlockRegistered("FCKJSLib") Then
RegisterClientScriptBlock("FCKActivate", JavaScriptCode)
End If
End Sub

Private Sub StartupScriptFCKRun()
'Register _JavaScript block for Search Incident button (HTML Control)
Dim JavaScriptCode as String = "
&" ActivateFCKEditor('txtBox1');"& vbCRLF _
&"//--> </SCRIPT>"& vbCRLF

If (IsClientScriptBlockRegistered("FCKJSLib") AND
IsClientScriptBlockRegistered("FCKActivate")) Then
RegisterStartupScript("FCKRun", JavaScriptCode)
End If

End Sub

The first two functions are executed in the Page_Load function. The last
function is supposed to be associated with a command button to activate the
editor.

It's a round-about way but it works.

"Darren Kopp" <da********@gmail.com> wrote in message
news:11**********************@e56g2000cwe.googlegr oups.com...
Quite a few people have. If you are looking for a Rich Text Box
editor, check out this blog post and associated comments for a list of
great RTB controls (some pay, some free).

http://scottonwriting.net/sowblog/posts/4252.aspx

HTH,
Darren Kopp
http://blog.secudocs.com/

Mar 8 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Ronald | last post by:
Hi, I'm am trying to implement FCKeditor in my webapplication, but unfortunatly, I haven't succeeded in doing this. After almost a week, I finally got an compiled application, but now I get some...
4
by: Showjumper | last post by:
Has anyone been able to get FckEditor for dotnet to work successfully? I consulted google groups for past post on the matter but found onlu a few posts relating to it and still wasnt able to get it...
0
by: Gerry | last post by:
FCKeditor appears to be a good product. Unfortunately, the documentation is severaly lacking. (Due to this?)I am having a problem and I have a question. Problem: FCKeditor appears to function...
0
by: Stanley Cheung | last post by:
Hello all, Any one tried to implement fckeditor (htmleditor) on your application? i am tring to add fckeditor (www.fckeditor.net) on my dotnet application, but i can't find any connector for...
5
by: Jeff | last post by:
Hey ASP.NET 2.0 lets say I have a web page containing a FCKeditor, when this page loads it will fill the FCKeditor with some kind of text... I'm wondering how to set this text in the...
0
by: beemer127 | last post by:
Hello: I'm really new to both .NET and SQL, and I am still learning. I have the FCKeditor working, meaning that it displays in my page, and I have the SQL connection string established, but I'm...
1
by: Archana1 | last post by:
hi I want to add fckeditor in asp. but it have some error like page can not be display Please reply urgently my code is: <!-- #include...
1
by: ShirishKumar | last post by:
Hi, I have some problem with FCKEditor . First of all Required FiledValidator is not working for FCKeditor . I searched google and kept EnableClientScript of requiredfieldvalidator for...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.