Post by Johnathan » Sun Oct 17, 2010 3:30 am

Personally, I despise CKEditor. Today I was trying to add an image and set some CSS classes on it, and it was an exercise in frustration. So, I figured out this quick fix to disable CKEditor. If you're comfortable with HTML and hate CKEditor, then I recommend doing the following:

Rename the folder /admin/view/javascript/ckeditor to something else. I use "-ckeditor" so that I can still remember what the folder is for, in case I want to restore its functionality. You'll probably want to add some CSS to make the textarea for descriptions bigger. You can do this in /admin/view/stylesheet/stylesheet.css -- I used this:

Code: Select all

#description1 {
	width: 600px;
	height: 300px;
	font-family: monospace;
}
I haven't tested this thoroughly, but I haven't noticed any problems in the little bit I've using it this way. The HTML you enter in descriptions still comes through fine, and the image uploader still works. If anyone runs into problems doing this mod, let me know.

Let's hope CKEditor is replaced in 1.5.0!

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by Rabbitdigital » Thu Jul 28, 2011 6:46 pm

Hi Johnathan,

I also hate CKEditor, it keeps messing up my html and css, I tried to disable it but then couldn't even edit the code so it didn't work I'm afraid, btw I'm using Opencart 1.5

It would be great to be able to set the default to code editor and not WYSIWIG which is what keeps reformatting the code and adding tags in where they shouldn't be!

Thanks
Warren

User avatar
New member

Posts

Joined
Sun Jul 03, 2011 7:10 pm

Post by mevsme » Tue Jan 10, 2012 9:25 pm

I fed up with that ckeditor too. Custom adding tags and spaces - realy stupid thing.

Newbie

Posts

Joined
Tue Jan 10, 2012 9:24 pm

Post by Qphoria » Tue Jan 10, 2012 9:50 pm

Johnathan wrote: Let's hope CKEditor is replaced in 1.5.0!
Replaced by what? We tried this once before but couldn't agree on an editor.
ZenCart offers the ability to add additional editors and lets you choose which to use but that seems like overkill considering how large ckeditor's footprint is..it would just be more wasted space.

But maybe a good, lightweight one would be useful. There are many out there but none that we've found to be perfect.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Johnathan » Tue Jan 10, 2012 10:25 pm

I haven't really done much research -- if I was confident it would be implemented in the next version I would spend the time doing it, but knowing how hard it is to get Daniel on board with new ideas, I don't really want to waste my time finding a better one that won't be used.

I keep telling myself I'll sit down and search around when I get some free time, but of course that hasn't happened yet. :)

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by Qphoria » Wed Jan 11, 2012 1:48 am

Johnathan wrote:I haven't really done much research -- if I was confident it would be implemented in the next version I would spend the time doing it, but knowing how hard it is to get Daniel on board with new ideas, I don't really want to waste my time finding a better one that won't be used.

I keep telling myself I'll sit down and search around when I get some free time, but of course that hasn't happened yet. :)
Well there is that 10% chance that he can be swayed with the right research results. If not today then within the next 2 years :)

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Johnathan » Wed Jan 11, 2012 2:00 am

Qphoria wrote:Well there is that 10% chance that he can be swayed with the right research results. If not today then within the next 2 years :)
:laugh:

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by Qphoria » Wed Jan 11, 2012 2:23 am

Ok from my 20min research:

http://premiumsoftware.net/cleditor/ - jQuery based, lightweight, uses sprite for images, looks better than jwysiwyg
http://jejacks0n.github.com/mercury/# - html5 based but complex
http://www.nicedit.com/index.php - Nicest looking site, uses sprite for images, powerful, but dead project
http://www.techtricky.com/jquery-wysiwyg-html-editors/ - jQuery based, medium weight but that means more features.

Kinda like the first one best at the moment. Has plugin support, so it is expandable, and no extra html from what I can see. Think I might vQmod it in to try it in my cart

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Johnathan » Wed Jan 11, 2012 11:46 pm

I agree, of those (and a few others I'm aware of) I like CLEditor best. The only issue I can see would be integrating the image editor with the image manager, but since it's plug-in based I would imagine it wouldn't be too much of a task. Let me know if you get a vQmod working!

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by DragonJ » Wed Feb 22, 2012 3:54 am

Sorry to resurrect an old thread, but I've just come to the realization the ckeditor is responsible for adding tons of extra tags and characters and general bloat to my product descriptions and I want it gone! I used plain text/html with osCommerce product descriptions for the better part of a decade and needless to say, it just works so I'd like to use that method with OC.

Is the suggestion (above) for removing ckeditor the proper way to remove it? This is the only thread I found in which people despise ckeditor. Unfortunately, there isn't an official "how to remove ckeditor" thread so I want to make sure this method won't break anything. I'm running v1.5.1.3.

My store is awesomely powered by OpenCart 1.5.5.1.


User avatar
Active Member

Posts

Joined
Sun Jan 29, 2012 4:49 pm

Post by Johnathan » Wed Feb 22, 2012 5:50 am

It may be an old thread, but it's still relevant in my opinion. :) If you want to actually remove CKEditor, just remove that "ckeditor" folder instead of renaming it. Technically, you should remove all the references to it in the admin template files so you don't get javascript warnings, but it doesn't hurt anything to leave them in. (I still just use plain HTML to code all my own product descriptions and information pages.)

If I get time, I may see about integrating CLEditor and replacing CKEditor.

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by DragonJ » Thu Feb 23, 2012 5:11 am

I removed it and the "Description" field in the product editor is gone. ???

My store is awesomely powered by OpenCart 1.5.5.1.


User avatar
Active Member

Posts

Joined
Sun Jan 29, 2012 4:49 pm

Post by Johnathan » Thu Feb 23, 2012 11:43 pm

It works for me...is it completely gone, or do you have a small textarea box with the data?

Attachments

Screen Shot 2012-02-23 at 10.42.15 AM.png

Screen Shot 2012-02-23 at 10.42.15 AM.png (49.26 KiB) Viewed 6312 times


Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by DragonJ » Sat Feb 25, 2012 7:05 pm

Sorry for the delay. Sometimes this forum doesn't send me a notification that someone has replied to my thread. Here is what my admin screen looks like when I remove or rename the /admin/view/javascript/ckeditor folder.

Image

My store is awesomely powered by OpenCart 1.5.5.1.


User avatar
Active Member

Posts

Joined
Sun Jan 29, 2012 4:49 pm

Post by DragonJ » Sun Feb 26, 2012 3:15 am

This is interesting. The "lost" field is caused by the Firebug plugin for Firefox. It took a while to narrow it down, but now the description field shows up.

The next issue: Now that the editor is no longer hijacking all the product descriptions, is there a way to make OC not convert characters before putting them into the database? For example, if my description field contains this...

<p>This is the product description.</p>

...when I check the database with phpMyAdmin it looks like this...

<p>This is the product description.</p>

I do a lot of bulk editing with phpMyAdmin and all of my product descriptions (over 4,000 of them) include html tags such as <p><ul><li> and this conversion to "entity" code (or whatever it's called) makes this job a nightmare.

My store is awesomely powered by OpenCart 1.5.5.1.


User avatar
Active Member

Posts

Joined
Sun Jan 29, 2012 4:49 pm

Post by Johnathan » Sun Feb 26, 2012 4:31 am

The database needs to do that, I believe, to store the data correctly. I could be wrong...but in any case, you'd have to remove all the htmlentities() and html_entity_decode() functions in all the core files to change it, which probably isn't worth it.

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by obiwahn » Wed May 09, 2012 7:05 am

Today ckeditor destroyed a whole daywork. No way to use this in a productive environment.
So I removed it. Awesome. Works great. Thank you!

Some suggestions:

1.) enable tabs in the textarea to write well-arranged html code. add following code to \admin\view\template\catalog\information_form.tpl and the product_form.tpl in the <script area at the bottom:

Code: Select all

$("textarea").keydown(function(e) {
    if(e.keyCode === 9) { // tab was pressed
        // get caret position/selection
        var start = this.selectionStart;
            end = this.selectionEnd;

        var $this = $(this);

        // set textarea value to: text before caret + tab + text after caret
        $this.val($this.val().substring(0, start)
                    + "\t"
                    + $this.val().substring(end));

        // put caret at right position again
        this.selectionStart = this.selectionEnd = start + 1;

        // prevent the focus lose
        return false;
    }
});
2.) do the css more accurate, so you do not change all desriptions:

e.g. for info and product desriptions :

Code: Select all

[name*=information_description][name*="[description]"] 
{
width: 800px;
   height: 800px;
   font-family: monospace;
}
[name*=product_description][name*="[description]"] 
{
	width: 800px;
   height: 300px;
   font-family: monospace;
}

Newbie

Posts

Joined
Wed Nov 16, 2011 1:45 am

Post by storm-cloud » Sun May 17, 2015 3:22 pm

I just wanted to add an alternate method as I found disabling CKEditor completely caused issues with other modules.

After many many hours of trying various solutions, I found the best method was to simply add the line below in the config file. This forces CKEditor into source mode by default.

Code: Select all

CKEDITOR.config.startupMode = 'source';
I also found that I had to disable the custom theme for this to work correctly by commenting out the lines below.

Code: Select all

// config.extraPlugins = 'codemirror';
// config.codemirror_theme = 'rubyblue';
As a personal preference I also removed all the toolbar buttons except maximize.

Active Member

Posts

Joined
Wed Feb 22, 2012 8:07 am
Who is online

Users browsing this forum: No registered users and 65 guests