diff --git a/src/components/ArticleEditor.js b/src/components/ArticleEditor.js index b855669..4f9b8d8 100644 --- a/src/components/ArticleEditor.js +++ b/src/components/ArticleEditor.js @@ -12,8 +12,19 @@ const ArticleEditor = (props) => { "contents": content }; + let copyToClipboard = () => { + navigator.clipboard.writeText(content).then(function() { + console.log('Async: Copying to clipboard was successful!'); + }, function(err) { + console.error('Async: Could not copy text: ', err); + }); + }; + return (
+
+
Copy to Clipboard
+
diff --git a/src/components/css/ArticleEditor.css b/src/components/css/ArticleEditor.css index 29c5e15..44c05ec 100644 --- a/src/components/css/ArticleEditor.css +++ b/src/components/css/ArticleEditor.css @@ -9,6 +9,26 @@ text-align: left; } +.ArticleEditor .toolbar { + width: 100%; + height: 56px; + display: flex; +} + +.ArticleEditor .toolbar .btn { + color: white; + background-color: darkgreen; + text-align: center; + align-items:center; + justify-content: center; + display: flex; + padding-left: 3px; + padding-right: 3px; +} +.ArticleEditor .toolbar .btn:hover{ + background-color: #005400 +} + .article .open { max-height:100vh; }