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.

Cannot add “minlength” tag to textarea in HTML mode

  • #5867
    Avatar photo[anonymous]

    Hi,

    I use WYSIWYG editor, and I’d like to add a “minlength” attribute to textarea in HTML mode, but the Publii remove it after I save changes.

    Reproduce the issue:

    1. Open a new post with WYSIWYG editor
    2. Switch to HTML mode
    3. Add this code:
      <form><textarea minlength="5"></textarea> <input type="submit" value="Check"></form>
    4. Press “Apply changes”
    5. Go back to HTML editor
    6. You will see the code without the minlength attribute:
      <form><textarea></textarea> <input type="submit" value="Check"></form>

    Is it a bug? How can I add “minlength” attribute to textarea?

    Thank you!

    Feriman

    #5875
    Avatar photoBob

    Try to use the block editor for this post, it should work here.

    #5886
    Avatar photo[anonymous]

    Thank you, it works in Block editor.

    #5894
    Avatar photo[anonymous]

    Feriman – since Publii 0.38 you can also go to Site settings -> Advanced options -> Editors and use option “Additional valid elements in the WYSIWYG editor” to allow missin attributes