Skip to content

added markdown parsing to textarea labels, in the spirit of f19a65b7d…#281

Open
albapa wants to merge 2 commits intogetgrav:developfrom
albapa:develop
Open

added markdown parsing to textarea labels, in the spirit of f19a65b7d…#281
albapa wants to merge 2 commits intogetgrav:developfrom
albapa:develop

Conversation

@albapa
Copy link
Copy Markdown

@albapa albapa commented Oct 4, 2018

This is a proposed solution to the problem in

https://discourse.getgrav.org/t/markdown-in-form-label-to-add-page-link/5386/8

i.e. markdown parsing in textarea labels. It's basically copy-pasta of the relevant parts in f19a65b

{% block input %}
{% set id = field.id|default(field.name) ~ '-' ~ key %}
<div class="{{ form_field_wrapper_classes ?: 'form-textarea-wrapper' }} {{ field.size }} {{ field.wrapper_classes }}">
<label style="display:inline;" class="inline" for="{{ id|e }}">
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the purpose of putting the label in this input block and not the label block? This will change the display on all forms with textarea as the div/class structure is changed.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that's right. I've rearranged the code now. Let me know if that looks better!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants