This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var clipboardData = window.clipboardData || event.clipboardData || event.originalEvent && event.originalEvent.clipboardData; | |
var pastedText = clipboardData.getData("Text") || clipboardData.getData("text/plain"); | |
if (!pastedText && pastedText.length) { | |
return; | |
} | |
// Parse the pasted text from Excel into rows. | |
// Pasted text is usually separated by a new line for each row, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<meta charset="utf-8"> | |
<title>Fearnleys Weekly PDF Test</title> | |
<script src="js/d3.js" charset="utf-8"></script> | |
<script src="js/c3.js"></script> | |
<link rel="stylesheet" href="css/c3.css"> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css"> | |
<body onload="init()"> | |
<div id="chart"></div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { EditorState, Modifier, SelectionState } from 'draft-js'; | |
/** | |
* Will remove the last block in the editor if it's empty. | |
* | |
* @param {EditorState} editorState | |
* @return {EditorState} | |
*/ | |
export default function trimContent(editorState) { | |
const content = editorState.getCurrentContent(); |
OlderNewer