• Resolved worldsdream

    (@worldsdream)


    Hi!

    I have to ask if it’s possible to see the code in the backend. It’s easier for me to edit in there.

    At the moment, when I paste the code in gutenburg prism block, the code is not aligned. I have to check the front-end every time I make a change.

    Is it possible to have the code in the back-end showing?

    Thank you.

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

    (@specialk)

    Yes by default the Prismatic block retains indentation, line breaks, and other formatting. This works with Prism.js, Highlight.js, and “plain flavor” options. For example, if I copy a chunk of code that includes indentation, I can paste it directly into the Prismatic block and the indentation will be preserved on both front and backends.

    Thread Starter worldsdream

    (@worldsdream)

    Thanks Jeff, but the code is not aligned on the backend. Only on front-end.

    Is this normal?

    Plugin Author Jeff Starr

    (@specialk)

    Indentations are normal. Not sure what you mean by “aligned”?

    Thread Starter worldsdream

    (@worldsdream)

    Screenshots are always easier to understand when we like to explain.

    Back-end

    View post on imgur.com

    Front-end

    View post on imgur.com

    I am using the gutenburg block edit and I did add two blocks:
    /code
    /prismatic

    As you can see, the /code looks a little bit as the front-end, but not the same.
    The /prismatic looks not that good.

    The front-end looks the same on both.

    My question is, is it possible to have it in the back-end show as the front-end? Because as you can see the /prismatic block looks out of control and it’s not easy to edit for me when I have tables.

    I hope this helped you a bit more!

    Plugin Author Jeff Starr

    (@specialk)

    Yeah that explains it, thanks. So on the front-end screenshot where the code is aligned, that happens not because of the syntax highlighting, but rather because of the font. The frontend code is displayed in monospaced font, which is why the character alignment “looks” correct.

    In the backend the Prismatic block should display in monospace font. Looks like something has changed and now it is not. I’ve added this to the list for next update will get it fixed up.

    Thanks again for reporting.

    • This reply was modified 3 years, 9 months ago by Jeff Starr. Reason: typo
    Thread Starter worldsdream

    (@worldsdream)

    Thanks Jeff. Looking forward for the the next update.

    Plugin Author Jeff Starr

    (@specialk)

    Just to follow-up with this, the font issue is resolved in the next version (2.9) of Prismatic. Now using monospaced font for the Prismatic block. Thanks for reporting, @worldsdream.

    Thread Starter worldsdream

    (@worldsdream)

    Updated right now. It looks great, just like it should! Thanks, @specialk.

    Plugin Author Jeff Starr

    (@specialk)

    Cheers, @worldsdream. Thank YOU for reporting on the details.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘See code in gutenburg’ is closed to new replies.