From c3d01be0df2e4f20f43b57e02845dcbe14ce4b29 Mon Sep 17 00:00:00 2001 From: Mendel Konikov Date: Tue, 1 May 2018 20:34:42 -0400 Subject: [PATCH 1/2] Add note explaining possible plugin conflict --- plugins/talk-plugin-rich-text/README.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/plugins/talk-plugin-rich-text/README.md b/plugins/talk-plugin-rich-text/README.md index a69e5c8dc..6de13a66f 100644 --- a/plugins/talk-plugin-rich-text/README.md +++ b/plugins/talk-plugin-rich-text/README.md @@ -16,6 +16,9 @@ Enables secure rich text support server-side. Add `"talk-plugin-rich-text"` to the `plugins.json` in your Talk installation. This plugin provides a server and a client side implementation. +###### Note: Possible plugin conflict +The plugin `talk-plugin-comment-content` will prevent this plugin from rendering comments with rich text styling and is not needed if this plugin is enabled. + ## Server implementation ### How does this work? @@ -47,7 +50,7 @@ Rules to sanitize html input. We use [DOMPurify] (https://github.com/cure53/DOM #### `jsdom` -In order to run html in the server we need [jsdom](https://github.com/jsdom/jsdom). Usually you wouldn’t need to modify this settings. +In order to run html in the server we need [jsdom](https://github.com/jsdom/jsdom). Usually you wouldn’t need to modify this settings. ## Client implementation @@ -58,10 +61,10 @@ This plugin contains 2 important components: - The Editor (`./components/Editor.js`) - The Comment Content Renderer (`./components/CommentContent.js`) -The editor component utilizes the [contentEditable](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Editable_content) and execCommand API. +The editor component utilizes the [contentEditable](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Editable_content) and execCommand API. If you check our `index.js` you will notice that we inject this editor in the -`commentBox` slot. We do this to replace the core comment box with this one. +`commentBox` slot. We do this to replace the core comment box with this one. Now, in order to render the new styled comments we need a comment renderer. For this task we will have to replace our core comment renderer by using the From 018addc6ad84b59777a75ea7914c64daf36e6ca2 Mon Sep 17 00:00:00 2001 From: Mendel Konikov Date: Tue, 1 May 2018 20:37:42 -0400 Subject: [PATCH 2/2] Remove space to correct markdown link formatting --- plugins/talk-plugin-rich-text/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/talk-plugin-rich-text/README.md b/plugins/talk-plugin-rich-text/README.md index 6de13a66f..cac44438e 100644 --- a/plugins/talk-plugin-rich-text/README.md +++ b/plugins/talk-plugin-rich-text/README.md @@ -46,7 +46,7 @@ Settings for highlighting links. These will only apply if `higlightLinks` is set #### `dompurify` -Rules to sanitize html input. We use [DOMPurify] (https://github.com/cure53/DOMPurify) to prevent web attacks and XSS. Here is the complete list of [settings] (https://github.com/cure53/DOMPurify) +Rules to sanitize html input. We use [DOMPurify](https://github.com/cure53/DOMPurify) to prevent web attacks and XSS. Here is the complete list of [settings](https://github.com/cure53/DOMPurify) #### `jsdom`