|
dolibarr
13.0.2
|
Class to manage a WYSIWYG editor. More...
Public Member Functions | |
| __construct ($htmlname, $content, $width= '', $height=200, $toolbarname= 'Basic', $toolbarlocation= 'In', $toolbarstartexpanded=false, $uselocalbrowser=true, $okforextendededitor=true, $rows=0, $cols=0, $readonly=0) | |
| Create an object to build an HTML area to edit a large string content. More... | |
| Create ($noprint=0, $morejs= '', $disallowAnyContent=true, $titlecontent= '', $option= '') | |
| Output edit area inside the HTML stream. More... | |
Class to manage a WYSIWYG editor.
Usage: $doleditor=new DolEditor('body',$message,320,'toolbar_mailing'); $doleditor->Create();
Definition at line 29 of file doleditor.class.php.
| DolEditor::__construct | ( | $htmlname, | |
| $content, | |||
$width = '', |
|||
$height = 200, |
|||
$toolbarname = 'Basic', |
|||
$toolbarlocation = 'In', |
|||
$toolbarstartexpanded = false, |
|||
$uselocalbrowser = true, |
|||
$okforextendededitor = true, |
|||
$rows = 0, |
|||
$cols = 0, |
|||
$readonly = 0 |
|||
| ) |
Create an object to build an HTML area to edit a large string content.
| string | $htmlname | HTML name of WYSIWIG field |
| string | $content | Content of WYSIWIG field |
| int | $width | Width in pixel of edit area (auto by default) |
| int | $height | Height in pixel of edit area (200px by default) |
| string | $toolbarname | Name of bar set to use ('Full', 'dolibarr_notes[_encoded]', 'dolibarr_details[_encoded]'=the less featured, 'dolibarr_mailings[_encoded]', 'dolibarr_readonly'). |
| string | $toolbarlocation | Where bar is stored : 'In' each window has its own toolbar 'Out:name' share toolbar into the div called 'name' |
| boolean | $toolbarstartexpanded | Bar is visible or not at start |
| int | $uselocalbrowser | Enabled to add links to local object with local browser. If false, only external images can be added in content. |
| boolean | string | $okforextendededitor | True=Allow usage of extended editor tool if qualified (like ckeditor). If 'textarea', force use of simple textarea. If 'ace', force use of Ace. Warning: If you use 'ace', don't forget to also include ace.js in page header. Also, the button "save" must have class="buttonforacesave". |
| int | $rows | Size of rows for textarea tool |
| string | $cols | Size of cols for textarea tool (textarea number of cols '70' or percent 'x') |
| int | $readonly | 0=Read/Edit, 1=Read only |
Definition at line 67 of file doleditor.class.php.
References dol_nl2br(), dol_syslog(), and dol_textishtml().
| DolEditor::Create | ( | $noprint = 0, |
|
$morejs = '', |
|||
$disallowAnyContent = true, |
|||
$titlecontent = '', |
|||
$option = '' |
|||
| ) |
Output edit area inside the HTML stream.
Output depends on this->tool (fckeditor, ckeditor, textarea, ...)
| int | $noprint | 1=Return HTML string instead of printing it to output |
| string | $morejs | Add more js. For example: ".on( \'saveSnapshot\', function(e) { alert(\'ee\'); });". Used by CKEditor only. |
| boolean | $disallowAnyContent | Disallow to use any content. true=restrict to a predefined list of allowed elements. Used by CKEditor only. |
| string | $titlecontent | Show title content before editor area. Used by ACE editor only. |
| string | $option | For ACE editor, set the source language ('html', 'php', 'javascript', ...) |
Definition at line 119 of file doleditor.class.php.
References dol_escape_htmltag(), if, and print.