SocialEngine - TinyMCE Remove Extra Space

Moving a discussion to this thread for easier searching. This is from this thread.

"It's the DOUBLE SPACE every time you hit the enter key. :( I know there is a fix do you or does anyone know it? :)

I know shift + enter works. But I'm looking for the code to just change it?"

For #SocialEngine and #TinyMCE

Comments

  • I found a way to change this but TinyMCE said that changing it can break the editor. It is also an SE source hack. I will post it here but caution against doing it. If you do this, it will be overwritten on upgrades. You might also need to change it per module if the main fix doesn't show in some modules as they each can have their own TinyMCE config file.

    Find /application/libraries/Engine/View/Helper/TinyMce.php

    In that file, find the following:

    protected $_config = array(
        'mode' => 'textareas',
        'plugins' => array(
          'table', 'fullscreen', 'media', 'preview', 'paste', 'code', 'image',
          'textcolor'
        ),
        'theme' => 'modern',
        'menubar' => false,
        'statusbar' => false,
        'toolbar1' => array(
          'undo', 'redo', 'removeformat', 'pastetext', '|', 'code', 'media',
          'image', 'link', 'fullscreen', 'preview'
        ),
        'toolbar2' => '',
        'toolbar3' => '',
        'element_format' => 'html',
        'height' => '225px',
        'convert_urls' => false
      );
    

    Add 'forced_root_block' => false, as shown below

    protected $_config = array(
        'mode' => 'textareas',
        'plugins' => array(
          'table', 'fullscreen', 'media', 'preview', 'paste', 'code', 'image',
          'textcolor'
        ),
        'theme' => 'modern',
        'menubar' => false,
        'statusbar' => false,
        'toolbar1' => array(
          'undo', 'redo', 'removeformat', 'pastetext', '|', 'code', 'media',
          'image', 'link', 'fullscreen', 'preview'
        ),
        'toolbar2' => '',
        'toolbar3' => '',
        'element_format' => 'html',
        'forced_root_block' => false,
        'height' => '225px',
        'convert_urls' => false
      );
    

    Test it well. I don't know the implications of this since TinyMCE doesn't recommend it.

    beast-usa
  • This will be a late night test LOL
    Thank you!

    data66
Sign In or Register to comment.