| Author |
Topic Search Topic Options
|
lostcontrol
Groupie
Joined: 13 January 2006
Status: Offline
Points: 58
|
Post Options
Thanks(0)
Quote Reply
Topic: RTE Integration + Textarea postback issues Posted: 22 May 2006 at 12:10pm |
|
Hello,
Just some issues I faced while trying out RTE for the a few days.
I planned to use RTE in dynamic pages created by a system so i placed RTE in a folder and then Included the required file. I wanted all the pages, located in different directories, to use the RTE without the need of having to place a copy of the RTE directory within each od those page's folders.
So, I came round the issue of Include Files and made the required changes for the editor to work. The problem now is with JavaScripts that either are included in a page or call functions such as the pop-ups for adding images, changing font etc. I think it would be a good idea to include a variable somewhere in the settings of the RTE to indicate the root path to the RTE folder. This way, RTE can be used as described above with the minimum requirement of just changing a few Include Files declarations.
For now, how can I edit the functions that call the pop-up windows in RTE? Since its all in different directories it cannot display any of those pages.
Second, I have noticed that when RTE is used and Javascript disabled the text submitted through the textarea is not filtered at all allowing the user to post preaty much anything. Is there a way to prevent this?
|
 |
WebWiz-Bruce
Admin Group
Web Wiz Developer
Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
|
Post Options
Thanks(0)
Quote Reply
Posted: 22 May 2006 at 6:15pm |
|
Many weeks were spent trying to make the RTE so that it could run in it's own folder and still be simple to integrate into a users site. But the two just didn't seem to go hand in hand were the RTE is concerned. So you will need to place the RTE files into the same folder as the file you want to include the RTE within, if you try and place the RTE files in their own folder and link to them you will have ALLOT of issues, not just the ones you mention.
There is no filtering done when you submit the RTE becauase it is not built to handle any submission, it is built as an empty container you are supposed to use to turn an already existing textarea in your own web forms into an RTE textarea.
You need to write your own web forms and code for handling the form submission. The reason for this is so that you can use the RTE in an existing web form you already have, and not as a full standalone ASP application.
|
|
|
 |
lostcontrol
Groupie
Joined: 13 January 2006
Status: Offline
Points: 58
|
Post Options
Thanks(0)
Quote Reply
Posted: 24 May 2006 at 1:39pm |
|
Regarding having RTE in one directory and be used by different pages in any other directory I have made some changes and now it works just fine. So, here it goes for anyone interested:
RTE_Setup.asp
In this file insert the following. Change as required to point to your RTE direstory
Dim rd_RTE_RootDir rd_RTE_RootDir="/components/rte/"
RTE_editor_inc.asp
Replace src=""RTE_File Name.asp"" with src="""&rd_RTE_RootDir&"RTE_File Name.asp"" everywhere in this document.
RTE_javascript.asp
Same as above
----------
In the page where you want RTE to appear, use: <!--#include virtual="/components/rte/RTE_editor_inc.asp" -->
Thats pretty mush it! As I wasn't documenting the changes I made at the time, I might have missed a page that also needs to be adited the same way as RTE_editor_inc.asp and RTE_javascript.asp, but i doubt it.
Further more. If you want your editor to save images and files in different directories depending on where it appears, do the following.
RTE_setup.asp
Comment out the following lines 'Const strFileUploadPath= "\rte\files" 'Const strImageUploadPath = "\rte\images"
Add Dim rd_AliasVar 'Do some work here and specify a value for rd_AliasVar depending on your needs
Dim strFileUploadPath strFileUploadPath= "\rte\"&rd_AliasVar&"\files
Dim strImageUploadPath strImageUploadPath = "\rte\"&rd_AliasVar&"\images"
--------------------------------
Thanks for clarifying the issue for not filtering the text Borg, I though I was missing something.
|
 |
WebWiz-Bruce
Admin Group
Web Wiz Developer
Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
|
Post Options
Thanks(0)
Quote Reply
Posted: 24 May 2006 at 1:49pm |
|
The problem with doing this is that if you upload images and files the paths may not be correct when you submit the form.
It's not such a problem in IE as IE will re-write the links itself, but if you use other browsers then this can be a big issue.
|
|
|
 |
lostcontrol
Groupie
Joined: 13 January 2006
Status: Offline
Points: 58
|
Post Options
Thanks(0)
Quote Reply
Posted: 24 May 2006 at 2:00pm |
|
I have tested it both with Firefox and IE. It seems that the images appear as they should. I dont know whether or not other browsers will cause issues with this.
|
 |
WebWiz-Bruce
Admin Group
Web Wiz Developer
Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
|
Post Options
Thanks(0)
Quote Reply
Posted: 24 May 2006 at 5:05pm |
|
Trust me, they do.
This was the problem I found when trying to make the RTE work in it's own folder.
On the surface it appears to be quite simple, but because the RTE uses the web browsers own RTE API it can be a bit unpredictable, and lots of small issues can to light with various browsers, that I spent weeks trying to sort out so make the RTE work in it's own folder.
|
|
|
 |