function _onMDPasteBefore(cm, {source, data: eventData}) {
  if (!_isFromCodeBlockInCodeMirror(cm, source, eventData)) {
    return;
  }

  const code = eventData.text.join('\n');
  const delta = calcDSVDelta(code, '\t');

  if (delta === 0) {
    csv.COLUMN_SEPARATOR = '\t';
    const parsed = _reduceToTSV(csv.parse(code));
    eventData.update(eventData.from, eventData.to, parsed);
  }
}
function _onMDPasteBefore(cm, {source, data: eventData}) {
  if (!_isFromCodeBlockInCodeMirror(cm, source, eventData)) {
    return;
  }

  const code = eventData.text.join('\n');
  const delta = calcDSVDelta(code, '\t');

  if (delta === 0) {
    csv.COLUMN_SEPARATOR = '\t';
    const parsed = _reduceToTSV(csv.parse(code));
    eventData.update(eventData.from, eventData.to, parsed);
  }
}
function _onMDPasteBefore ( cm , { source , data : eventData } ) { if ( ! _isFromCodeBlockInCodeMirror ( cm , source , eventData ) ) { return ; } const code = eventData . text . join ( '\n' ) ; const delta = calcDSVDelta ( code , '\t' ) ; if ( delta === 0 ) { csv . COLUMN_SEPARATOR = '\t' ; const parsed = _reduceToTSV ( csv . parse ( code ) ) ; eventData . update ( eventData . from , eventData . to , parsed ) ; } }
enclose pasting data strings from markdown in quotes
wysiwyg event should be treated separately.
because pasteBefore event from wysiwyg has been already processed table data to string,
on the other hand we need a table element
@param {CodeMirror} cm - markdown codemirror editor
@param {string} source - event source
@param {Object} data - event data
@ignore
enclose pasting data strings from markdown in quotes wysiwyg event should be treated separately . because pasteBefore event from wysiwyg has been already processed table data to string on the other hand we need a table element
When a paste is before a new line