can set ace editor to readonly

This commit is contained in:
Frédéric France
2024-11-23 14:19:29 +01:00
parent f1adc0fe82
commit c272a1242c
2 changed files with 2 additions and 4 deletions

View File

@@ -395,7 +395,7 @@ class Documentation
{
require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php';
print '<div class="documentation-code">';
$content = implode("\n", $lines);
$content = implode("\n", $lines) . "\n";
$doleditor = new DolEditor(md5($content), $content, '', 0, 'Basic', 'In', true, false, 'ace', 0, '99%', 1);
print $doleditor->Create(1, '', false, '', $option);
print '</div>';

View File

@@ -322,10 +322,9 @@ $documentation->showSidebar(); ?>
'print dolGetButtonTitle($btnLabel, \'\', \'fa fa-file\', \'#\', \'\', $status);',
);
echo $documentation->showCode($lines); ?><div class="documentation-example">
echo $documentation->showCode($lines, 'php'); ?><div class="documentation-example">
<?php
$btnLabel = $langs->trans('Label', 'php');
print dolGetButtonTitle($btnLabel, '', 'fa fa-download', '#', '', 0, ['forcenohideoftext'=>1]); // Not Enough Permissions
print dolGetButtonTitle($btnLabel, '', 'fa fa-download', '#', '', 1, ['forcenohideoftext'=>1]); // Active
@@ -333,7 +332,6 @@ $documentation->showSidebar(); ?>
print dolGetButtonTitle($btnLabel, '', 'fa fa-download', '#', '', -1, ['forcenohideoftext'=>1]); // Functionality is disabled
print dolGetButtonTitle($btnLabel, '', 'fa fa-download', '#', '', -2, ['forcenohideoftext'=>1]); // Disabled without info
?>
</div>