libreform / wp-libre-form

Easy native HTML5 forms for WordPress. Version 1.5 is unmaintained, but works without issue. 2.0 has been rewritten from the ground, and can be found at https://github.com/libreform/libreform
https://wordpress.org/plugins/wp-libre-form
GNU General Public License v3.0
67 stars 27 forks source link

Added Textarea Parser #79

Closed lotharthesavior closed 5 years ago

lotharthesavior commented 7 years ago

Hello,

I added an option on the form editor to mark if the current form will replace textareas by wp_editors, which are more advanced for specific purposes. I believe this could be a good add-on to this plugin.

Best Regards Savio Resende

anttiviljami commented 7 years ago

Hi! Thanks for the PR.

There are a few things about this feature I don't like.

I would prefer if instead of a metabox in the admin panel, this feature would just be behind a filter. The reason being while this is a useful feature for a handful of people, most people would just be confused by it. (I initially was)

Also it would be good if the transformation didn't apply to simply all textareas but perhaps only to textareas with a class name of "wp_editor". This would allow you to still have regular textareas in addition to wp_editors.

A colleague of mine pointed out that you should also probably be using the wp_editor with the teeny flag on, when running in the frontend. You probably don't want to enable media uploads and such.

I'd be glad to merge a feature like this, but behind a filter like wplf_{form_id}_enable_tinymce

lotharthesavior commented 7 years ago

Thanks for your return. You pointed really good points there. I'll analyze how to improve.

Cheers, Savio Resende