src/scripts/modules/BaseFormatter.js
/**
         * @func exportToCanvas
         * @access protected
         * @description mediator.exec("format:export:to:canvas") - Selects the content from the current editor root element and
         * sends it to the canvas
         */
@func exportToCanvas
@access protected
@description mediator.exec("format:export:to:canvas") - Selects the content from the current editor root element and
sends it to the canvas
@func exportToCanvas @access protected @description mediator . exec ( " format : export : to : canvas " ) - Selects the content from the current editor root element and sends it to the canvas
exportToCanvas () {
            const { mediator } = this;
            const rootElement = mediator.get('selection:rootelement');
            const canvasBody = mediator.get('canvas:body');
            mediator.emit('export:to:canvas:start');
            this.injectHooks(rootElement);
            const rangeCoordinates = mediator.get('selection:range:coordinates');
            const clonedNodes = DOM.cloneNodes(rootElement, { trim: true });
            mediator.exec('canvas:content', clonedNodes);
            mediator.exec('canvas:select:by:coordinates', rangeCoordinates);
            this.removeZeroWidthSpaces(canvasBody);
        }
exportToCanvas ( ) { const { mediator } = this ; const rootElement = mediator . get ( 'selection:rootelement' ) ; const canvasBody = mediator . get ( 'canvas:body' ) ; mediator . emit ( 'export:to:canvas:start' ) ; this . injectHooks ( rootElement ) ; const rangeCoordinates = mediator . get ( 'selection:range:coordinates' ) ; const clonedNodes = DOM . cloneNodes ( rootElement , { trim : true } ) ; mediator . exec ( 'canvas:content' , clonedNodes ) ; mediator . exec ( 'canvas:select:by:coordinates' , rangeCoordinates ) ; this . removeZeroWidthSpaces ( canvasBody ) ; }
@func exportToCanvas
 @access protected
 @description mediator.exec("format:export:to:canvas") - Selects the content from the current editor root element and
 sends it to the canvas
@func exportToCanvas @access protected @description mediator . exec ( " format : export : to : canvas " ) - Selects the content from the current editor root element and sends it to the canvas