Download
We're evolving to serve you better! This current forum has transitioned to read-only mode. For new discussions, support, and engagement, we've moved to GitHub Discussions.

Make a untouched HTML post?

  • #9592
    Avatar photo[anonymous]

    I’m probably just not hitting the right keywords.

    How do I do a untouched HTML post?

    The WYSIWYG editor HTML function keeps modifying my code and warping everything in needless <p>tags.

    I need to make some posts/pages with untoched HTML.

    #9596
    Avatar photo[anonymous]

    To cover most requirements, and to do so safely from a security standpoint, meet SEO and accessibility standards, etc., you can use one of the three editors available in Publii: WYSIWYG editor, Block editor, or Markdown editor. For me personally, I mostly tend to use WYSIWYG editor mainly because it’s what I’m used to and seems most flexible to me.

    The WYSIWYG editor toolbar covers most requirements to enter content into your pages: text, images, galleries, videos, files, etc. By using the buttons and commands on the editors, perhaps one of the core ideas is to help protect non-technical users.

    To enter any HTML code or javascript directly into pages could introduce security risks or cause other problems. But for users who understand the risks, if you want more or have greater flexibility, check out in Publii: Site Settings > Advanced Options > Editors > WYSIWYG editor.

    More details at: https://getpublii.com/docs/website-settings.html#editors

    If you want to add custom config and JavaScript to your editor directly to theme, check out: https://getpublii.com/dev/how-to-add-custom-config-or-js-for-post-editor/

    You can also search in this forum for more past answers and solutions.

    #9597
    Avatar photo[anonymous]

    Hi,

    Please try to use Markdown editor and put your HTML code – it should use your raw HTML then 🙂

    #9605
    Avatar photo[anonymous]

    Settings > Advanced Options > Editors > WYSIWYG

    Did not appear to have anything that would fix the issue. I’m not trying to include tags that are being striped out, I just wanted it to not wrap layout tags in <p> tags.

    Thanks Tomasz, pasting the HTML code in Markdown did in fact result in none of my images being wrapped in <p> tags.