Results 1 to 10 of 10

Thread: Zeilenabstand im HTML-Editor

  1. #1
    uschinator is offline Registered User
    Join Date
    Jan 2009
    Posts
    16
    Downloads
    0
    Uploads
    0

    Default Zeilenabstand im HTML-Editor

    Hallo,

    warum lässt der HTML-Editor zwischen 2 Zeilen immer so viel Platz?
    Kann man das ändern? Ich benutze die Version 0.2.1-stable.

    Grüße
    Last edited by uschinator; 04-17-2009 at 04:49 PM. Reason: RC-Version hinzugefügt

  2. #2
    rosali's Avatar
    rosali is offline Super Moderator
    Join Date
    Dec 2007
    Location
    Germany
    Posts
    2,395
    Downloads
    36
    Uploads
    0

    Default

    Probiere mail Shift + Enter!
    Regards,
    Rosali

    __________________
    MyRoundcube Project http://myroundcube.googlecode.com
    MyRoundcube Online Demo - Free Email Address http://mail4us.net
    MyRoundcube Plugins Generic Installation Guide http://mail4us.net/myroundcube/index.php
    Mailing List http://mail4us.net/?_action=plugin.nabble

  3. #3
    uschinator is offline Registered User
    Join Date
    Jan 2009
    Posts
    16
    Downloads
    0
    Uploads
    0

    Default

    Kann ich das auch ändern, sodass beim Betätigen der ENTER-Taste der Zeilenumbruch direkt unterhalb der darüber liegende Zeile durchgeführt wird und nur beim Betätigen von SHIFT+ENTER etwas Platz zwischen den Zeilen gelassen wird?

    Könnte natürlich auch sein, dass dies Editor-bedingt ist, aber das ist nur eine Vermuung .

    Grüße

  4. #4
    rosali's Avatar
    rosali is offline Super Moderator
    Join Date
    Dec 2007
    Location
    Germany
    Posts
    2,395
    Downloads
    36
    Uploads
    0

    Default

    Das müsste in TinyMCE geändert werden. Frag mich aber nicht wo.
    Regards,
    Rosali

    __________________
    MyRoundcube Project http://myroundcube.googlecode.com
    MyRoundcube Online Demo - Free Email Address http://mail4us.net
    MyRoundcube Plugins Generic Installation Guide http://mail4us.net/myroundcube/index.php
    Mailing List http://mail4us.net/?_action=plugin.nabble

  5. #5
    rosali's Avatar
    rosali is offline Super Moderator
    Join Date
    Dec 2007
    Location
    Germany
    Posts
    2,395
    Downloads
    36
    Uploads
    0

    Default

    Regards,
    Rosali

    __________________
    MyRoundcube Project http://myroundcube.googlecode.com
    MyRoundcube Online Demo - Free Email Address http://mail4us.net
    MyRoundcube Plugins Generic Installation Guide http://mail4us.net/myroundcube/index.php
    Mailing List http://mail4us.net/?_action=plugin.nabble

  6. #6
    EinfachClicken's Avatar
    EinfachClicken is offline Registered User
    Join Date
    Apr 2008
    Location
    Florida - USA
    Posts
    51
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by rosali View Post
    Well, I was able to find the editor.js file without a problem, but I suspect that the information in the wiki is outdated since neither the line at the top such as force_br_newlines : true, could be located by me, nor could this php line at the bottom $content = $_REQUEST['content']; be found anywhere.

    I too would like to use the BR as opposed to the paragraph setting because I find it quite annoying when my composed mail takes up twice as many lines as needed ... or if I receive a 10 line letter from someone through which I now have to scroll twice as much just because there's this annoying (not needed nor wanted) dead space between the lines.

    I could and would like to see 1.5 spacing as per our office software, but doublespacing is clearly over the top, especially for something simple like email where many people just write a few lines on average. Any other suggestions, rosali?

    ------> Huch, Sorry, bemerkte eben erst das ich im Deutschen Forum bin, aber rosali spricht ja beides fließend, also lassen wir den Beitrag mal so.
    .
    .
    .
    Ever try Ubuntu? It's incredible!
    After 18 years with Windows, I finally made the switch for free at www.ubuntu.com
    Stable, Safe & Reliable - Hundreds of Free Apps - Hundreds of Games - Professional Office Suite included - Child's play to install and to use!

  7. #7
    rosali's Avatar
    rosali is offline Super Moderator
    Join Date
    Dec 2007
    Location
    Germany
    Posts
    2,395
    Downloads
    36
    Uploads
    0

    Default

    Fließend Englisch? Naja....

    Zum Thema: Funktioniert doch so wie im WIKI beschrieben. Schreibe in den Initialisierungsblock in editor.js

    force_br_newlines : true,
    forced_root_block : '', // Needed for 3.x

    Er muss dann insgesamt so ausehen:
    HTML Code:
      else // mail compose
        tinyMCE.init({ 
          mode : 'textareas',
          editor_selector : 'mce_editor',
          accessibility_focus : false,
          apply_source_formatting : true,
          theme : 'advanced',
          language : editor_lang,
          plugins : 'emotions,media,nonbreaking,table,searchreplace,visualchars,directionality' + (spellcheck ? ',spellchecker' : ''),
          theme_advanced_buttons1 : 'bold,italic,underline,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,bullist,numlist,outdent,indent,separator,link,unlink,emotions,charmap,code,forecolor,backcolor,fontselect,fontsizeselect, separator' + (spellcheck ? ',spellchecker' : '') + ',undo,redo,image,media,ltr,rtl',
          theme_advanced_buttons2 : '',
          theme_advanced_buttons3 : '',
          theme_advanced_toolbar_location : 'top',
          theme_advanced_toolbar_align : 'left',
          extended_valid_elements : 'font[face|size|color|style],span[id|class|align|style]',
          content_css : skin_path + '/editor_content.css',
          external_image_list_url : 'program/js/editor_images.js',
          spellchecker_languages : (rcmail.env.spellcheck_langs ? rcmail.env.spellcheck_langs : 'Dansk=da,Deutsch=de,+English=en,Espanol=es,Francais=fr,Italiano=it,Nederlands=nl,Polski=pl,Portugues=pt,Suomi=fi,Svenska=sv'),
          gecko_spellcheck : true,
          relative_urls : false,
          remove_script_host : false,
          force_br_newlines : true,
          forced_root_block : '', // Needed for 3.x
          rc_client: rcmail,
          oninit : 'rcmail_editor_callback'
        });
    Das Ganze bezieht sich auf die aktuelle RoundCube Version und nicht auf das, was ich vor einem Jahr bei Dir installiert habe ... Ich weiss nicht, wie die damalige Version in diesem Teil gearbeitet hat.

    Um den "Erfolg" zu testen, musst Du auch den Browser Cache löschen. Ansonsten wird vielleicht die alte editor.js benutzt und es sieht aus als hätte die Änderung keine Effekt.
    Regards,
    Rosali

    __________________
    MyRoundcube Project http://myroundcube.googlecode.com
    MyRoundcube Online Demo - Free Email Address http://mail4us.net
    MyRoundcube Plugins Generic Installation Guide http://mail4us.net/myroundcube/index.php
    Mailing List http://mail4us.net/?_action=plugin.nabble

  8. #8
    rosali's Avatar
    rosali is offline Super Moderator
    Join Date
    Dec 2007
    Location
    Germany
    Posts
    2,395
    Downloads
    36
    Uploads
    0

    Default

    So, jetzt habe ich mir das TinyMCE Wiki nochmal angeschaut und es mit Deinem Post abgeglichen ...

    Das oben Gesagte gilt nach wie vor.

    Du verstehst aber m.E. die Anleitung im WIKI nicht.

    Damit möchte ich nur sagen, dass man Programmierkenntnisse braucht, wenn man in RoundCube (oder irgend einem anderen Open Source Produkt) etwas verändern will.

    Es gibt in der Regel keinen Knopf, um das einfach einzustellen.

    TinyMCE Wiki zeigt folgende Alternativen auf:

    #1: Ändere das Zeilenumbruchverhalten wie oben aufgezeigt ...
    HTML Code:
    tinyMCE.init({
    	...
    	force_br_newlines : true,
            forced_root_block : '' // Needed for 3.x
    });
    #2-Behalte die empfohlenen Umbrüche mit <p> (pragraph tags) und ändere das Client-seitige Verhalten per CSS.

    Dazu musst Du im Skin editor_content.css eingreifen ...

    HTML Code:
    p {margin: 0; padding: 0;}
    ... ändert die Randabstände (wenn man CSS kennt, klares Beispiel) ...

    #3-Wenn Du Dich für die empfohlene Methode #2 entscheidest, dann bedeutet das, dass Du zusätzlich in RoundCube Core eingreifen musst, um die Klasse, die das zu versendende Email hält, wie im Beispiel ...

    HTML Code:
    // Get content from TinyMCE
    $content = $_REQUEST['content'];
    $content = preg_replace('/<p[^>]*>/', '', $content); // Remove the start <p> or <p attr="">
    $content = preg_replace('/<\/p>/', '<br />', $content); // Replace the end
    echo $content; // Output content without P tags
    ... aufgezeigt durch Ersetzen der <p> tags mit <br> tags vor dem Absenden zu verändern hast (ansonsten hilft Dein Client-CSS nicht, da Du ja nicht weisst, was der Empfänger für ein Layout für die Anzeige der Mail verwendet).

    Das ist eine klare Anleitung für jemanden, der Grundkenntnisse in JS/CSS/HTML/PHP hat. Das WIKI ist nicht überholt; es ist aktuell.

    Das ist wirklich keine Kritik an Deinem Post. Ich wollte nur mal aufzeigen, dass Eingriffe in RoundCube - oder anderen Produkten - nicht soooo einfach sind. Scheinbar einfache Frage und doch so kompliziert, je nach Sichtweise ...

    Ah ja, und noch eine Anmerkung: Wenn das jemand einbaut ... bei künftigen RoundCube Updates wird es wieder überschrieben ... das ist nochmal eine andere Baustelle: Also solche Wünsche am besten per Ticket an http://trac.roundcube.net
    Last edited by rosali; 05-20-2009 at 08:27 PM.
    Regards,
    Rosali

    __________________
    MyRoundcube Project http://myroundcube.googlecode.com
    MyRoundcube Online Demo - Free Email Address http://mail4us.net
    MyRoundcube Plugins Generic Installation Guide http://mail4us.net/myroundcube/index.php
    Mailing List http://mail4us.net/?_action=plugin.nabble

  9. #9
    shure123 is offline Roundcube Newcomer
    Join Date
    Oct 2011
    Posts
    7
    Downloads
    0
    Uploads
    0

    Default

    Hallo,

    entschuldigung dass ich diesen alten Beitrag nocheinmal aufgreife.

    Ich habe meine editor.js mit dem Code

    force_br_newlines : true,
    force_p_newlines : false,
    forced_root_block : '' // Needed for 3.x

    angepasst.

    Das funktioniert auch beim Weiterleiten und verfassen einer neuen Nachricht.
    Beim Weiterleiten verwendet er nachwievor die p-tags. Gibt es da eine extra config?

    LG

  10. #10
    oldschool's Avatar
    oldschool is offline Registered User
    Join Date
    Jul 2007
    Posts
    173
    Downloads
    8
    Uploads
    0

    Default

    Nach dem Durchackern von fast unendlich vielen Seiten bezüglich dieses Themas, fand ich das Zitat (sinngemäß) "Der Zeilenumbruch folgt dem MS Office Standard".


    Office ist kein Standard. Weder heute, noch vor 10 Jahren, noch vor 20 Jahren, oder gar 30 Jahren.
    Die haben noch NIE etwas von Typografie gehört!



    Quote Originally Posted by shure123 View Post
    Das funktioniert auch beim Weiterleiten und verfassen einer neuen Nachricht.
    Beim Weiterleiten verwendet er nachwievor die p-tags. Gibt es da eine extra config?
    LG
    Yeepp, da bin ich mittlerweile auch schon drüber gestolpert.
    Vielleicht finde ich da noch etwas...



    Rgds.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •