Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Adding the FCKeditor HTML Editor

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #41  
Old 05-04-2009, 07:49 AM
 
rayjohnson rayjohnson is offline
 

Member
  
Join Date: Apr 2009
Posts: 17
 

Default Re: Adding the FCKeditor HTML Editor

Hi Vetrievel...how did you add the editor to your textarea.tpl? That would fix my issue with the xtended tabs....

Thanks,
Ray
__________________
v 4.2.1
Reply With Quote
  #42  
Old 08-14-2009, 01:29 PM
  Charon's Avatar 
Charon Charon is offline
 

Newbie
  
Join Date: Aug 2009
Location: Chicago
Posts: 9
 

Default Re: Adding the FCKeditor HTML Editor

Thanks phil I have this working for the most part but using the newest version of fckeditor and 4.2.2 I get this error in the resource browser

Error creating folder "redirect:/dispatcher.php/" (Can't create redirect: directory)

all the other functionality seems to be correct and working. Has anyone else come across this. It's not a big issue since they don't need the resource browser but it would be handy functionality.

Thanks for any thoughts!
__________________
X-Cart 4.2.3
----------
AOM, RMA, Survey, Magnifier,
Offers, Comparison, Affiliate,
Fancy Categories, Gift
Reply With Quote
  #43  
Old 08-14-2009, 02:04 PM
 
PhilJ PhilJ is offline
 

X-Guru
  
Join Date: Nov 2002
Posts: 4,094
 

Default Re: Adding the FCKeditor HTML Editor

Charon, hmm, maybe try creating a new directory in the store root named 'userfiles'. Then make it writable (CHMOD 777)
__________________
xcartmods.co.uk
Reply With Quote
  #44  
Old 08-14-2009, 04:06 PM
  Charon's Avatar 
Charon Charon is offline
 

Newbie
  
Join Date: Aug 2009
Location: Chicago
Posts: 9
 

Default Re: Adding the FCKeditor HTML Editor

Phil,

I already have the directory and its writeable. I think it has something to do with where it wants to start the resource browser (maybe like a default start point) that is not there I have looked at dispatcher.php but that seems to be not the problem. I will have to dig into it a little deeper. But thank you so much for the whole idea since I was going to have to write a php solution to non-ftp-centric users for the ability to add images to the site and use them in the variables and static pages. Whew saved me HOURS of work!!!!

Thanks again
__________________
X-Cart 4.2.3
----------
AOM, RMA, Survey, Magnifier,
Offers, Comparison, Affiliate,
Fancy Categories, Gift
Reply With Quote
  #45  
Old 08-14-2009, 04:17 PM
  Charon's Avatar 
Charon Charon is offline
 

Newbie
  
Join Date: Aug 2009
Location: Chicago
Posts: 9
 

Default Re: Adding the FCKeditor HTML Editor

phil,

Also FYI, I noticed also that in 4.2.2 if you use this on the languages page in admin you will get a <TEXTAREA> empty error unless you enclose the <script> in {if $smarty.get.language ne ""}...{/if} statement. This seems to stem from the fact that the default language is not loaded into the select box at the top of the page even if you have a default language displayed. Don't know why it doesn't load and select the language you have as default but no biggie this will work around that little issue.
__________________
X-Cart 4.2.3
----------
AOM, RMA, Survey, Magnifier,
Offers, Comparison, Affiliate,
Fancy Categories, Gift
Reply With Quote
  #46  
Old 08-21-2009, 06:29 AM
  Charon's Avatar 
Charon Charon is offline
 

Newbie
  
Join Date: Aug 2009
Location: Chicago
Posts: 9
 

Default Re: Adding the FCKeditor HTML Editor

Phil,

I noticed something about using the fckeditor on the system, if you use the editor on all the language variable boxes, which does slow down the load considerably, it encloses plain text in either <p>, <div>, or <br> so this can have some ill effects. Take for example you open the languages page and select your language, it loads the page and diplays the first x number of variables. Now since fckeditor starts in wysiwyg mode, you don't notice that it has enclsoed all of the plain text in the first x variables inside tags. Now if you just edit one of those first variables and go to the bottom and click update all (why isnt it update selected anyway?) it has now updated all of the first x variables with the tags. So then if in your css you have the base <div>, <p>, or <br> tags with any styles on them, those styles now overwrite the styles you might have intended for these variables.

I took a look in the editor config and it doesn't seem to allow you to turn that feature off, just change what it is enclosing them in.

Just thought it was worth noting.

@ashley
you can get it working in the webmaster mode but it takes a lot of finagling to get it not to blank out the text in the textarea, kinda strange behavior.
__________________
X-Cart 4.2.3
----------
AOM, RMA, Survey, Magnifier,
Offers, Comparison, Affiliate,
Fancy Categories, Gift
Reply With Quote
  #47  
Old 08-25-2009, 11:40 AM
 
Primordial Performance Primordial Performance is offline
 

Advanced Member
  
Join Date: Oct 2007
Posts: 49
 

Default Re: Adding the FCKeditor HTML Editor

This might be slightly off-thread-topic, but related enough that I bet someone here has the answer at hand.

I've created some custom pages in the admin area to add new page types, using tinymce editor for the main field. Only problem is that HTML is being deleted. Does anyone know where in xcart the HTML is stripped out of form fields so that maybe I can code in an exception for my own stuff?

The pages in question are for editing simple "pages"...I include:
require "./auth.php";
require $xcart_dir."/include/security.php";
...but the code is otherwise all my own.
__________________
Primordial Performance X-cart 4.2.10
Modules: Advanced Order Management, Checkout_one, Discount Coupons, Extra Fields, FedEx Rates, FedEx Ship, FedEx Subscription, FedEx Track, HTML Editor, Order Tracking, On-Sale, and X-Affiliate,
BCSE Reward Points System,
Upselling Products,
Product Options,
Reply With Quote
  #48  
Old 09-10-2009, 09:54 AM
 
webeditors webeditors is offline
 

Member
  
Join Date: Jul 2009
Posts: 20
 

Default Re: Adding the FCKeditor HTML Editor

I'm having a problem uploading images using fckeditor. If I try to upload an image from my computer it just hangs forever, and if I try to browse to the server, i get this error message:

The requested URL /ckfinder/ckfinder.html was not found on this server.

Any ideas?
__________________
www.webeditors.com
4.2.1 or 4.2.2
Reply With Quote
  #49  
Old 09-10-2009, 07:24 PM
  Vetrivel's Avatar 
Vetrivel Vetrivel is offline
 

eXpert
  
Join Date: Apr 2008
Posts: 398
 

Default Re: Adding the FCKeditor HTML Editor

Have you provided the right path in the CONFIG file inside the FCK editor folder.
PHP Code:
fckeditor/editor/filemanager/connectors/php/config.php 
.



Quote:
Originally Posted by webeditors
I'm having a problem uploading images using fckeditor. If I try to upload an image from my computer it just hangs forever, and if I try to browse to the server, i get this error message:

The requested URL /ckfinder/ckfinder.html was not found on this server.

Any ideas?
Reply With Quote
  #50  
Old 09-27-2009, 11:02 PM
 
benz benz is offline
 

Senior Member
  
Join Date: Oct 2007
Posts: 111
 

Default Re: Adding the FCKeditor HTML Editor

The latest release of FCKeditor has been renamed to CKEditor, its a nice upgrade from the old one - one nice feature is that the textarea by default is resizeable, so passing in height and width parameters to the editor instance isn't always needed anymore.

When installing it the invocation process has changed a little bit. Follow the instructions at the start of this thread for downloading and installing on your server, using ckeditor instead of fckeditor for filepaths.

Now when you want to turn a textarea into an editor the javascript is different - there are 2 ways you do this.

1. Similar to the original method, insert some javascript after the textarea but with a new syntax eg for the skin1/main/product_details.tpl changes you would now use
Code:
{if $active_modules.FCKEditor ne ""} <script type="text/javascript"> CKEDITOR.replace('descr'); CKEDITOR.replace('fulldescr'); </script> {/if}
You can also customise the editor as you call it, read this article for more http://docs.fckeditor.net/CKEditor_3.x/Developers_Guide/Toolbar

2. Add the "ckeditor" class any text area you want to use as an editor. This is my preferred method, you can either edit the textarea.tpl file to always have this class, or just add it in for only the textareas that need it (which is what I do, it can be a bit dangerous adding it everywhere!). To add it in just to the full description field on a product page look in skin1/main/product_details.tpl for this line
Code:
{include file="main/textarea.tpl" name="fulldescr" cols=45 rows=12 class="InputWidth" data=$product.fulldescr width="80%" btn_rows=4}

and add in the ckeditor class as follows
Code:
{include file="main/textarea.tpl" name="fulldescr" cols=45 rows=12 class="InputWidth ckeditor" data=$product.fulldescr width="80%" btn_rows=4}

WARNING: Ckeditor is still in its early days, one feature that doesn't yet work out of the box with this new version is the image/file uploading - from what I can gather this is scheduled for release around December 2009. In the interim if you want to upload images with the new version you can purchase a plugin from them or write your own upload script for it. I think I'll be waiting
__________________
Version 4.1.8
Version 4.1.11
Reply With Quote

The following user thanks benz for this useful post:
PhilJ (09-28-2009)
Reply
   X-Cart forums > X-Cart 4 > Dev Questions


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 02:57 AM.

   

 
X-Cart forums © 2001-2020