[Contribution] CKEditor [wyswyg]
#1
Posted 29 January 2010, 10:54
Contribution can be found here.
CKEditor
Thanks goes to escri2 for adding this contribution and make it working in other contribution.
I create this forum tread where we can discuse and helteach other to integrate this editor into more contribution. I am not a coding guru, but together we may be able to get this cotribution to work with the major contribs where a wyswyg editor is needed.
Today it is used in theese contribution / functions.
Information Pages Unlimited v2.07 -> Link
Products descriptions. (instructions in CKEditor contribution.)
It is a greate editor buildt on and replaceing the old FCKEditor.
There is still some functions that can be improved / added.
-File / image uplade function.
-Image browsing.
-Needed code change to other contribution.
-Function to not load javascript if not needed. (same function as for tinyMCE)
- Adjust ckeditor pack fore OSC. Remove unneeded files in pack.
- Configuration changes to better work in OSC
-??
If you have this contribution installed and/or got it working with other contribution and want to help. Please post the code changes here or make a uplod to the contribution page with instruction.
#2
Posted 29 January 2010, 12:34
Only need to replace the javascript line for ckeditor.
Easy to modify.
#3
Posted 29 January 2010, 17:05
#4
Posted 02 February 2010, 23:55
i managed to instal all FCKeditor version but CK editor i really different
#5
Posted 03 February 2010, 13:47
Run this query in phpmyadmin. You can modyfy where you want this option listed. The groupe_id is for the configuration groupe in admin - configuration. No 1 is "My Store". The "sort order" is where in the list this will be added. For me no. 22 was the next availeble sort order under group_id = 1.
Changes to fit your store.
INSERT INTO `configuration` ( `configuration_id` , `configuration_title` , `configuration_key` , `configuration_value` , `configuration_description` , `configuration_group_id` , `sort_order` , `last_modified` , `date_added` , `use_function` , `set_function` )
VALUES (
'', 'Use CKEditor', 'CKEditor_use', 'false', 'Select if you want to use CKEditor or not', 1, , '', '', NULL , 'tep_cfg_select_option(array(''true'', ''false''),'
)
when I run this SQL I get the folowing statement from phpmyadmin:
#1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ' '', '', NULL , 'tep_cfg_select_option(array(''true'', ''false'
help please
Sue
Edited by designbysue, 03 February 2010, 13:52.
#6
Posted 03 February 2010, 13:59
Screen shot here [img]http://www.paintballwarehouseny.com/editor-screen-shot.jpg[/img]
How does one widen this to a usable condition?
Sue
#7
Posted 03 February 2010, 14:33
Also - I see the editor window can be sized, but I would rather it open in a larger state rather than have tod the extra mouse movements every time editing is needed.
Sue
Edited by designbysue, 03 February 2010, 14:34.
#8
Posted 03 February 2010, 15:13
try this
INSERT INTO `configuration` ( `configuration_id` , `configuration_title` , `configuration_key` , `configuration_value` , `configuration_description` , `configuration_group_id` , `sort_order` , `last_modified` , `date_added` , `use_function` , `set_function` )
VALUES (
'', 'Use CKEditor', 'CKEditor_use', 'false', 'Select if you want to use CKEditor or not', 1, , '', '', NULL , 'tep_cfg_select_option(array(''true'', ''false''),'
);
The with of the editor windows i have not figured out yet as it has not been that annoying yet..
To remove the extra old textarea window, you must remove some duplicate code in the categories.php file.
Here i have commented out the old code. Remove it or comment out.
<tr>
<td class="main" valign="top"><?php if ($i == 0) echo TEXT_PRODUCTS_DESCRIPTION; ?></td>
<td><table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="main" valign="top"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']); ?> </td>
<td class="main">
<?php echo tep_draw_textarea_field('products_description[' . $languages[$i]['id'] . ']', 'soft', '70', '10',
(isset($products_description[$languages[$i]['id']]) ? stripslashes($products_description[$languages[$i]['id']]) :
tep_get_products_description($pInfo->products_id, $languages[$i]['id'])),'id = products_description[' .
$languages[$i]['id'] . '] class="ckeditor"'); ?>
<!-- /*** old code <?php echo tep_draw_textarea_field('products_description[' . $languages[$i]['id'] . ']', 'soft', '70', '15', (isset($products_description[$languages[$i]['id']]) ? stripslashes($products_description[$languages[$i]['id']]) : tep_get_products_description($pInfo->products_id, $languages[$i]['id']))); ?>
***/ //-->
</td>
</tr>
Edited by www.in.no, 03 February 2010, 15:15.
#9
Posted 03 February 2010, 15:35
config.width = 850; or config.width = '75%';
Change to the value you want.
#10
Posted 03 February 2010, 19:33
Here is the code I have - what am I to comment out (can't find exactly what you posted)
<tr>
<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
</tr>
<tr>
<td class="main"><?php echo TEXT_PRODUCTS_MANUFACTURER; ?></td>
<td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_pull_down_menu('manufacturers_id', $manufacturers_array, $pInfo->manufacturers_id); ?></td>
</tr>
<tr>
<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
</tr>
<?php
for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
?>
<tr><!-- BOF code adapted CKEditor by escri2 -->
<td class="main" valign="top" colspan="2" align="left"><?php if ($i == 0) echo TEXT_PRODUCTS_DESCRIPTION; ?></td>
</tr>
<tr>
<td colspan="2"><table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="main" valign="top"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']); ?> </td>
<td class="main">
<?php echo tep_draw_textarea_field('products_description[' . $languages[$i]['id'] . ']', 'soft', '70', '10', (isset($products_description[$languages[$i]['id']]) ? stripslashes($products_description[$languages[$i]['id']]) : tep_get_products_description($pInfo->products_id, $languages[$i]['id'])),'id = products_description[' . $languages[$i]['id'] . '] class="ckeditor"'); ?>
</td>
</tr><!-- EOF code adapted CKEditor by escri2 -->
</table></td>
</tr>
<?php
}
?>
<tr>
<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
</tr>
<tr bgcolor="#ebebff">
<td class="main"><?php echo TEXT_PRODUCTS_TAX_CLASS; ?></td>
<td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_pull_down_menu('products_tax_class_id', $tax_class_array, $pInfo->products_tax_class_id, 'onchange="updateGross()"'); ?></td>
</tr>
<tr bgcolor="#ebebff">
<td class="main"><?php echo TEXT_PRODUCTS_PRICE_NET; ?></td>
<td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('products_price', $pInfo->products_price, 'onKeyUp="updateGross()"'); ?></td>
</tr>
<tr bgcolor="#ebebff">
<td class="main"><?php echo TEXT_PRODUCTS_PRICE_GROSS; ?></td>
<td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('products_price_gross', $pInfo->products_price, 'OnKeyUp="updateNet()"'); ?></td>
</tr>
<tr>
<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
</tr>
<script language="javascript"><!--
updateGross();
//--></script>
<?php
for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
?>
<tr>
<td class="main" valign="top"><?php if ($i == 0) echo TEXT_PRODUCTS_DESCRIPTION; ?></td>
<td><table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="main" valign="top"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']); ?> </td>
<td class="main"><?php echo tep_draw_textarea_field('products_description[' . $languages[$i]['id'] . ']', 'soft', '70', '15', (isset($products_description[$languages[$i]['id']]) ? stripslashes($products_description[$languages[$i]['id']]) : tep_get_products_description($pInfo->products_id, $languages[$i]['id']))); ?></td>
</tr>
</table></td>
</tr>
<?php
}
?>
<tr>
Sue
Edited by designbysue, 03 February 2010, 19:37.
#11
Posted 03 February 2010, 19:44
You will have to edit out and merge it to one instanse.
<script language="javascript"><!--
updateGross();
//--></script>
<?php
for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
?>
<tr>
<td class="main" valign="top"><?php if ($i == 0) echo TEXT_PRODUCTS_DESCRIPTION; ?></td>
<td><table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="main" valign="top"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']); ?> </td>
<td class="main"><?php echo tep_draw_textarea_field('products_description[' . $languages[$i]['id'] . ']', 'soft', '70', '15', (isset($products_description[$languages[$i]['id']]) ? stripslashes($products_description[$languages[$i]['id']]) : tep_get_products_description($pInfo->products_id, $languages[$i]['id']))); ?></td>
</tr>
</table></td>
</tr>
<?php
}
?>
<tr>
#12
Posted 03 February 2010, 20:05
<tr><!-- BOF code adapted CKEditor by escri2 -->
<td class="main" valign="top" colspan="2" align="left"><?php if ($i == 0) echo TEXT_PRODUCTS_DESCRIPTION; ?></td>
</tr>
<tr>
<td colspan="2"><table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="main" valign="top"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']); ?> </td>
<td class="main">
<?php echo tep_draw_textarea_field('products_description[' . $languages[$i]['id'] . ']', 'soft', '70', '10', (isset($products_description[$languages[$i]['id']]) ? stripslashes($products_description[$languages[$i]['id']]) : tep_get_products_description($pInfo->products_id, $languages[$i]['id'])),'id = products_description[' . $languages[$i]['id'] . '] class="ckeditor"'); ?>
</td>
</tr><!-- EOF code adapted CKEditor by escri2 -->
</table></td>
is the error in here? If so - how can I correct it. I have used Beyond Compare and I don't see where any other contribution clashes with this.
Sue
#13
Posted 03 February 2010, 21:18
I have to remove this at this point because client is coming tomorrow see the back end of the cart. But if anyone can tell me how to make this work it would be appreciated!!!
Sue
#14
Posted 03 February 2010, 21:38
Thanks for your help
Sue
#15
Posted 03 February 2010, 22:18
#16
Posted 06 February 2010, 06:03
www.in.no, on 03 February 2010, 22:18, said:
Hi,
Now default CKEditor don't support image upload, need CKEfinder install, would you please help to how to make CKEditor can work with CKEfinder together?
Best Regards,
Sunrise99
#17
Posted 06 February 2010, 08:34
But it is availeble to install in demo mode, and i can outline the steps to get it working.
1. Upload ckfinder to the admin folder.
2. Add this line to ckeditor/config.js
CKFinder.SetupCKEditor( null, '../admin/ckfinder/' );
3. Add the path to the 2 variables (baseUrl and baseDir) in config.php in ckfinder directory.
$config['LicenseName'] = ''; $config['LicenseKey'] = ''; $baseUrl = 'http://xxx.yy.no/'; $baseDir = '/home/xxxx/public_html/';
Then the upload path will be to the images folder in your catalog directory.
The images folder name is set some other place in the file, but no need to change.
4. You may also add the _thumbs directory within the images folder.
This is for images only, for uploading flash files a seperate config has to be set. I havent looked into that yet as i am not using flash at my site.
I had some folder problems when testing, so you may need to read your server log to se that the path and folders are correct.
#18
Posted 08 February 2010, 22:16
I do not see the the mod in list of contributions so as that I may be able to read any docs. Because I know it must be a config file, but no such file in directory. When I open in contribution FCK WYSIWYG it points CKEditor.
See an earlier post where a member stated he wanted FCK but got CKEditor instead. Would that be depending on the ver downloaded?
Any comments or suggestions on this is appreciated.
Bennett
#19
Posted 09 February 2010, 14:06
This support tread is for CKEditor and what you will choose to use is up to you. CKEditor is easy to use and install, but still not having the code for using with all addons as you more likly will find for FCKeditor or tinyMCE.
#20
Posted 09 February 2010, 15:05
www.in.no, on 03 February 2010, 15:13, said:
try this
INSERT INTO `configuration` ( `configuration_id` , `configuration_title` , `configuration_key` , `configuration_value` , `configuration_description` , `configuration_group_id` , `sort_order` , `last_modified` , `date_added` , `use_function` , `set_function` )
VALUES (
'', 'Use CKEditor', 'CKEditor_use', 'false', 'Select if you want to use CKEditor or not', 1, , '', '', NULL , 'tep_cfg_select_option(array(''true'', ''false''),'
);
This code still does not run - I get the following error message"
#1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ' '', '', NULL , 'tep_cfg_select_option(array(''true'', ''false'
Sue














