Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Jeff Starr

    (@specialk)

    Confused. Isn’t markup the same thing as HTML..?

    Thread Starter jamword22

    (@jamword22)

    HTML is HyperText Markup Language. There are other ways of creating hypertexts, but there is a difference yes…

    “Markup” can mean lots of things, including HTML. So our blog authors, who are developers, noted the difference and when they choose HTML that is what they are expecting it to show on the front.

    Plugin Author Jeff Starr

    (@specialk)

    Which library are you using?

    Thread Starter jamword22

    (@jamword22)

    We are using prism.

    Plugin Author Jeff Starr

    (@specialk)

    Ok and so for the pre/code tag, which language attribute are you adding? For example:

    <pre><code class="language-cpp">...</code></pre>

    ..the language attribute is cpp. What are you using for your code snippets?

    Thread Starter jamword22

    (@jamword22)

    We are just pasting from our Docs in most cases that relates to our platform. In this case all we are doing is pasting the html into the block and then choosing the language. We have not wrapped it in pre or code. Is that needed in some way?

    Plugin Author Jeff Starr

    (@specialk)

    Not if using the block. If you view the block source you can check the language attribute. So for the block, you are choosing HTML, correct? If so, that’s the only available highlighting for all markup-related code. From the plugin Installation docs:

    HTML/XML/Etc. = markup, html, xml, svg, mathml, ssml, atom, rss

    That means that Prism.js supports one set of styles for all types of markup languages. There is no separate highlight styles for markup vs. HTML or any other markup. It’s all the same.

    I hope this helps. Let me know if I can provide any further infos. Glad to help anytime.

    Thread Starter jamword22

    (@jamword22)

    Hello, the code highlighting of html is not really an issue, where the “Markup” text showing on the front when adding html code is added is what this post is focused on. So is this something that can be altered in the plugin, or will you be keeping “Markukp” text showing on the front end when a person hovers over the code?

    • This reply was modified 2 years, 10 months ago by jamword22.
    • This reply was modified 2 years, 10 months ago by jamword22.
    • This reply was modified 2 years, 10 months ago by jamword22.
    Plugin Author Jeff Starr

    (@specialk)

    Okay I understand now, thanks for explaining further. So the Show Language plugin does support custom language attribute, but I’m not sure if possible to add via block. Specifically check out the data-language information in the Show Language docs.

    Thread Starter jamword22

    (@jamword22)

    Hello Jeff,

    We went ahead and just turned off the language type showing on the front of the site, but I still suggest that it show “HTML” on the front if HTML is chosen as the language in this plugin. If markup is chosen then “Markup” should show on the front.

    Plugin Author Jeff Starr

    (@specialk)

    Understood. Will take a closer look at this for the next plugin update. Thank you for your feedback, @jamword22.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘HTML chosen but Markup is showing as the code on frontend’ is closed to new replies.