mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
Merge branch 'support/3.2-beta' into support/3.2
This commit is contained in:
@@ -70,12 +70,24 @@ class UIHTMLEditorWidget
|
||||
$sValue = $this->m_sValue;
|
||||
$sHelpText = $this->m_sHelpText;
|
||||
$sValidationField = $this->m_sValidationField;
|
||||
$aConfig = [];
|
||||
|
||||
$sEncodedValue = CKEditorHelper::PrepareCKEditorValueTextEncodingForTextarea($sValue);
|
||||
$sHtmlValue = "<div class=\"field_input_zone field_input_html ibo-input-wrapper\"><textarea class=\"htmlEditor ibo-input-richtext-placeholder\" title=\"$sHelpText\" name=\"attr_{$this->m_sFieldPrefix}{$sCode}\" id=\"$iId\">$sEncodedValue</textarea></div>$sValidationField";
|
||||
|
||||
// Prepare CKEditor size
|
||||
$sWidthSpec = addslashes(trim($this->m_oAttDef->GetWidth()));
|
||||
if ($sWidthSpec != '') {
|
||||
/* N°6543 - the function min allow to keep text inside the column when width is defined*/
|
||||
$aConfig['width'] = "min($sWidthSpec,100%)";
|
||||
}
|
||||
$sHeightSpec = addslashes(trim($this->m_oAttDef->GetHeight()));
|
||||
if ($sHeightSpec != '') {
|
||||
$aConfig['height'] = $sHeightSpec;
|
||||
}
|
||||
|
||||
// Enable CKEditor
|
||||
CKEditorHelper::ConfigureCKEditorElementForWebPage($oPage, $iId, $sValue, true);
|
||||
CKEditorHelper::ConfigureCKEditorElementForWebPage($oPage, $iId, $sValue, true, $aConfig);
|
||||
|
||||
// Could also be bound to 'instanceReady.ckeditor'
|
||||
$oPage->add_ready_script("$('#$iId').on('validate', function(evt, sFormId) { return ValidateCKEditField('$iId', '', {$this->m_sMandatory}, sFormId, '') } );\n");
|
||||
|
||||
@@ -445,8 +445,8 @@ JS
|
||||
|
||||
$fScale = min($iMaxImageSize / $iWidth, $iMaxImageSize / $iHeight);
|
||||
|
||||
$iNewWidth = $iWidth * $fScale;
|
||||
$iNewHeight = $iHeight * $fScale;
|
||||
$iNewWidth = (int) ($iWidth * $fScale);
|
||||
$iNewHeight = (int) ($iHeight * $fScale);
|
||||
|
||||
$aDimensions['width'] = $iNewWidth;
|
||||
$aDimensions['height'] = $iNewHeight;
|
||||
|
||||
13
css/backoffice/vendors/_ckeditor.scss
vendored
13
css/backoffice/vendors/_ckeditor.scss
vendored
@@ -40,6 +40,16 @@ $ibo-vendors-ckeditor--ck-text-huge-font-size: $ibo-font-size-350;
|
||||
--ck-text-huge-font-size: #{$ibo-vendors-ckeditor--ck-text-huge-font-size};
|
||||
}
|
||||
|
||||
/* Base style */
|
||||
.ck-editor {
|
||||
width: 100% !important; /* Force editor to always take its container full width (not less, not more) */
|
||||
display: inline-grid; /* Force editor to always take its container full width (not less, not more) */
|
||||
|
||||
.ck-editor__main {
|
||||
overflow: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.ck-editor__editable_inline:not(.ck-comment__input *) {
|
||||
height: 200px;
|
||||
}
|
||||
@@ -55,9 +65,8 @@ $ibo-vendors-ckeditor--ck-text-huge-font-size: $ibo-font-size-350;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.ck.ck-editor__main{
|
||||
.ck-editor__main{
|
||||
flex-grow: 1;
|
||||
overflow: auto;
|
||||
}
|
||||
.ck-editor__editable_inline:not(.ck-comment__input *){
|
||||
height: 100% !important; /* !important to overload inline style from configuration.height */
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user