Support » Plugin: Enlighter - Customizable Syntax Highlighter » Pasted code from Enlighter indented by 4 spaces

  • Resolved snifflevalve


    Hi Andi,
    Sorry to bother you again, but I figured I had better check to see how the code copied from Enlighter looks when pasted into where it would be used. For my testing, I used Notepad ++ (Win) and Simple CSS (WP plugin).

    As the title says, the pasted code is indented by 4 spaces. However, when copied and pasted from both Raw code mode or Opened in new window, it aligns flush left (as expected).

    A couple questions then:
    – is there a way to have the pasted code from the Enlighter display align flush left?
    – would the indented code still work as expected?

    I would prefer to use the Enlighter display (I am using a Custom display as noted in my previous note) as it looks a lot nicer 🙂 Otherwise I will have to provide instructions on these pages on how to obtain code that won’t indent as the majority of visitors will just select the code and copy.


Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Andi Dittrich


    Hi Lyle,

    you should switch to “Raw Code” before copying code. Normally it should also work flawlessly with spaces – tabs may cause some issues – therefore they will be automatically replaced by N spaces to avoid side effects.

    its possible to set Enlighter -> Appearance -> Global Settings -> Code-Indent to No Modification – this keeps tabs but they might be removed by your browser. The RAW Code panel always contains the unmodified content.

    best regards, Andi

    Hi Andi,
    Once again, thank you so much for your timely support! 🙂

    I went with your suggestion of using RAW or Open in new Window for the code copying by adding a notice to those posts that have code to copy. Should do the trick 🙂

    Here is an example of what I am using Enlighter for:

    Thanks again!


    • This reply was modified 1 year, 8 months ago by snifflevalve.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Pasted code from Enlighter indented by 4 spaces’ is closed to new replies.