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

Sometimes pressing the Enter key to create a new line automatically inserts a code block. #5

Open
Ligayu opened this issue Nov 1, 2024 · 14 comments · Fixed by #6
Open

Comments

@Ligayu
Copy link

Ligayu commented Nov 1, 2024

markText.mov

👆You can watch the video above for detailed instructions.

@ousc
Copy link
Owner

ousc commented Nov 14, 2024

Thanks for the feedback, I will check and fix it as soon as possible

@Ligayu
Copy link
Author

Ligayu commented Jan 9, 2025

How is the progress of this Issue going? Looking forward to your response.

@ousc
Copy link
Owner

ousc commented Jan 9, 2025

How is the progress of this Issue going? Looking forward to your response.

I am really sorry but I couldn't reproduction it.

What is your environment and browser version?

@Ligayu
Copy link
Author

Ligayu commented Jan 9, 2025

image
image
👆My browser version is relatively new.

@ousc
Copy link
Owner

ousc commented Jan 9, 2025

image image 👆My browser version is relatively new.

I still can't reproduce the problem, I'll be upgrading to support angular18 and the latest milkdown in the next few days and you can try again then.
I've updated ng-prosemirror-adapter tonight and it's currently at version 0.0.7 synced to prosemirror-adaptor version 4.0.
If that doesn't solve the problem, maybe we can get in touch via remote assistance, you are Chinese too right?

@Ligayu
Copy link
Author

Ligayu commented Jan 10, 2025

😂那说中文交流吧,我这几天先试试升级一下,感谢回复🙏后续有什么我再来

@ousc
Copy link
Owner

ousc commented Jan 28, 2025

@Ligayu Hello,跟你说一下最新的进展
在集成最新的milkdown以及Crepe时,我发现milkdown crepe对于Angular有许多兼容性问题,即使使用最简单的demo也会遇到很多问题,比如说这个:Milkdown/milkdown#1524
目前大多数的编码工作已经完成,主要在总结和修复milkdown本身对于angular的bug和文档工作。

Image

@ousc ousc linked a pull request Jan 28, 2025 that will close this issue
@Ligayu
Copy link
Author

Ligayu commented Feb 6, 2025

@ousc 真的非常感谢🙏由于工作较忙,目前我任然停留在angular17还未升级angular至18来支持ng-prosemirror-adapter 0.0.8版本。我会在这个月升级,后续在你集成完最新milkdown和crepe后,组件用法是 变成,其他不变?
我目前用法如下,跟你demo类似

Image

@ousc
Copy link
Owner

ousc commented Feb 6, 2025

@ousc 真的非常感谢🙏由于工作较忙,目前我任然停留在angular17还未升级angular至18来支持ng-prosemirror-adapter 0.0.8版本。我会在这个月升级,后续在你集成完最新milkdown和crepe后,组件用法是 变成,其他不变?
我目前用法如下,跟你demo类似

Image

ng-milkdown编辑器的用法和原来大概类似,但是会提供更多简化写法。
示例项目移除了angular/cdk等依赖库。
部分组件可能会需要迁移(主要是tooltip,因为milkdown移除了tippy,导致很多api和接口都发生了变更),但是我将会提供尽量详细的文档和示例。
同时,我会把部分我自己私人项目的ng-milkdown组件开源并放入此项目之中,大概会在这周或者下周合并到主分支。

@Ligayu
Copy link
Author

Ligayu commented Feb 6, 2025

@ousc 真的非常感谢🙏由于工作较忙,目前我任然停留在angular17还未升级angular至18来支持ng-prosemirror-adapter 0.0.8版本。我会在这个月升级,后续在你集成完最新milkdown和crepe后,组件用法是 变成,其他不变?
我目前用法如下,跟你demo类似
Image

ng-milkdown编辑器的用法和原来大概类似,但是会提供更多简化写法。 示例项目移除了angular/cdk等依赖库。 部分组件可能会需要迁移(主要是tooltip,因为milkdown移除了tippy,导致很多api和接口都发生了变更),但是我将会提供尽量详细的文档和示例。 同时,我会把部分我自己私人项目的ng-milkdown组件开源并放入此项目之中,大概会在这周或者下周合并到主分支。

前几个月我看milkdown的源码变化挺大的,也是想接入新的编辑器组件和新的tooltip,编辑器组件倒是接入了在开发分支,但发现CodeMirror editor在代码过长会用class隐藏一部分html元素
后续就放弃接入了,tooltip也是移除了tippy,发现要改的东西确实挺多,然后只能保持现状,然后尝试下给你提了个issues修下编辑器问题😂没想到老哥你回复真快,还得是国人的效率高🐮

@ousc
Copy link
Owner

ousc commented Feb 7, 2025

前几个月我看milkdown的源码变化挺大的,也是想接入新的编辑器组件和新的tooltip,编辑器组件倒是接入了在开发分支,但发现CodeMirror editor在代码过长会用class隐藏一部分html元素

我已经重写了这一部分,并提供了示例不使用codemirror而是使用shiki
使用方法大概像是:

  plugins = [
    imageInlineComponent,
    trailing,
    $nodeView(listItemSchema.node, {component: ListItem}),
    milkShiki,
    $nodeView(codeBlockSchema.node, {component: CodeBlock}),
  ];

另一个Angular项目ng-doc也在使用shiki,shiki的代码高亮更容易编写(和vscode一样),可以容易的和rehype集成,而且可以直接生成带有内联css的html,不需要引入css文件。

@Ligayu
Copy link
Author

Ligayu commented Feb 8, 2025

前几个月我看milkdown的源码变化挺大的,也是想接入新的编辑器组件和新的tooltip,编辑器组件倒是接入了在开发分支,但发现CodeMirror editor在代码过长会用class隐藏一部分html元素

我已经重写了这一部分,并提供了示例不使用codemirror而是使用shiki 使用方法大概像是:

plugins = [
imageInlineComponent,
trailing,
$nodeView(listItemSchema.node, {component: ListItem}),
milkShiki,
$nodeView(codeBlockSchema.node, {component: CodeBlock}),
];
另一个Angular项目ng-doc也在使用shiki,shiki的代码高亮更容易编写(和vscode一样),可以容易的和rehype集成,而且可以直接生成带有内联css的html,不需要引入css文件。

可以可以,还得是你阿👍

@Ligayu
Copy link
Author

Ligayu commented Feb 10, 2025

@ousc 我把项目升级到angular18后,发现ng-milkdown版本是17的,npm i时有问题,有空的话可以把ng-milkdown也升级到18
Image

@ousc
Copy link
Owner

ousc commented Feb 12, 2025

@ousc 我把项目升级到angular18后,发现ng-milkdown版本是17的,npm i时有问题,有空的话可以把ng-milkdown也升级到18
Image

将会在新版本一起升级

@ousc ousc closed this as completed in #6 Feb 13, 2025
@ousc ousc reopened this Feb 13, 2025
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 a pull request may close this issue.

2 participants