Modified:2018-08-15  Published:2018-08-15  Views: 10258
Author: hasanuzzaman
Published in: Dolibarr
Module Development: How To Load Dolibarr WYSIWYG Editor

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.

WYSIWYG editor loading Dolibarr

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.

Article Comments

0 comments.

There are zero comments yet, why not be the first?

You must be logged in to post a comment.

Please log in or register to comment or reply to a comment.

Articles Search

Featured Articles

Most Popular Articles

Article Categories Expand

10  
1  
1  
1  
0  
6  
0  
85  
7  

There are zero sub-categories in this parent category.

127  
4  
63  
6  
3  
3  
10  
5  
9  
4  
12  
6  
3  
0  
1  
73  
16  
1  
1  
25  
2  
2  
0  
2  
1  
2  
2  
7  
0  
1  
0  
2  
2  
2  
13  
2  
1  
3  
2  
1  
0  
2  
3  
3  
0  
1  
5  
0  
3  
4  
1  
17  
62  
2  
1  
0  
1  
0  
0  
6  
1  
1  
41  
1  
1  
2  
0  
12  
0  
0  
0  
0  
7  
3  
0  
2  
2  
2  

There are zero sub-categories in this parent category.

4  
1  
5  
6  
0  
3  
2  
1  
0  
2  
1  
2  
0  
4  
2  
0  
5  
1  
26  
1  

There are zero sub-categories in this parent category.

0  
1  
0  
1  
0  
1  
0  
1  
0  
0  
0  
2  
31  
1  
20  
3  
2  
0  
0  
0  
0  
1  
1  
0  
1  
0  
0  
0  
1  
0  
46  
0  
1  
5  
0  
2  
2  
0  
0  
0  
0  
2  
10  
2  

Sponsor