PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

A visual editor in Gravity forms ?

  1. job78
    Member

    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.

    Posted 12 years ago on Wednesday September 14, 2011 | Permalink
  2. 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.

    http://www.tinymce.com/
    http://ckeditor.com/

    Posted 12 years ago on Wednesday September 14, 2011 | Permalink
  3. job78
    Member

    Thank you very much Kevin for your quick reply !

    Posted 12 years ago on Wednesday September 14, 2011 | Permalink
  4. Francois
    Member

    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 ?

    Posted 12 years ago on Monday October 10, 2011 | Permalink
  5. 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.

    http://www.tinymce.com/wiki.php/Installation

    http://docs.cksource.com/

    Posted 12 years ago on Monday October 10, 2011 | Permalink
  6. 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();
    Posted 12 years ago on Tuesday October 11, 2011 | Permalink
  7. Francois
    Member

    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

    Posted 12 years ago on Tuesday October 11, 2011 | Permalink
  8. Francois
    Member

    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 ?

    Posted 12 years ago on Tuesday October 11, 2011 | Permalink
  9. Can you post a link to your form please?

    Posted 12 years ago on Wednesday October 12, 2011 | Permalink
  10. Francois
    Member

    http://postimage.org/image/26h2qy9fo/

    Posted 12 years ago on Wednesday October 12, 2011 | Permalink
  11. Francois
    Member

    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>
    Posted 12 years ago on Wednesday October 12, 2011 | Permalink
  12. 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.

    Posted 12 years ago on Wednesday October 12, 2011 | Permalink

This topic has been resolved and has been closed to new replies.