Correct the formatting of the new editor in source code mode Hitskin_logo Hitskin.com

This is a Hitskin.com skin preview
Install the skinReturn to the skin page

The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

    Correct the formatting of the new editor in source code mode

    Ange Tuteur
    Ange Tuteur
    Forumaster


    Male Posts : 13246
    Reputation : 3000
    Language : English & 日本語
    Location : Pennsylvania

    Tutorial Correct the formatting of the new editor in source code mode

    Post by Ange Tuteur August 20th 2014, 7:19 pm

    Correct the formatting of the new editor in source code mode


    This tutorial attempts to try* and prevent certain problems caused by the new editor in Source Code Mode.

    * The problems are resolved in a timely manner, there may be other problems because of the correction.

    Installing

    Go to Administration Panel > Modules > JavaScript codes management make sure JavaScript code management is enabled, and create a new script.

    Title : Sceditor Correction
    Placement : In all the pages
    Code:
    $(function() {
      var a = $("#text_editor_textarea"), t;
      a.length && (t = a.val()) && $(function() {
        a.sceditor && a.sceditor("instance") && a.sceditor("instance").val(t);
      });
    });