• Samuel

    (@samuelmedina)


    Learnpress overrides the CODE block, disabling the use of code highlight plugins like Prismatic or Code Syntax Block.

    It is not something that can be adjusted with CSS -for what I see- because Learnpress deletes the classes that allow the different colors in the highlight/markdown.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author ThimPress

    (@thimpress)

    Hi Samuel,

    We don’t know that :).

    You can provide some code we override, so we can check to find a solution.

    Thanks.

    Thread Starter Samuel

    (@samuelmedina)

    As mentioned, it is the WordPress code block -like add header block, or paragraph block-.

    Thankfully the plugin “Syntax-highlighting Code Block (with Server-side Rendering)” overrides Learnpress CODE block, and bridges Learnpress CODE Block classes deletion, allowing code highlighting.

    I have the same issue with other plugin, in my case is Prismatic.
    The code example decoration is good only when it is in a post but LearnPress lessons.
    This is what i have when use the same plugin function for a post: click here
    I want have the same result when i use that function on LearnPress lessons but it won’t work. Here is the result: click here
    I would love to use source code markup in my learnpress lessons.
    Thanks.

    • This reply was modified 2 years, 3 months ago by trieuthan92.
    Plugin Author ThimPress

    (@thimpress)

    Hi Samuel,
    If you talk about style tag “code”, and you use editor Gutenburg, you need go to setting: Learnpress > Settings > Advanced > Enable gutenberg . The styles will run normally. We tested like the image

    Hi trieuthan92,
    We tested your site, and try your code to the lesson, we see it display normally like the image.

    Thanks.

    • This reply was modified 2 years, 3 months ago by ThimPress.
    Thread Starter Samuel

    (@samuelmedina)

    @thimpress The image you provided isn′t highlighted.

    This is an example of what code syntax highlighting looks like https://miro.medium.com/max/1400/1*8DbEBAv_L1pK-1Xm03XEzw.png
    That is the feature that plugins like “Prismatic” or “Code Block Syntax” provide for example to teach coding. Those plugin work outside of Learnpress, but not in LP lessons.

    Nevertheless, @trieuthan92 I mentioned the way I solved that using that other plugin that overrides LP, but it doesn′t have themes as Prismatic, but you can write CSS if you want it to look different.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Learnpress overrides the CODE block’ is closed to new replies.