Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

CKEditor 2 size editing field


ce7

Recommended Posts

hi,

using the version of CKEditor: Adding CKEditor 3.x with KFM Filemanager 1.4.x to osC 2.3.1

It's working fine after installed with the BS version.

	Open /catalog/admin/includes/template_top.php
and add the following immediately before the </head> tag:
	<!-- BOM CKEditor via JQuery -->
<?php
if (!defined('USE_CKEDITOR_ADMIN_TEXTAREA')) {
    tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, set_function) values ('', 'Use CKEditor', 'USE_CKEDITOR_ADMIN_TEXTAREA','true','Use CKEditor for WYSIWYG editing of textarea fields in admin',1,99,now(),'tep_cfg_select_option(array(\'true\', \'false\'),' )");
    define ('USE_CKEDITOR_ADMIN_TEXTAREA','true');
}
if (USE_CKEDITOR_ADMIN_TEXTAREA == "true") {
?>
    <script type="text/javascript" src="<?php echo tep_href_link('ext/ckeditor/ckeditor.js'); ?>"></script>
    <script type="text/javascript" src="<?php echo tep_href_link('ext/ckeditor/adapters/jquery.js'); ?>"></script>
    <script type="text/javascript">
    $(function() {
        var $editors = $('textarea');
        if ($editors.length) {
            $editors.each(function() {
                var editorID = $(this).attr("id");
                var instance = CKEDITOR.instances[editorID];
                if (instance) { CKEDITOR.remove(instance); }
                CKEDITOR.replace(editorID,
                    {width : 630,
                    height : 250}
                );
            });
        }
    });
    </script>
    <?php
}
?>
<!-- EOM CKEditor via JQuery -->
	Change the width : 630 and/or height : 250 to determine the size of editing box
that you want on the page.
	

 

The instruction said it can define ONE editor size width 630 and height 250,

what if i need to have a editor size width 630 height 500, and another editor size width 630 height 200, how can i change the code to make it work as I need?

thanks!

 

Lyn

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...