As a Dolibarr Module Developer Sometime you may need to load WYSIWYG Editor in your module. The full form of WYSIWYG is, what you see is what you get. This editor is very useful for creating or implementing online content editing feature like a CMS. Now loading the editor within Dolibarr environment is not complex. Dolibarr provides a dedicated class for this need. A sample code is given below..................
Â
Â
// Content
print ''.$langs->trans("Content").'';
// Editeur wysiwyg
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
$doleditor=new DolEditor('note',$object->note,'',200,'dolibarr_notes','In',true,true,$conf->fckeditor->enabled,ROWS_7,'90%');
$doleditor->Create();
print '';
Â
The above code will create a WYSIWYG editor. The is a table row. The first column of the row is for title of the editor. The second column is for editor itself. Make sure you have given desired number of rows for editor's height. In this case it is, ROWS_7.
You can control the width of the Editor using the last parameter of the Constructor function.
The above image illustrate the resulted output of the code.
Note: If the all above three steps does not solve your problem you can contact us without any hesitation. We will be happy to assist you.
There are zero sub-categories in this parent category.
There are zero sub-categories in this parent category.
There are zero sub-categories in this parent category.