Hello,
I'd like to use Gravity forms to allow user generated content, and I just wanted to know if there is a visual editor (I mean the editor toolbar with link, styles, etc...) in gravity forms ? Thanks.
Hello,
I'd like to use Gravity forms to allow user generated content, and I just wanted to know if there is a visual editor (I mean the editor toolbar with link, styles, etc...) in gravity forms ? Thanks.
There isn't a built in WYSIWYG editor at this point. It's something we plan to add support for in a future version. For now, it's relatively easy to add the support using one of the free solutions like TinyMCE, CKEditor, etc.
Thank you very much Kevin for your quick reply !
You said : "it's relatively easy to add the support using one of the free solutions like TinyMCE, CKEditor, etc."
But do you know how ?
Yep, I've done it. I'm not going into installation instructions here.. that's a customization thing & out of the scope of normal support. You can find the installation documentation here. They've got everything you need to know to get it running.
With CKEditor it's super simple. Just use this method:
http://docs.cksource.com/CKEditor_3.x/Developers_Guide/jQuery_Adapter
Give you textarea a class, from the advanced tab and plop in the relevant code:
$( 'textarea.editor' ).ckeditor();
Is there really anyway to create a simple form with a large textarea that can be edited with tiny mce ? I cannot beleive that !
About CKEditor, you said that it was supler simple. Can you explain more in detail how to do ?
Thank's in advance for your support and your help
OK, now it's working with that :
1. In the form, choose a HTML block
2. In the content of the HTML block, past the following code :
[js]
<!-- OF COURSE YOU NEED TO ADAPT NEXT LINE TO YOUR tiny_mce.js PATH -->
<script type="text/javascript" src="../js/tiny_mce.js"></script>
<script type="text/javascript">
tinyMCE.init({
// General options
mode : "textareas",
theme : "advanced"
});
</script>
<textarea id="elm1" name="elm1" rows="15" cols="10" style="width: 80%">TEST</textarea>
But, for me, the tinyMCE bar is under the text and not at the beginning !!??!!
Strange isn't it ?
Can you post a link to your form please?
Now it's OK with the following code :
<script type="text/javascript" src="wp-content/plugins/gravityforms/js/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
tinyMCE.init({
// General options
mode : "textareas",
theme : "advanced",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : true,
});
</script>
<textarea id="elm1" name="elm1" rows="15" cols="10" style="width: 80%">TEST</textarea>
Just a quick note. Adding the ability to incorporate the TinyMCE editor with paragraph fields is an option we plan on adding in the future. We haven't done so yet because we don't want to have to bundle our own rich text editor script with Gravity Forms and would rather incorporate what WordPress already provides.
Unfortunately the way WordPress uses TinyMCE doesn't not lend itself well to being utilized by other plugins, especially on the front end.
The good news is WordPress 3.3 will be changing this and introducing an API that can be used so plugins and themes can make use of the Tiny MCE editor. So this is definitely a feature we will be adding in the future by taking advantage of new functionality coming in WordPress 3.3.