Skip to content

Commit

Permalink
fix from review
Browse files Browse the repository at this point in the history
  • Loading branch information
luojiyin1987 committed Jul 11, 2024
1 parent e9f5916 commit fb0a29c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions components/Git/ArticleEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export type HyperLink = HTMLAnchorElement | HTMLImageElement;
export class ArticleEditor extends Component {
@observable
accessor repository = '';
accessor editorContent = '';
editorContent = '';

@computed
get currentRepository() {
Expand Down Expand Up @@ -114,7 +114,7 @@ export class ArticleEditor extends Component {
if (meta[1]) this.setPostMeta(meta[1]);
}

if (this.editorContent) this.editorContent = content;
this.editorContent = content;
};

reset = () => {
Expand Down Expand Up @@ -304,7 +304,10 @@ export class ArticleEditor extends Component {
{copied ? '√' : ''} Copy MarkDown
</Button>
</div>
<HTMLEditor defaultValue={this.editorContent} />
<HTMLEditor
defaultValue={this.editorContent}
onChange={value => (this.editorContent = value)}
/>
</Form.Group>
</Form>
);
Expand Down

0 comments on commit fb0a29c

Please sign in to comment.