Adding a plugin for the backend and a plugin for the frontend

This commit is contained in:
okbel
2018-02-23 12:38:33 -03:00
parent ab3133c8aa
commit 912ccd6dd9
20 changed files with 25 additions and 23 deletions
+2 -1
View File
@@ -24,7 +24,8 @@ public
!plugins/talk-plugin-profile-settings
!plugins/talk-plugin-remember-sort
!plugins/talk-plugin-respect
!plugins/talk-plugin-rte
!plugins/talk-plugin-rich-text
!plugins/talk-plugin-rich-text-pell
!plugins/talk-plugin-sort-most-liked
!plugins/talk-plugin-sort-most-loved
!plugins/talk-plugin-sort-most-replied
+2 -1
View File
@@ -53,7 +53,8 @@ plugins/*
!plugins/talk-plugin-subscriber
!plugins/talk-plugin-flag-details
!plugins/talk-plugin-slack-notifications
!plugins/talk-plugin-rte
!plugins/talk-plugin-rich-text
!plugins/talk-plugin-rich-text-pell
!plugins/talk-plugin-profile-settings
**/node_modules/*
@@ -1,17 +1,17 @@
import React from 'react';
import PropTypes from 'prop-types';
import { name } from '../../package.json';
import { pluginName } from '../../package.json';
class CommentContent extends React.Component {
render() {
const { comment } = this.props;
return comment.htmlBody ? (
<div
className={`${name}-text`}
className={`${pluginName}-text`}
dangerouslySetInnerHTML={{ __html: comment.htmlBody }}
/>
) : (
<div className={`${name}-text`}>{comment.body}</div>
<div className={`${pluginName}-text`}>{comment.body}</div>
);
}
}
@@ -3,8 +3,7 @@ import PropTypes from 'prop-types';
import { init } from 'pell';
import styles from './Editor.css';
import cn from 'classnames';
const pluginName = 'talk-plugin-rte';
import { pluginName } from '../../package.json';
class Editor extends React.Component {
ref = null;
@@ -62,7 +61,7 @@ class Editor extends React.Component {
Editor.defaultProps = {
defaultContent: '',
styleWithCSS: true,
styleWithCSS: false,
actions: ['bold', 'italic', 'quote'],
classNames: {
button: '',
@@ -0,0 +1 @@
module.exports = {};
@@ -0,0 +1,12 @@
{
"name": "@coralproject/talk-plugin-rich-text-pell",
"pluginName": "talk-plugin-rich-text-pell",
"version": "0.0.1",
"description": "Pell's Rich Text Editor for Talk",
"main": "index.js",
"author": "The Coral Project Team <coral@mozillafoundation.org>",
"license": "Apache-2.0",
"dependencies": {
"pell": "^0.7.0"
}
}
@@ -1,13 +1,12 @@
{
"name": "@coralproject/talk-plugin-rte",
"pluginName": "talk-plugin-rte",
"name": "@coralproject/talk-plugin-rich-text",
"pluginName": "talk-plugin-rich-text",
"version": "0.0.1",
"description": "Rich Text Editor for Talk",
"main": "index.js",
"author": "The Coral Project Team <coral@mozillafoundation.org>",
"license": "Apache-2.0",
"dependencies": {
"dompurify": "^1.0.3",
"pell": "^0.7.0"
"dompurify": "^1.0.3"
}
}
-11
View File
@@ -1,11 +0,0 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
dompurify@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/dompurify/-/dompurify-1.0.3.tgz#3f2f6ecb6ecd27599a506b410ff47d6eb90fd05d"
pell@^0.7.0:
version "0.7.0"
resolved "https://registry.yarnpkg.com/pell/-/pell-0.7.0.tgz#46b3fcdfa8dd7e5999f73c550a337ecc80193dcc"