How do I get my cftextarea richeditor to work in a subfolder

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • NBushnell
    New Member
    • Dec 2010
    • 2

    How do I get my cftextarea richeditor to work in a subfolder

    So this is the code I am using...
    Code:
    <cfform name="badassForm" method="post" action="saveBadassForm.cfm" id="badassForm">
    <cftextarea name="txtMessage" height="800" width="600" richtext="yes" value="#myText#"></cftextarea>
    </cfform>
    I am trying to use the cftextarea with the rich text editor on my site but it is not the root folder of the site. when I did a test page in the root folder it worked great, but when I added it to a sub folder it doesn't show up, it just looks like a normal textarea without any of the toolbars. I checked the source code for the page and it is trying to reference javascript files...

    Code:
    <script type="text/javascript">_cf_loadingtexthtml="<img alt=' ' src='/CFIDE/scripts/ajax/resources/cf/images/loading.gif'/>";
    _cf_contextpath="";
    _cf_ajaxscriptsrc="/CFIDE/scripts/ajax";
    _cf_jsonprefix='//';
    _cf_clientid='AC8C7239192C5A2E9A2640030EF324F8';</script><script type="text/javascript" src="/CFIDE/scripts/ajax/messages/cfmessage_en_US_.js"></script>
    <script type="text/javascript" src="/CFIDE/scripts/ajax/package/cfajax.js"></script>
    <script type="text/javascript" src="/CFIDE/scripts/ajax/package/cfrichtexteditor.js"></script>
    <script type="text/javascript" src="/CFIDE/scripts/ajax/FCKeditor/fckeditor.js"></script>
    <script type="text/javascript" src="/CFIDE/scripts/cfform.js"></script>
    <script type="text/javascript" src="/CFIDE/scripts/masks.js"></script>
    I think that is where the problem is. How can I tell it where to find this CFIDE folder. I tried doing this...

    Code:
    <cfset strFullPath = GetBaseTemplatePath()>
    <cfset strServerDir = GetDirectoryFromPath(strFullPath)>
    <cftextarea name="txtMessage" height="800" width="600" richtext="yes" value="#myText#" [B]basepath="#strServerDir#[/B]">
    Anyone had this problem or have a fix?
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    Try setting the basepath (cftextarea). Failing that, try the cfajaximport tag.

    The CFIDE folder is relative to the web root.

    Comment

    Working...