• Resolved BeyondLine

    (@beyondline)


    Hi,
    i have a control inner blocks field named texte.
    When i put in frontend html : {{texte}} and go see in frontend i see :

    <p>Hello</p>

    when i add a paragraph block as an inner block… So i don’t figure out why the “<p> … </p>” appears .. Same thing if i add a title block like h2, in front i have “<h2>Title</h2>”

    Thanks for your help

Viewing 7 replies - 1 through 7 (of 7 total)
  • I think the editor provided in this plugin needs html tag to work properly so in your case you need to put it something like this <div>{{{control_name}}}</div> a div tag will handle it output.

    Thread Starter BeyondLine

    (@beyondline)

    Actually my frontend html code is as follow :

    <section>
    {{texte}}
    </section>

    i also tried :
    <section>
    <p>{{texte}}</p>
    </section>

    Nothing works.. Thanks

    Thread Starter BeyondLine

    (@beyondline)

    I also tried to change the_content() into template file with echo get_the_content(). In that case it is working i get “hello” without <p> tags but many other problems occurred… it looks like something about <!– –> gutenberg commentary tags perhaps … not sure.

    Thanks for your help

    Thread Starter BeyondLine

    (@beyondline)

    I SOLVED IT!

    For any other people in this situation : you need to escape html using handlebar specification : {{{texte}}} (triple instead of double)

    This kind of issue was not with me, no any extra html is coming in my case the output is coming as I provide in the outbox.

    But in case of using Code editor or Rich Text (WYSIWYG) field , the code used are showing as html text, for example when I using rich text field and make some text bold in it. Instead of showing it as bold in frontend, its showing tag surrounding it. have you checked that ?

    Only in that case I need to use three curly brackets, as mentioned in documentation at https://lazyblocks.com/documentation/blocks-controls/rich-text-wysiwyg/ , I think it missing in https://lazyblocks.com/documentation/blocks-controls/code-editor/ page, that need the plugin developer to update to mention that use three curly braces in case of these two fields.

    Plugin Author Nikita

    (@nko)

    Hey.

    @hozefasmile slightly extended documentation page for Code Editor.

    Regards, nK.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Html outputs in frontend’ is closed to new replies.