Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - RTE Integration + Textarea postback issues
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Forum LockedRTE Integration + Textarea postback issues

 Post Reply Post Reply
Author
lostcontrol View Drop Down
Groupie
Groupie


Joined: 13 January 2006
Status: Offline
Points: 58
Post Options Post Options   Thanks (0) Thanks(0)   Quote lostcontrol Quote  Post ReplyReply Direct Link To This Post 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?
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
lostcontrol View Drop Down
Groupie
Groupie


Joined: 13 January 2006
Status: Offline
Points: 58
Post Options Post Options   Thanks (0) Thanks(0)   Quote lostcontrol Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
lostcontrol View Drop Down
Groupie
Groupie


Joined: 13 January 2006
Status: Offline
Points: 58
Post Options Post Options   Thanks (0) Thanks(0)   Quote lostcontrol Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.