solos

solos

Just for fun.

Member Since 11 years ago

Shanghai

Experience Points
87
follower
Lessons Completed
106
follow
Lessons Completed
2.3k
stars
Best Reply Awards
93
repos

791 contributions in the last year

Pinned
⚡ regex dict 正则表达式词典
⚡ 歌词迷api文档
⚡ .files
⚡ Requests -- Another HTTP client (inspired by python requests).
Activity
May
23
9 hours ago
started
started time in 7 hours ago
May
22
1 day ago
started
started time in 18 hours ago
May
20
3 days ago
started
started time in 2 days ago
May
19
4 days ago
started
started time in 3 days ago
started
started time in 3 days ago
started
started time in 3 days ago
May
18
5 days ago
started
started time in 4 days ago
May
15
1 week ago
started
started time in 1 week ago
started
started time in 1 week ago
started
started time in 1 week ago
May
14
1 week ago
started
started time in 1 week ago
started
started time in 1 week ago
started
started time in 1 week ago
started
started time in 1 week ago
started
started time in 1 week ago
started
started time in 1 week ago
started
started time in 1 week ago
started
started time in 1 week ago
May
13
1 week ago
started
started time in 1 week ago
May
9
2 weeks ago
started
started time in 1 week ago
Apr
30
3 weeks ago
started
started time in 3 weeks ago
Apr
28
3 weeks ago
started
started time in 3 weeks ago
Apr
27
3 weeks ago
started
started time in 3 weeks ago
started
started time in 3 weeks ago
Apr
26
3 weeks ago
started
started time in 3 weeks ago
Apr
25
4 weeks ago
started
started time in 3 weeks ago
started
started time in 3 weeks ago
started
started time in 3 weeks ago
Activity icon
issue

solos issue comment Saul-Mirone/milkdown

solos
solos

change defaultValue programmatically

Is your feature request related to a problem? Please describe. I'm use Rect impl: https://milkdown.dev/#/react and needs to set value to ReactEditor component programmatically ( after set defaultValue)

Describe the solution you'd like

const MilkdownEditor: React.FC = () => {
  const [isContentLoaded, setContentLoaded] = useState<boolean>(false);

const editor = useEditor(
      (root) => {
        return new Editor()
            .config((ctx) => {
                ctx.set(rootCtx, root);
                ctx.set(defaultValueCtx, "Default value");
            })
            .use(commonmark)
            .use(clipboard)
            .use(listener)
            .use(history);
      },
      [],
  );

useEffect(() => {
    // someting like this miss me
    editor.ctx.set(value,"valueChanged")
},[isContentLoaded])

  return <ReactEditor editor={editor} />;
};

export default MilkdownEditor;
solos
solos

Is there an example of angular?

Apr
24
4 weeks ago
started
started time in 4 weeks ago
Previous