Inhaltsverzeichnis

vtigerCRM

Enable HTML-Descriptions in Products

under construction

Abstract

This article should explain how to enable HTML description in products, and display them well formated in your quote (PDF) f.e. . Suported HTML-Tags are bold, italic, unterline and lists. You can enter them user-friendly by FCKEditor.

Modifications

patching Smarty-Templates to use FCKEditor

Here we must modify the create- and edit form to give us the FCKEditor.

patch of the 'create' Editor

--- vtigercrm_orig/Smarty/templates/Inventory/InventoryCreateView.tpl    2007-05-31 13:52:53.000000000 +0200
+++ vtigercrm/Smarty/templates/Inventory/InventoryCreateView.tpl    2007-10-24 10:18:00.000000000 +0200
@@ -19,7 +19,8 @@
 <script type="text/javascript" src="jscalendar/lang/calendar-{$CALENDAR_LANG}.js"></script>
 <script type="text/javascript" src="jscalendar/calendar-setup.js"></script>
 <script type="text/javascript" src="modules/{$MODULE}/{$MODULE}.js"></script>
-<script type="text/javascript" src="include/js/Inventory.js"></script>
+<script type="text/javascript" src="include/js/Inventory.js"></script>
+<script type="text/javascript" src="include/fckeditor/fckeditor.js"></script>
 
 <script type="text/javascript">
 
@@ -214,3 +215,11 @@
                                 DIRECT_PRICE_REDUCTION:'{$APP.LBL_DIRECT_PRICE_REDUCTION}'{rdelim};
 
 </script>
+{if $MODULE == 'Products'}
+    <script type="text/javascript" >
+    var oFCKeditor = null;
+    oFCKeditor = new FCKeditor( "product_description" ,"100%","370") ;
+    oFCKeditor.BasePath   = "include/fckeditor/" ;
+    oFCKeditor.ReplaceTextarea();
+</script>
+{/if}

patch of the 'view' Editor

--- vtigercrm_orig/Smarty/templates/Inventory/InventoryEditView.tpl     2007-05-31 13:52:59.000000000 +0200
+++ vtigercrm/Smarty/templates/Inventory/InventoryEditView.tpl  2007-10-24 10:18:00.000000000 +0200
@@ -20,6 +20,7 @@
 <script type="text/javascript" src="jscalendar/calendar-setup.js"></script>
 <script type="text/javascript" src="modules/{$MODULE}/{$MODULE}.js"></script>
 <script type="text/javascript" src="include/js/Inventory.js"></script>
+<script type="text/javascript" src="include/fckeditor/fckeditor.js"></script>
 <script type="text/javascript">
 
 function sensex_info()
@@ -198,4 +199,13 @@
         if(ProductImages.length > 0)
             document.EditView.del_file_list.value=ProductImages.join('###');
     {rdelim}
-</script>
+</script>
+
+{if $MODULE == 'Products'}
+    <script type="text/javascript" >
+    var oFCKeditor = null;
+    oFCKeditor = new FCKeditor( "product_description" ,"100%","370") ;
+    oFCKeditor.BasePath   = "include/fckeditor/" ;
+    oFCKeditor.ReplaceTextarea();
+</script>
+{/if}

"html2pdf - convert your XHTML to PDF easily"