From 5302d6d9357a832128fcfa41347543b072629732 Mon Sep 17 00:00:00 2001 From: Belen Curcio Date: Thu, 24 Aug 2017 18:21:52 -0300 Subject: [PATCH] Markdown Editor Added and Working --- client/coral-configure/components/QuestionBoxBuilder.css | 4 ++++ client/coral-configure/components/QuestionBoxBuilder.js | 3 ++- .../coral-configure/containers/ConfigureStreamContainer.js | 6 +----- client/coral-framework/components/MarkdownEditor.css | 3 ++- client/talk-plugin-questionbox/QuestionBox.js | 4 ++-- 5 files changed, 11 insertions(+), 9 deletions(-) diff --git a/client/coral-configure/components/QuestionBoxBuilder.css b/client/coral-configure/components/QuestionBoxBuilder.css index c8f6c6a03..758f350b9 100644 --- a/client/coral-configure/components/QuestionBoxBuilder.css +++ b/client/coral-configure/components/QuestionBoxBuilder.css @@ -38,4 +38,8 @@ left: 0; width: 100%; height: 100%; +} + +.qb { + margin: 10px 0; } \ No newline at end of file diff --git a/client/coral-configure/components/QuestionBoxBuilder.js b/client/coral-configure/components/QuestionBoxBuilder.js index ca19c0e7b..5444102d2 100644 --- a/client/coral-configure/components/QuestionBoxBuilder.js +++ b/client/coral-configure/components/QuestionBoxBuilder.js @@ -54,6 +54,7 @@ class QuestionBoxBuilder extends React.Component { handleChange({}, {questionBoxContent: value})} /> - + ); } diff --git a/client/coral-configure/containers/ConfigureStreamContainer.js b/client/coral-configure/containers/ConfigureStreamContainer.js index a5d6cf8aa..3946ff6ed 100644 --- a/client/coral-configure/containers/ConfigureStreamContainer.js +++ b/client/coral-configure/containers/ConfigureStreamContainer.js @@ -27,11 +27,9 @@ class ConfigureStreamContainer extends Component { handleApply (e) { e.preventDefault(); const {elements} = e.target; - const {questionBoxIcon} = this.state.dirtySettings; + const {questionBoxIcon, questionBoxContent} = this.state.dirtySettings; const premod = elements.premod.checked; const questionBoxEnable = elements.qboxenable.checked; - const questionBoxContent = elements.qboxcontent.value; - const premodLinksEnable = elements.plinksenable.checked; const {changed} = this.state; @@ -70,8 +68,6 @@ class ConfigureStreamContainer extends Component { changes.premodLinksEnable = e.target.value; } - console.log(changes) - this.setState({ changed: true, dirtySettings: { diff --git a/client/coral-framework/components/MarkdownEditor.css b/client/coral-framework/components/MarkdownEditor.css index 93bf7a9dd..201ba10bc 100644 --- a/client/coral-framework/components/MarkdownEditor.css +++ b/client/coral-framework/components/MarkdownEditor.css @@ -467,7 +467,6 @@ $fullscreenZIndex: 10; text-align: center; text-decoration: none!important; color: #2c3e50!important; - width: 30px; height: 30px; margin: 0; border: 1px solid transparent; @@ -475,6 +474,8 @@ $fullscreenZIndex: 10; cursor: pointer; outline: 0; margin-right: 2px; + font-size: 1.5em; + width: 25px; &.active { background: #fcfcfc; border-color: #95a5a6; diff --git a/client/talk-plugin-questionbox/QuestionBox.js b/client/talk-plugin-questionbox/QuestionBox.js index 83e6db96f..8cc8d7efa 100644 --- a/client/talk-plugin-questionbox/QuestionBox.js +++ b/client/talk-plugin-questionbox/QuestionBox.js @@ -5,8 +5,8 @@ import {Icon} from 'coral-ui'; import Slot from 'coral-framework/components/Slot'; -const QuestionBox = ({content, enable, icon = ''}) => ( -
+const QuestionBox = ({content, enable, icon = '', className = ''}) => ( +
{ icon === 'default' ? (