• Resolved Webbureau.dk

    (@twolle)


    Is it possible to change the texteditor used on the frontend?

    I would like the standard that comes with WordPress, because it supports headings <h2></h2> and alignments.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Webbureau.dk

    (@twolle)

    And also to add pictures to the descriptions.

    Plugin Author Greg Winiarski

    (@gwin)

    You can turn on the full tinyMCE editor by adding the code below in your theme functions.php file

    
    add_filter( "adverts_form_load", "customize_adverts_add" );
    function customize_adverts_add( $form ) {
      if( $form['name'] != "advert" ) {
        return $form;
      }
      foreach( $form["field"] as $key => $field ) {
        if( $field["name"] == "post_content" ) {
            $form["field"][$key]["mode"] = "tinymce-full";
        }
      }
      return $form;
    }
    

    The file uploads will be possible only for users with file_upload capability, you can enable this capability for any user using a plugin like Members, but keep in mind that if you are allowing anyone to post an Ad in the frontend then this is a potential security issue.

    Thread Starter Webbureau.dk

    (@twolle)

    Thanks, Greg 🙂

    Is it possible to remove the “Upload picture function” on the tinymce-full?

    And to have another “Add picture function” without the security issues?

    Plugin Author Greg Winiarski

    (@gwin)

    I am afraid this is not really possible, note that the security issue is that any user has upload_files capability, the image editor itself is not insecure on its own.

    Either way replacing it with some custom image uploader will be quite a lot of work as this is pretty complicated functionality. For images it is just best to use the Adverts Gallery.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Changing the texteditor’ is closed to new replies.