Jump to content

Recommended Posts

A simple add-on to let you place a WYSIWYG HTML editor onto your site’s admin.

 

CKEditor 4

Proven, enterprise-grade WYSIWYG HTML editor with wide browser compatibility, including legacy browsers.

  • Paste from Word and Excel, spell check, accessibility checker, tables.

  • Autocomplete, @mentions, widgets, code snippets, emoji 😊 plugins.

  • Full control over content: HTML filtering, view source mode.

  • Great accessibility: WCAG 2.0 AA and Section 508 compliant.

  • Long-term support (LTS) until 2023.

For Phoenix simply copy new files into the required places and your done.

You can if you like do it the old fashion way as in the frozen method below.

 

For frozen it’s a simple edit of one template file, open :-

public_html/admin/includes/template_bottom.php and just before the </body> add this code,

 

<script src="https://cdn.ckeditor.com/4.12.1/standard/ckeditor.js"></script>
                <script>
                CKEDITOR.replace( "products_description[1]" ); 
                CKEDITOR.replace( "manufacturers_description[1]" );
				CKEDITOR.replace( "categories_description[1]" );
				</script>

That’s it your done. If you go to admin and edit a product you will see the WYSIWYG HTML editor on the product description box.

This is just a simple application of the editor you can expand it as much as you like.

It has been tested on Phoenix 1.0.2.0 only. It should however work on other versions and frozen

 

Enjoy.

image.thumb.png.f6e36dad03c1adb3c0b3792a626f4fd3.png


 

Share this post


Link to post
Share on other sites

Well done Zahid!

I am now using a custom built ckeditor.js which includes support for Bootstrap Tabs and iframes. These two features are really good for generating nice product descriptions.

Share this post


Link to post
Share on other sites

Excellent addon @JcMagpie

We need more addon like yours to boost Phoenix since there are very few addons and the core of Phoenix is awesome!

Best regards

Valqui


Please do not falsify my words. Are you interested in knowing who does it? Send me a PM.

The Phoenix Club won't allow me to join - why not?

Setting up a new Frozen site with so many nice addons available on the market. 

:heart: Community Oscommerce fan :heart:

 

Share this post


Link to post
Share on other sites

Good morning Zahid @JcMagpie.

I was testing the addon on my new Frozen test site and it didn't work. Is this addon only for Phoenix?

Best regards

Valqui

Edited by valquiria23

Please do not falsify my words. Are you interested in knowing who does it? Send me a PM.

The Phoenix Club won't allow me to join - why not?

Setting up a new Frozen site with so many nice addons available on the market. 

:heart: Community Oscommerce fan :heart:

 

Share this post


Link to post
Share on other sites
28 minutes ago, valquiria23 said:

Is this addon only for Phoenix?

I have only tested on Phoenix 1.0.2.2 but it should work on anything as admin side has not changed. However for frozen you must do the edit.


 

Share this post


Link to post
Share on other sites

Your public_html/admin/includes/template_bottom.php  should be like this

<?php
/*
  $Id$

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2010 osCommerce

  Released under the GNU General Public License
*/
?>

</div>

<?php require('includes/footer.php'); ?>

<br />
<script src="https://cdn.ckeditor.com/4.12.1/standard/ckeditor.js"></script>
                <script>
                CKEDITOR.replace( "products_description[1]" ); 
                CKEDITOR.replace( "manufacturers_description[1]" );
				CKEDITOR.replace( "categories_description[1]" );
				</script>
</body>
</html>

 


 

Share this post


Link to post
Share on other sites

Good morning Zahid.

I found the problem !!
My site is in Spanish, I had to change

CKEDITOR.replace ("products_description [1]");
to
CKEDITOR.replace ("products_description [2]");

That made the aditor appear!

Thank you very much Zahid for your excellent support and addon !!!

regards

Valqui


Please do not falsify my words. Are you interested in knowing who does it? Send me a PM.

The Phoenix Club won't allow me to join - why not?

Setting up a new Frozen site with so many nice addons available on the market. 

:heart: Community Oscommerce fan :heart:

 

Share this post


Link to post
Share on other sites
12 hours ago, kgtee said:

Well done Zahid!

I am now using a custom built ckeditor.js which includes support for Bootstrap Tabs and iframes. These two features are really good for generating nice product descriptions.

Hi @kgtee

Changing

<script src="https://cdn.ckeditor.com/4.12.1/standard/ckeditor.js"></script>

for 

<script src="https://cdn.ckeditor.com/4.12.1/full-all/ckeditor.js"></script>

You can insert iframes and also have many more options that are enabled in the editor.

Best regards.
Valqui


Please do not falsify my words. Are you interested in knowing who does it? Send me a PM.

The Phoenix Club won't allow me to join - why not?

Setting up a new Frozen site with so many nice addons available on the market. 

:heart: Community Oscommerce fan :heart:

 

Share this post


Link to post
Share on other sites
6 minutes ago, valquiria23 said:

You can insert iframes and also have many more options that are enabled in the editor.

Yes you can I only added the standerd to keep is simple. You can also add many plugins to improve them also.


 

Share this post


Link to post
Share on other sites
On 9/8/2019 at 10:35 PM, JcMagpie said:

It has been tested on Phoenix 1.0.2.0 only. It should however work on other versions and frozen

Yes but ^^^^

Share this post


Link to post
Share on other sites

1.0.2.5 is NOT other versions of Frozen but that mute, as i just installed on 1.0.2.5 from scratch and look works out of box!

image.png.63ac3be551f2d34def26ba614a323a8a.png

image.png.96674d7878bfbdbfe4de7cb78f7277b6.png


 

Share this post


Link to post
Share on other sites

If I was to take a guess your either got a js conflict or have installed the hook in wrong place! It needs to be in

public_html/includes/hooks/admin/siteWide/ckedit.php


 

Share this post


Link to post
Share on other sites

Anyone installing this to add discriptions to osC CE should remember that your site is responsive! So anything you add using CK must also be resposive or you will have none responsive product_info page.

Also if editing in <> code then make sure to check as a missing closing </> tag can brake your site or worse as it's beeing saved in db.


 

Share this post


Link to post
Share on other sites

Tested on Phoenix 1.0.3.0 only but both email and news letter work fine. Now your email and letters can be more than plain text without having to cut and past html.

image.png.b6045358ac367f3c0bdf9236565b2721.png


 

Share this post


Link to post
Share on other sites

Hi !

CK Editor throws errors while not all textareas where found on all adminpages...

ckeditor.js:19 [CKEDITOR] Error code: editor-incorrect-element. 
Object
ckeditor.js:19 [CKEDITOR] For more information about this error go to https://ckeditor.com/docs/ckeditor4/latest/guide/dev_errors.html#editor-incorrect-element
ckeditor.js:19 [CKEDITOR] Error code: editor-incorrect-element. 
Object
ckeditor.js:19 [CKEDITOR] For more information about this error go to https://ckeditor.com/docs/ckeditor4/latest/guide/dev_errors.html#editor-incorrect-element
ckeditor.js:19 [CKEDITOR] Error code: editor-incorrect-element. 
Object
ckeditor.js:19 [CKEDITOR] For more information about this error go to https://ckeditor.com/docs/ckeditor4/latest/guide/dev_errors.html#editor-incorrect-element
ckeditor.js:19 [CKEDITOR] Error code: editor-incorrect-element. 
Object
ckeditor.js:19 [CKEDITOR] For more information about this error go to https://ckeditor.com/docs/ckeditor4/latest/guide/dev_errors.html#editor-incorrect-element
ckeditor.js:19 [CKEDITOR] Error code: editor-incorrect-element. 
Object
ckeditor.js:19 [CKEDITOR] For more information about this error go to https://ckeditor.com/docs/ckeditor4/latest/guide/dev_errors.html#editor-incorrect-element

Why not include CK like Tiny MCE in https://apps.oscommerce.com/1VCAj&amp;tinymce-editor-for-admin ? Tiny MCE even catches all languageareas but does not load on every adminsite... Should I try to update and upload ?

Greetings,
Denzel.

Share this post


Link to post
Share on other sites

Thankyou @Denzel Has been updated to v1.2, should stop any errors given on admin pages not using the script. Clearly I was not looking at the correct pages to see the errors you reported, please accept my apologies.

Updated to limit script to pages it works on only.

var $good_pages = ['categories.php', 'manufacturers.php', 'newsletters.php', 'mail.php'];

If you need it on another page then add that page to the code.

 


 

Share this post


Link to post
Share on other sites
4 hours ago, JcMagpie said:

Thankyou @Denzel Has been updated to v1.2, should stop any errors given on admin pages not using the script. Clearly I was not looking at the correct pages to see the errors you reported, please accept my apologies.

Updated to limit script to pages it works on only.

var $good_pages = ['categories.php', 'manufacturers.php', 'newsletters.php', 'mail.php'];

If you need it on another page then add that page to the code.

 

Installed without issue. Have you considered adding the good pages and the field name list to an admin configuration section though?

Share this post


Link to post
Share on other sites
33 minutes ago, LeeFoster said:

admin configuration section though

Not sure I understand, Which confg section would benifit from this? It can be added to any section that has a textarea.


 

Share this post


Link to post
Share on other sites
Just now, JcMagpie said:

Not sure I understand, Which confg section would benifit from this? It can be added to any section that has a textarea.

I mean that you have a config section that let's you select the good pages rather than going into the file.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×