fix: add autoresize plugin in TinyMCE editor (#333)
* fix: add autoresize plugin in tinymce editor * fix: update author label link check for annoymous
This commit is contained in:
@@ -17,8 +17,8 @@ function PostPreviewPane({
|
||||
<>
|
||||
{showPreviewPane && (
|
||||
<div
|
||||
className={`p-2 bg-light-200 rounded box-shadow-down-1 post-preview ${isPost ? 'mt-2 mb-5' : 'my-3'}`}
|
||||
style={{ maxHeight: '200px', overflow: 'scroll' }}
|
||||
className={`w-100 p-2 bg-light-200 rounded box-shadow-down-1 post-preview ${isPost ? 'mt-2 mb-5' : 'my-3'}`}
|
||||
style={{ minHeight: '200px', wordBreak: 'break-word' }}
|
||||
>
|
||||
<IconButton
|
||||
onClick={() => setShowPreviewPane(false)}
|
||||
|
||||
@@ -18,6 +18,7 @@ import 'tinymce/icons/default';
|
||||
import 'tinymce/skins/ui/oxide/skin.css';
|
||||
// importing the plugin js.
|
||||
import 'tinymce/plugins/autolink';
|
||||
import 'tinymce/plugins/autoresize';
|
||||
import 'tinymce/plugins/autosave';
|
||||
import 'tinymce/plugins/codesample';
|
||||
import 'tinymce/plugins/image';
|
||||
@@ -93,7 +94,7 @@ export default function TinyMCEEditor(props) {
|
||||
a11y_advanced_options: true,
|
||||
autosave_interval: '1s',
|
||||
autosave_restore_when_empty: false,
|
||||
plugins: 'autosave codesample link lists image imagetools code emoticons charmap',
|
||||
plugins: 'autoresize autosave codesample link lists image imagetools code emoticons charmap',
|
||||
toolbar: 'undo redo'
|
||||
+ ' | formatselect | bold italic underline'
|
||||
+ ' | link blockquote openedx_code image'
|
||||
|
||||
@@ -40,7 +40,7 @@ function AuthorLabel({
|
||||
const className = classNames('d-flex align-items-center', labelColor);
|
||||
|
||||
const showUserNameAsLink = useShowLearnersTab()
|
||||
&& linkToProfile && author && author !== 'anonymous';
|
||||
&& linkToProfile && author && author !== intl.formatMessage(messages.anonymous);
|
||||
|
||||
const labelContents = (
|
||||
<div className={className}>
|
||||
|
||||
Reference in New Issue
Block a user