Copy css for edition
This commit is contained in:
parent
e9b285c5e0
commit
5e6d0f6404
7 changed files with 62 additions and 6 deletions
|
@ -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) }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue