• Resolved lukerebeiro

    (@lukerebeiro)


    Hi,

    Is it possible to get this to work with custom fields?
    I have created a ‘code block’ field with ACF that uses a wysiwyg editor field in text mode. However when rendering this field the code is not highlighted.

    The plugin works as expected for page/post editor content, but not for custom fields.

    Cheers

    Luke

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

    (@lukerebeiro)

    I have resolved this issue. I was using the <pre> and <code> tags in the wysiwyg field, I have instead put this in the template file, by wrapping the field output. I’m using twig.

    <pre>
        <code class="language-html">
                {{ module.code|escape }}
    </code>
    </pre>
    • This reply was modified 7 years, 8 months ago by lukerebeiro.
    • This reply was modified 7 years, 8 months ago by lukerebeiro.
    Plugin Author Jeff Starr

    (@specialk)

    Awesome lukerebeiro, glad you got it.

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

The topic ‘custom field support’ is closed to new replies.