Copy css for edition
This commit is contained in:
@@ -47,6 +47,7 @@ export function EditWysiwygComposer({ editorStateTransfer, ...props }: EditWysiw
|
||||
const { editMessage, endEditing, onChange, isSaveDisabled } = useEditing(initialContent, editorStateTransfer);
|
||||
|
||||
return isReady && <WysiwygComposer
|
||||
className="mx_EditWysiwygComposer"
|
||||
initialContent={initialContent}
|
||||
onChange={onChange}
|
||||
onSend={editMessage}
|
||||
|
||||
@@ -39,7 +39,7 @@ const Content = forwardRef<HTMLElement, ContentProps>(
|
||||
|
||||
export function SendWysiwygComposer(props: SendWysiwygComposerProps) {
|
||||
return (
|
||||
<WysiwygComposer {...props}>{ (ref, wysiwyg) => (
|
||||
<WysiwygComposer className="mx_SendWysiwygComposer" {...props}>{ (ref, wysiwyg) => (
|
||||
<Content disabled={props.disabled} ref={ref} formattingFunctions={wysiwyg} />
|
||||
) }
|
||||
</WysiwygComposer>);
|
||||
|
||||
@@ -26,6 +26,7 @@ interface WysiwygComposerProps {
|
||||
onChange?: (content: string) => void;
|
||||
onSend: () => void;
|
||||
initialContent?: string;
|
||||
className?: string;
|
||||
children?: (
|
||||
ref: MutableRefObject<HTMLDivElement | null>,
|
||||
wysiwyg: FormattingFunctions,
|
||||
@@ -33,7 +34,7 @@ interface WysiwygComposerProps {
|
||||
}
|
||||
|
||||
export const WysiwygComposer = memo(function WysiwygComposer(
|
||||
{ disabled = false, onChange, onSend, initialContent, children }: WysiwygComposerProps,
|
||||
{ disabled = false, onChange, onSend, initialContent, className, children }: WysiwygComposerProps,
|
||||
) {
|
||||
const inputEventProcessor = useInputEventProcessor(onSend);
|
||||
|
||||
@@ -47,7 +48,7 @@ export const WysiwygComposer = memo(function WysiwygComposer(
|
||||
}, [onChange, content, disabled]);
|
||||
|
||||
return (
|
||||
<div className="mx_WysiwygComposer">
|
||||
<div className={className}>
|
||||
<FormattingButtons composer={wysiwyg} formattingStates={formattingStates} />
|
||||
<Editor ref={ref} disabled={!isWysiwygReady || disabled} />
|
||||
{ children?.(ref, wysiwyg) }
|
||||
|
||||
Reference in New Issue
Block a user