Forums

[Plugin: SyntaxHighlighter Evolved] LTR Code on RTL Arabic Page (4 posts)

  1. tawqee3
    Member
    Posted 4 months ago #

    How can I force the code to display LTR in a RTL page?

    Thnx 4 ur support n advance.

  2. Viper007Bond
    Member
    Posted 4 months ago #

    No idea honestly. I didn't write the JS/CSS my plugin uses.

    You may need to make a custom CSS file.

  3. tawqee3
    Member
    Posted 4 months ago #

    I did wrap the whole code in a <p dir="rtl"> but that didn't help. CSS didn't help either.

    Any idea where exactly is the JS formatting?

  4. Code_M3
    Member
    Posted 3 months ago #

    Hey Tawqee3

    I had the same problem, all you have to do is simple fix in the core CSS file:
    wp-content/plugins/syntaxhighlighter/syntaxhighlighter/styles/shCore.css

    Add the following in this .syntaxhighlighter classname:
    direction: ltr !important;

    Thie forces the main div to render the text inside it to LTR on RTL pages.

    Regards,
    Abdulrahman

Reply

You must log in to post.

About this Topic