uiwjs / uiwjs/react-md-editor

How can i set textarea(.w-md-editor-text-input)'s parent <div> height style?

Open
#625 7 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
2.9k
Forks
201
Avg merge
12m
Merged PRs (30d)
1

Description

import t\MDEditor from '@uiw/react-md-editor';

interface Props {
  content: string;
  changeHandler: (content: string) => void;
}

export default function ArticleContentEditor({ content, changeHandler }: Props) {
  const changeContentHandler = (value: string | undefined) => {
    if (value) {
      changeHandler(value);
    }
  };

  return (
    <MDEditor
      value={content}
      height="500px"
      onChange={(changedContent) => changeContentHandler(changedContent)}
      highlightEnable={false}
    />
  );
}

This is my code, when i set height="500px" on MDEditor Component
But not working on textarea, textarea is so small

image
image

Need to set more properties of MDEditor?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the MDEditor height prop and the .w-md-editor-text-input element shown in the issue. Trace how the height is applied between the editor and its textarea, then verify that height="500px" gives the textarea's parent the expected height.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.