Skip to content

Commit

Permalink
Fix inline paste
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix committed Nov 2, 2017
1 parent 55c54f6 commit e0ca91e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion blocks/api/raw-handling/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import shortcodeConverter from './shortcode-converter';
*
* @param {String} options.HTML The HTML to convert.
* @param {String} [options.plainText] Plain text version.
* @param {Boolean} [options.inline] Whether to content should be inline or not. Null to auto-detect, false to force blocks, true to force a string.
* @param {?Boolean} [options.inline] Whether to content should be inline or not. Null to auto-detect, false to force blocks, true to force a string.
* @return {Array|String} A list of blocks or a string, depending on the `inline` option.
*/
export default function rawHandler( { HTML, plainText = '', inline = null } ) {
Expand Down
3 changes: 2 additions & 1 deletion blocks/editable/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,8 @@ export default class Editable extends Component {
const content = rawHandler( {
HTML: event.content,
plainText: this.pastedPlainText,
inline: ! this.props.onSplit,
// Force inline paste if there's no `onSplit` prop.
inline: this.props.onSplit ? null : true,
} );

if ( typeof content === 'string' ) {
Expand Down

0 comments on commit e0ca91e

Please sign in to comment.