X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Adding the FCKeditor HTML Editor (https://forum.x-cart.com/showthread.php?t=29771)

rayjohnson 05-04-2009 07:49 AM

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

Charon 08-14-2009 01:29 PM

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!

PhilJ 08-14-2009 02:04 PM

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)

Charon 08-14-2009 04:06 PM

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!!!! 8O

Thanks again :D

Charon 08-14-2009 04:17 PM

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.

Charon 08-21-2009 06:29 AM

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.

Primordial Performance 08-25-2009 11:40 AM

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.

webeditors 09-10-2009 09:54 AM

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?

Vetrivel 09-10-2009 07:24 PM

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?


benz 09-27-2009 11:02 PM

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 :-)

ccicorp 10-16-2009 06:28 PM

Re: Adding the FCKeditor HTML Editor
 
May I ask what the instructions are to replace the homepage editor with the fckeditor? I have it functional in the other locations per the instructions at the beginning of this thread.
Much thanks

designtheweb 10-21-2009 11:07 PM

Re: Adding the FCKeditor HTML Editor
 
I'm using HTML in extra fields, is there any code I need to do in skin1/modules/extrafields/product_modify.tpl to use FCKeditor? Has anyone tried this?

Hyperdelicious 10-23-2009 06:01 PM

Re: Adding the FCKeditor HTML Editor
 
I'm trying to use CKEditor in x-cart 4.2.1 ... the editor is in place and appears on the specified pages however... when I attempt to make updates, I get logged out of the admin panel... any ideas?

scratch that... the issue was bot related to CKEditor

presson83 11-05-2009 12:41 PM

Re: Adding the FCKeditor HTML Editor
 
Quote:

Originally Posted by Charon
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!


I'm having this same issue in 4.2.2. Has anyone figured it out?

***** SOLVED ******

In order for it to work I had to not only set the path on line 33 of editor/filemanager/connectors/php/config.php, but I ALSO HAD TO SET THE ABSOLUTE PATH on line 39 ($Config['UserFilesAbsolutePath']) to the userfiles folder. Now it works like a charm in 4.2.2!!

ccicorp 11-13-2009 08:55 AM

Re: Adding the FCKeditor HTML Editor
 
We are having issues with the editors stripping out source code. We have added an additional 4 fck editors to the product_details.tpl. Two additional and two to replace the meta editors. The first two editors work perfect ('descr') and ('fulldescr'). The other 4 editors are the problem. They work on our developers computers, but from nowhere else. It sounds like a security issue, but have been unable to find anything.

Any thoughs? This is a real problem for us!!

dmpinder 04-30-2010 03:57 AM

Re: Adding the FCKeditor HTML Editor
 
Hey everyone,

I'm using Gold 4.3.1 which has CKEditor built in. Unfortunately there's no facility to upload images into the editor - which I've been told the original CKEditor can do. Does anyone know how to enable this function?

Many thanks,

Darren

PhilJ 06-30-2010 04:48 AM

Re: Adding the FCKeditor HTML Editor
 
Here's an easier alternative to CKFinder - http://kcfinder.sunhater.com

dmpinder 06-30-2010 12:22 PM

Re: Adding the FCKeditor HTML Editor
 
Hey,

Sorry I didn't update this thread. I spoke to X-Cart Support who wanted to charge me a few hundred to install the full FCK Editor (with Image upload), so I decided for that price to try myself first. I installed the editor from scratch and now I have it working with Image Upload facility. If anyone is interested in replicating this then I could PM you the instructions I wrote down as I was doing it, hopefully you can do it too.

I would recommend you look into proper solutions before doing this custom add-on, I haven't tested all possibilities to make sure it works fully, I just got it working and left it alone.

Darren

nickff 11-01-2011 07:42 AM

Re: Adding the FCKeditor HTML Editor
 
Hey Everyone,

I find it hard to believe that after all these years, none of the HTML editors (even in 4.4.4) have the ability to upload images from within the editor.

To get this feature in future versions, please vote on this update!

http://ideas.x-cart.com/forums/32109-x-cart-future-versions/suggestions/2359114-image-uploader-within-html-editor?ref=title

luckystorex 12-27-2011 04:03 AM

Re: Adding the FCKeditor HTML Editor
 
hi.
I need free X-cart template. any idea???

ARW VISIONS 12-27-2011 08:46 AM

Re: Adding the FCKeditor HTML Editor
 
Free?? what is that??

PhilJ 10-02-2012 02:35 PM

Re: Adding the FCKeditor HTML Editor
 
Here's another editor, but very lightweight, with image uploader :)


All times are GMT -8. The time now is 03:11 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.