Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update milkdown editor to use v7 and get indentations for free #99

Merged
merged 13 commits into from
Mar 2, 2024

Conversation

chuyouchia
Copy link
Collaborator

@chuyouchia chuyouchia commented Feb 29, 2024

Upgraded Milkdown to v7, includes indentation by default, which was sorely lacking for a while now and a key feature of OrgMode.

Indentation.with.v7.mov

@chuyouchia chuyouchia self-assigned this Feb 29, 2024
@samlhuillier
Copy link
Collaborator

This is great...Although it looks the upgrade has meant it no longer picks up the styles in global.css. Do you think you could bring back that styling?

@chuyouchia
Copy link
Collaborator Author

chuyouchia commented Mar 1, 2024

This is great...Although it looks the upgrade has meant it no longer picks up the styles in global.css. Do you think you could bring back that styling?

Brought back, with a little extra update to the URL color that was just killing me.

Note that the block editor view now doesn't support translation between types (eg from unordered list to codeblock, presumably because it would be quite hard to translate between the two types, especially with indentation.

Nothing we can do about that except submit a plugin update, but I think that the update to get indentation is probably more important than the ability to hot swap format types.

image

@chuyouchia
Copy link
Collaborator Author

Referenced issue to build our own bullet point view - Milkdown/milkdown#991

Fixing the missing todos - requires us to dynamically render the view by using the prosemirror's useNodeViewFactory

Comment on lines 63 to 66
ctx.get(listenerCtx).markdownUpdated((_ctx, markdown) => {
debounce(() => {
setContent(markdown);
}, 1000)();
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this made my own typing experience improve slightly

@chuyouchia
Copy link
Collaborator Author

image
And heres the display

Copy link
Collaborator

@samlhuillier samlhuillier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm!

@chuyouchia chuyouchia merged commit c2b7142 into main Mar 2, 2024
4 of 6 checks passed
samlhuillier pushed a commit that referenced this pull request Apr 1, 2024
update milkdown editor to use v7 and get indentations.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants