• Resolved jchambo

    (@jchambo)


    Greetings!

    Is there a way to leverage this plugin for inline code? The default “code” option in WordPress is ugly and would prefer to use this plugin instead. Example, highlight certain text within a normal paragraph / block of text, like this for example:

    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc a sapien nec massa porta sollicitudin. Quisque ut risus lacus. Morbi volutpat enim a ex elementum, ac iaculis urna elementum. In sagittis interdum ante, non commodo urna pretium sed. Fusce convallis consectetur ante et sollicitudin. Sed a mauris cursus, aliquet mauris ac, rutrum turpis. Duis vestibulum euismod porttitor.

    Thank you in advance!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter jchambo

    (@jchambo)

    I just figured this out. You can leverage inline code style by adding a class to the <code>.

    Example, by default, when using the <code> option in WordPress for text, it doesn’t add a class of any kind. Just switch over to the “Code” tab when editing text (a blog post for example) and add a class in the following format:

    <code class="language-css">Example text</code>

    Just change the above language to that of which you are using:

    • HTML: <code class="language-html">
    • CSS: <code class="language-css">
    • JavaScript: <code class="language-javascript">
    • Python: <code class="language-python">
    • C++: <code class="language-cpp">
    • Java: <code class="language-java">
    • PHP: <code class="language-php">
    • Markdown: <code class="language-markdown">
    Plugin Author Jeff Starr

    (@specialk)

    Correct, this also is explained in the plugin documentation, just fyi. Cheers 🙂

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Inline Code Option Available?’ is closed to new replies.