WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.6 is now available!


Will it continue with WB? It goes on! | Geht es mit WB weiter? Es geht weiter!
https://forum.websitebaker.org/index.php/topic,32340.msg226702.html#msg226702


The forum email address board@websitebaker.org is working again
https://forum.websitebaker.org/index.php/topic,32358.0.html


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.

Donate with PayPal buttonSpenden mit dem PayPal-Button

  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.11.x) »
  • Modules (Moderator: Boudi) »
  • too few lines when switching CKEditor to none
  • Print
Pages: [1]   Go Down

Author Topic: too few lines when switching CKEditor to none  (Read 17652 times)

Offline betra

  • Posts: 32
too few lines when switching CKEditor to none
« on: November 16, 2018, 02:58:15 PM »
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
Logged

Offline jacobi22

  • Betatester
  • **
  • Posts: 5920
Re: too few lines when switching CKEditor to none
« Reply #1 on: November 16, 2018, 03:09:29 PM »
modules/wysiwyg/modify.php, search for this line

Code: [Select]
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
Logged

Offline betra

  • Posts: 32
Re: too few lines when switching CKEditor to none
« Reply #2 on: November 16, 2018, 03:26:04 PM »
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
Logged

Offline jacobi22

  • Betatester
  • **
  • Posts: 5920
Re: too few lines when switching CKEditor to none
« Reply #3 on: November 16, 2018, 03:27:43 PM »
pls give me the wb-version-nr

Logged

Offline jacobi22

  • Betatester
  • **
  • Posts: 5920
Re: too few lines when switching CKEditor to none
« Reply #4 on: November 16, 2018, 03:31:16 PM »
Quote
But 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
Logged

Offline betra

  • Posts: 32
Re: too few lines when switching CKEditor to none
« Reply #5 on: November 16, 2018, 03:34:18 PM »
I have Website Baker Version 2.11.0.

I am content with a simple text-area, just want more than 2 lines.

Regard
Bernhard
Logged

Offline jacobi22

  • Betatester
  • **
  • Posts: 5920
Re: too few lines when switching CKEditor to none
« Reply #6 on: November 16, 2018, 04:18:45 PM »
File:  modules/wysiwyg/modify.php

the originalcode in Lines 76 - 79
Code: [Select]
<?php
echo $admin->getFTAN()."\n";
show_wysiwyg_editor('content'.$section_id,'content'.$section_id,$content,'100%','350', false);
?>

change it to

Code: [Select]
<?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
Logged

Offline DarkViper

  • Forum administrator
  • *****
  • Posts: 3087
  • Gender: Female
Re: too few lines when switching CKEditor to none
« Reply #7 on: November 16, 2018, 04:18:47 PM »
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.
« Last Edit: November 16, 2018, 04:35:20 PM by DarkViper »
Logged
Der blaue Planet - er ist nicht unser Eigentum - wir haben ihn nur von unseren Nachkommen geliehen

"We need education to cope with digitalization - and NOT the digitalization of education.!"

Tägliches Stoßgebet: Oh Herr, wirf Hirn vom Himmel !

Offline jacobi22

  • Betatester
  • **
  • Posts: 5920
Re: too few lines when switching CKEditor to none
« Reply #8 on: November 16, 2018, 04:49:35 PM »
da sag ich jetzt mal nichts dazu....
Logged

Offline betra

  • Posts: 32
Re: too few lines when switching CKEditor to none
« Reply #9 on: November 16, 2018, 05:33:28 PM »
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
Logged

Offline jacobi22

  • Betatester
  • **
  • Posts: 5920
Re: too few lines when switching CKEditor to none
« Reply #10 on: November 16, 2018, 05:44:24 PM »
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
Logged

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.11.x) »
  • Modules (Moderator: Boudi) »
  • too few lines when switching CKEditor to none
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2