Fixed issue #34

This commit is contained in:
Rooty 2020-12-16 23:53:23 +01:00
parent 133e19e5be
commit 458f796d64
2 changed files with 35 additions and 8 deletions

View File

@ -154,6 +154,15 @@ var $editeur = null;
return $this->editeur->includeDependancy();
}
/**
* Display: Inclus les dépendances
* @return chaine chaine permettant d'afficher l'éditeur Wyziwig
*/
function includeRawJs()
{
return $this->editeur->includeRawJs();
}
/**
* Javascript:retourne la chaine de verification de vide du Wyziwig
* <p>Ce script vas permettre de retourner à votre javascript, si l'éditeur est vide ou non</p>

View File

@ -126,7 +126,7 @@ var $string = null;
$toolbar =$this->toolbar;
$element=$form.".".$name;
$html='<textarea class="form-control p-0 m-0" id="'.$name.'" name="'.$name.'" rows="12">'.$string.'</textarea>';
$html='<textarea class="form p-0 m-0" id="'.$name.'" name="'.$name.'" rows="12">'.$string.'</textarea>';
return $html;
}
@ -213,14 +213,32 @@ var $string = null;
$arrayCallJs[] = "data/javascript/summernote/plugins/file/201910/summernote-file.js";
$arrayCallJs[] = "data/javascript/summernote/0.8.18/lang/summernote-fr-FR.min.js";
mxCallJs($arrayCallJs);
$arrayRawJs[] = "\$(document).ready( function(){\$('#".$name."').summernote({lang: '".$lang."',toolbar: [['style', ['style','fontsize']],['font', ['bold', 'underline', 'clear']],['fontname', ['fontname']],['color',['backcolor','color']],['para', ['style','ul', 'ol', 'paragraph']],['table', ['table']],['hr', ['hr']],/* File plugin not enabled */ /* ['insert', ['file','link', 'picture', 'video']], */ ['insert', ['link', 'picture', 'video']],['view', ['fullscreen', 'codeview']],['misc', ['undo', 'redo']],],height: ".$height.",disableResizeEditor: true, /* disable resizing editor */ airMode: false,});});";
$arrayRawJs[] = "";
mxRawJs($arrayRawJs);
// var_dump($arrayCallCss);
// var_dump($arrayCallJs);
// var_dump($arrayRawJs);
$arrayRawJs[] = "\$(document).ready( function(){\$('#".$name."').summernote({lang: '".$lang."',toolbar: [['style', ['style','fontsize']],['font', ['bold', 'underline', 'clear']],['fontname', ['fontname']],['color',['backcolor','color']],['para', ['style','ul', 'ol', 'paragraph']],['table', ['table']],['hr', ['hr']],/* File plugin not enabled */ /* ['insert', ['file','link', 'picture', 'video']], */ ['insert', ['link', 'picture', 'video']],['view', ['fullscreen', 'codeview']],['misc', ['undo', 'redo']],],height: ".$height.",disableResizeEditor: true, /* disable resizing editor */ airMode: false,});});";
mxRawJs($arrayRawJs);
return true;
}
/**
* includeDependancy : retourne la chaine d'appel aux javascript indispensable
*
*<p>Retourne la chaine Javascript Avec le bon chemin (en fonction de SYSTEM_PATH)</p>
* @return chaine chaine d'appel javascript
*/
function includeRawJs()
{
$name =$this->name;
// $form =$this->form;
$lang =$this->lang;
// $string =$this->string;
$width =$this->width;
$height =$this->height;
// $toolbar =$this->toolbar;
$arrayRawJs[] = "\$(document).ready( function(){\$('#".$name."').summernote({lang: '".$lang."',toolbar: [['style', ['style','fontsize']],['font', ['bold', 'underline', 'clear']],['fontname', ['fontname']],['color',['backcolor','color']],['para', ['style','ul', 'ol', 'paragraph']],['table', ['table']],['hr', ['hr']],/* File plugin not enabled */ /* ['insert', ['file','link', 'picture', 'video']], */ ['insert', ['link', 'picture', 'video']],['view', ['fullscreen', 'codeview']],['misc', ['undo', 'redo']],],height: ".$height.",disableResizeEditor: true, /* disable resizing editor */ airMode: false,});});";
mxRawJs($arrayRawJs);
return true;
}