Support » Plugin: WP Job Manager » Losing Formatting When Pasting Into Job Post Form

  • Resolved hastibe


    We’ve had employers contact us, asking if anything can be done about the formatting of their job opening announcements being lost when they paste the announcement into the WP Job Manager job post form.

    Is there anything that can be done about this?

    To further explain and provide an example, when pasting from Word, a PDF, or even an already published WPJM job post, the bullet point and numbered list formatting is lost (and sometimes the bolding and similar formatting, too).

    As one example, copy the description of this job post and paste it into the description field in the job post form on the WP Job Manager demo site.

    See how bullet points, numbered list, and bolding doesn’t carry over?

    Any suggestions are welcome–we’re doubtful anything can be done, but understand why employers would be frustrated to have to re-add all the formatting when they are using our site, especially when they have a lot of job openings to post!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Solutuon is interesting to me too,
    if you find a solution, is it possible to communicate it?
    thank you in advance

    Plugin Contributor Richard Archambault


    Oh, wow! Thanks for pointing this out!

    Unless I’m missing something, it looks like just unsetting “paste_as_text” below does the trick?

    add_filter( 'submit_job_form_wp_editor_args', function( $args ) {
            // Comment these lines to ENABLE the feature
    	// unset( $args['tinymce']['paste_auto_cleanup_on_paste'] ); // I would keep this enabled
    	unset( $args['tinymce']['paste_as_text'] );
    	//unset( $args['tinymce']['paste_remove_spans'] );
    	//unset( $args['tinymce']['paste_remove_styles'] );
    	//unset( $args['tinymce']['paste_remove_styles_if_webkit'] );
    	//unset( $args['tinymce']['paste_strip_class_attributes'] );
    	return $args;
    } );
    Plugin Contributor Richard Archambault


    @hastibe I suggest experimenting with each one to make sure you get your desired result. 🙂

    Hmm, yes–I see that this also allows images to be pasted in (or to auto-generate from the URL), which is less than ideal. I’m currently also experimenting with adding this filter now, which seems very helpful.

    what do you add to allow the possibility to paste images?

    It does not work at home and yet I would like to allow this possibility

    thank you in advance

    Plugin Contributor Richard Archambault


    I’m marking this thread as Resolved as it’s been more than a month since the last reply. If you still need help, please do reply again and mark the thread as Unresolved!

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.