[Resolved] Showing code in website looks like showing it in editor

Home Forums Support [Resolved] Showing code in website looks like showing it in editor

Home Forums Support Showing code in website looks like showing it in editor

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #746803
    trung

    Hi GeneratePress.

    I want to copy GP effective code and paste into my website’s posts to help my customers, look like what you are doing in support forum. How can I show code in my posts looks like in editor (such as Sublime Text 3 with black background, different colors) or looks like in GP support forum.

    Thank you.

    #746862
    David
    Staff
    Customer Support

    Hi there,

    you can wrap your code like so:

    <pre>
        <code>
            My code in here
        </code>
    </pre>

    Note:
    HTML i would add to the visual editor and then go to the Text editor, you will see the code has been escaped. And in there add the code and pre tags around it.

    #751375
    trung

    Thank you, David.

    #751377
    David
    Staff
    Customer Support

    You’re welcome

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.