_createBlockQuote() {
    let selectionData = store.state.selectionData;

    if (!selectionData) {
      logger.error('No Selection data available');
      return;
    }

    const blockquote = document.createElement('blockquote');
    blockquote.classList.add('quote');
    const paragraph = document.createElement('p');
    blockquote.appendChild(paragraph);

    if (selectionData.text) {
      paragraph.appendChild(selectionData.range.cloneContents());
    } else {
      paragraph.appendChild(document.createTextNode('New Quote goes here'));
    }
    selectionData.range.deleteContents();
    selectionData.range.insertNode(blockquote);
  }
/**
   * Creates a block quote at the current caret position / text selection
   */
Creates a block quote at the current caret position / text selection
Creates a block quote at the current caret position / text selection
_createBlockQuote() {
    let selectionData = store.state.selectionData;
    if (!selectionData) {
      logger.error('No Selection data available');
      return;
    }
    const blockquote = document.createElement('blockquote');
    blockquote.classList.add('quote');
    const paragraph = document.createElement('p');
    blockquote.appendChild(paragraph);
    if (selectionData.text) {
      paragraph.appendChild(selectionData.range.cloneContents());
    } else {
      paragraph.appendChild(document.createTextNode('New Quote goes here'));
    }
    selectionData.range.deleteContents();
    selectionData.range.insertNode(blockquote);
  }
_createBlockQuote ( ) { let selectionData = store . state . selectionData ; if ( ! selectionData ) { logger . error ( 'No Selection data available' ) ; return ; } const blockquote = document . createElement ( 'blockquote' ) ; blockquote . classList . add ( 'quote' ) ; const paragraph = document . createElement ( 'p' ) ; blockquote . appendChild ( paragraph ) ; if ( selectionData . text ) { paragraph . appendChild ( selectionData . range . cloneContents ( ) ) ; } else { paragraph . appendChild ( document . createTextNode ( 'New Quote goes here' ) ) ; } selectionData . range . deleteContents ( ) ; selectionData . range . insertNode ( blockquote ) ; }
Creates a block quote at the current caret position / text selection
Creates a block quote at the current caret position / text selection