Adding rte plugin 🎉

This commit is contained in:
okbel
2018-02-21 09:26:39 -03:00
parent e895413038
commit 096c9a4894
10 changed files with 117 additions and 1 deletions
@@ -0,0 +1,23 @@
{
"env": {
"browser": true,
"es6": true,
"mocha": true
},
"parserOptions": {
"sourceType": "module",
"ecmaFeatures": {
"experimentalObjectRestSpread": true,
"jsx": true
}
},
"parser": "babel-eslint",
"plugins": [
"react"
],
"rules": {
"react/jsx-uses-react": "error",
"react/jsx-uses-vars": "error",
"no-console": ["warn", { "allow": ["warn", "error"] }]
}
}
@@ -0,0 +1,27 @@
.myPluginContainer {
padding: 10px;
background: #f0f0f0;
border: 1px solid #d6d6d6;
margin: 10px 0;
text-align: center;
border-radius: 3px;
}
.logo {
position: block;
animation: spin 2s infinite ease;
animation-delay: 1s;
}
@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
.description {
color: #444444;
}
@@ -0,0 +1,37 @@
import React from 'react';
import PropTypes from 'prop-types';
import pell from 'pell';
class TextArea extends React.Component {
componentWillMount() {}
render() {
const { value, placeholder, id, onChange, rows, disabled } = this.props;
return (
<textarea
className={'talk-plugin-commentbox-textarea'}
value={value}
placeholder={'RTE Text Area'}
id={id}
onChange={onChange}
rows={rows}
disabled={disabled}
/>
);
}
}
TextArea.defaultProps = {
rows: 3,
};
TextArea.propTypes = {
id: PropTypes.string,
value: PropTypes.string,
placeholder: PropTypes.string,
onChange: PropTypes.func,
disabled: PropTypes.bool,
rows: PropTypes.number,
};
export default TextAreaComponent;
+7
View File
@@ -0,0 +1,7 @@
import RTEtextArea from './components/RTEtextArea';
export default {
slots: {
textArea: [RTEtextArea],
},
};