I have Website Baker Version 2.11.0.
When I switch the WYSIWYG Editor to none,
I get only 2 lines to edit my content.
Of course, by pulling it down with the mouse, the window size increases.
How can I get 20 lines by default?
Regards
Bernhard
modules/wysiwyg/modify.php, search for this line
echo show_wysiwyg_editor('content'.$section_id,'content'.$section_id,$content,'100%','258', false);
and change 258 to the wished height. add there also px or % to have a correct value
Thank you for the answer.
But I switch the Wysiwyg editor off (to none) in Options.
There should be annother mini Editor instead.
Even your line 'echo show_wysiwyg-edi....' is not in my modules/wysiwyg/modify.php file.
I have a line: 'function show_wysiwyg_editor($name,$id,$content,$width,$height)'
but the $height Variable is not set in this file.
Regards
Bernhard
pls give me the wb-version-nr
QuoteBut I switch the Wysiwyg editor off (to none) in Options.
There should be annother mini Editor instead.
No, that's wrong
there is only a simple text-area, not a mini editor
if you need a small editor, change the toolbar in modules/ckeditor/wb_config/wb_ckconfig.js to WB_Basic, WB_Simple or what ever you want
I have Website Baker Version 2.11.0.
I am content with a simple text-area, just want more than 2 lines.
Regard
Bernhard
File: modules/wysiwyg/modify.php
the originalcode in Lines 76 - 79
<?php
echo $admin->getFTAN()."\n";
show_wysiwyg_editor('content'.$section_id,'content'.$section_id,$content,'100%','350', false);
?>
change it to
<?php
echo $admin->getFTAN()."\n";
show_wysiwyg_editor('content'.$section_id,'content'.$section_id,$content,'100%','100px', false);
?>
important are the 100px here, maybe, you need only 80px
solution ist testet with WB 2.11.0
(https://i.gyazo.com/ca315c198e56e3c3b9134c9a8f6ca835.png)
open the file /modules/wysiwyg/modify.php and replace the 'height' argument by 'rows="20"' (or even the numer of lines you wish).
function show_wysiwyg_editor($name,$id,$content,$width,$height) {
echo '<textarea name="'.$name.'" id="'.$id.'" style="width: '.$width.'; rows="20";">'. $content.'</textarea>';
}
'height' is needed to reserve space for the CKEditor. A simple <textarea> needs the number of visible lines.
This solution gives you the freedom to switch in backend between Textarea and CKEditor (with original settings) at any time.
da sag ich jetzt mal nichts dazu....
Thank you both.
I changed
echo '<textarea name="'.$name.'" id="'.$id.'" style="width: '.$width.'; height:.$height.';">'.$content.'</textarea>';
into
echo '<textarea name="'.$name.'" id="'.$id.'" style="width: '.$width.'; height: 500px;">'.$content.'</textarea>';
The change from
show_wysiwyg_editor('content'.$section_id,'content'.$section_id,$content,'100%','350', false);
into
show_wysiwyg_editor('content'.$section_id,'content'.$section_id,$content,'100%','500px', false);
works the same way.
Thank you very much
Bernhard
the different between both solutions:
the solution from DarkViper (with the correct code ;-) ) works only, if no wysiwyg-editor is defined (set to NONE in wb-settings)
if you activate later the wysiwyg editor, he has the default height from the original code
my solution works also for a activated wysiwyg-editor, that means: with or without editor you have a textarea height from your defined value, for example 100px