This is a very simple script that will split up the text of the box in different lines and fill them in in the title, excerpt and two custom fields.
jQuery( function( $ ) {
$( '#wpse18528_paste_box' ).keyup( function() {
var text = $( '#wpse18528_paste_box' ).val();
var lines = text.split( /[\n\r]+/ );
$( '#title' ).val( lines[0] );
$( '#title' ).siblings( '#title-prompt-text' ).css( 'visibility', 'hidden' );
$( '#excerpt' ).val( lines[2] );
$( '#wpse18528_source' ).val( lines[1] );
$( '#wpse18528_link' ).val( lines[3] );
} );
} );
The current regex is one or more linebreaks – I don’t know if you want this?
Also, instead of triggering this on each keyup
(which works nicely with pasting and editing small errors in the “lazy box”), you can also add a “Split” button and use the click
event of it.