TinyMCE : height is a parameter

This commit is contained in:
sparkyx 2025-10-17 13:05:20 +02:00
parent 4a5ad9a580
commit 9e260fcf51
7 changed files with 17 additions and 9 deletions

View file

@ -4724,15 +4724,15 @@ Noalyss = function () {
* @param {string} mode min for minimum or full , gives an error if the mode doesn't exist
* @returns {undefined}
*/
Noalyss.prototype.activate_tinymce=function (domid,mode) {
Noalyss.prototype.activate_tinymce=function (domid,mode,p_height) {
tinymce.remove('#'+domid);
if (! p_height) p_height=500;
if ( mode == 'minimal' || ! mode )
{
tinymce.init({
selector: 'textarea#'+domid,
plugins:'link quickbars ',
height: 500,
height: p_height,
menubar: false,
toolbar: 'undo redo | ' +
'bold italic underline forecolor backcolor |fontsize ' +
@ -4759,7 +4759,7 @@ Noalyss.prototype.activate_tinymce=function (domid,mode) {
*/
tinymce.init({
selector: 'textarea#'+domid,
height: 500,
height: p_height,
menubar: false,
plugins:'link lists emoticons quickbars pagebreak table',
toolbar: 'undo redo ' +
@ -4778,10 +4778,10 @@ Noalyss.prototype.activate_tinymce=function (domid,mode) {
}else if ( mode == 'no-toolbar' )
{
console.debug(`no toolbar ${domid} height ${p_height}`)
tinymce.init({
selector: 'textarea#'+domid,
height: 500,
height: p_height,
plugins:' quickbars',
menubar:false,
toolbar: false,

View file

@ -35,6 +35,7 @@ class ITextarea extends HtmlInput
parent::__construct($p_name, $p_value, $p_id);
$this->style=' class="itextarea" ';
$this->enrichText="plain";
$this->heigh=500;
}
/**
@ -84,7 +85,7 @@ class ITextarea extends HtmlInput
<textarea name="{$this->name}" id="{$this->id}" {$this->style}>{$this->value}</textarea>
<script type="text/javascript">
(function() {
noalyss.activate_tinymce('{$this->name}','{$this->enrichText}');
noalyss.activate_tinymce('{$this->name}','{$this->enrichText}','{$this->heigh}');
})();
</script>
EOF;

View file

@ -5,6 +5,7 @@
/**
* @var $str_anc String HTML contains the detail of analytic
* @var $g_user Noalyss_User inherited , it is the connected user
* @var $div (string) current DIV ID
*/
$str_anc="";
global $div,$g_parameter,$cn,$access,$jr_id,$obj;
@ -107,6 +108,7 @@ global $div,$g_parameter,$cn,$access,$jr_id,$obj;
<td style="text-align:center;vertical-align: top">
<?php
$inote = new ITextarea('jrn_note');
$inote->id="jrn_note";
$inote->style=' class="itextarea" style="width:90%;height:100%;"';
$inote->value = strip_tags($obj->det->note);
echo $inote->input();

View file

@ -3,6 +3,8 @@
//see licence.txt
$str_anc="";
global $g_parameter,$g_user;
//* @var $div (string) current DIV ID
?><?php require_once NOALYSS_TEMPLATE.'/ledger_detail_top.php'; ?>
<div class="content" style="padding:0;">
<?php

View file

@ -9,6 +9,7 @@ require_once NOALYSS_TEMPLATE.'/ledger_detail_top.php';
$periode_id=new Periode($cn,$obj->det->jr_tech_per);
$exercice=$periode_id->get_exercice();
$owner = new Noalyss_Parameter_Folder($cn);
//* @var $div (string) current DIV
?>
<?php
?>

View file

@ -1,6 +1,8 @@
<?php
//This file is part of NOALYSS and is under GPL
//see licence.txt
//* @var $div (string) current DIV
global $div, $g_parameter, $cn, $access, $jr_id, $obj,$g_user;
?>

View file

@ -59,7 +59,7 @@ echo $itext->input();
<?php
$itext=new \ITextarea("enrich3");
$itext->value= $http->post("enrich3","raw","");
$itext->heigh=130;
$itext->set_enrichText("no-toolbar");
echo $itext->input();
?>
@ -69,7 +69,7 @@ echo $itext->input();
<h1>Plain Area</h1>
<?php
$itext=new \ITextarea("enrich2");
$itext=new \ITextarea("enrich4");
$itext->value= strip_tags($http->post("enrich2","raw",""));
$itext->set_enrichText("plain");