mirror of
https://github.com/wassname/talk.git
synced 2026-07-17 11:33:39 +08:00
Adding a plugin for the backend and a plugin for the frontend
This commit is contained in:
+2
-1
@@ -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
@@ -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/*
|
||||
|
||||
+3
-3
@@ -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>
|
||||
);
|
||||
}
|
||||
}
|
||||
+2
-3
@@ -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"
|
||||
}
|
||||
}
|
||||
@@ -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"
|
||||
Reference in New Issue
Block a user