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

导出css文件 #412

Open
puppyapple opened this issue Sep 17, 2024 · 5 comments
Open

导出css文件 #412

puppyapple opened this issue Sep 17, 2024 · 5 comments
Labels
enhancement New feature or request question Further information is requested

Comments

@puppyapple
Copy link

请问有什么途径可以将选好了配置的主题导出成css文件么?

@YangFong
Copy link
Member

我想过导入和导出「自定义CSS」内容,还有导出当前用户的样式配置数据,但不会导出项目的预设样式。

需要看你的具体使用场景是什么。

@yanglbme yanglbme added enhancement New feature or request question Further information is requested labels Sep 17, 2024
@puppyapple
Copy link
Author

puppyapple commented Sep 17, 2024 via email

@YangFong
Copy link
Member

那么在这方面,最优解是,为 ob 做一个主题并加入其主题库。因为直接导出,大致看不到理想效果的,因为元素和类名不一样,还需要重写 CSS 变量。这方面,我没有试过,就是专门去写一个主题。

我个人也是常用 ob 的,也许最简单的方式是写一个插件,读取当前选中的文件并渲染。

比如这样:

image

@YangFong
Copy link
Member

当然也的说,该项目的定位是微信公众号发文编辑器。而这些,并不在其范畴当中。不过我找到了一个方式,也许会有帮助,你可以试试 <iframe>

<iframe src="https://doocs.github.io/md" style="height: 80vh; width: 50vw">

效果:

image image

当然这个窗口有点怪哈,我再补充一个响应式设计,小窗口时只展示渲染区内容,那么使用就大致没问题了。

@puppyapple
Copy link
Author

puppyapple commented Sep 17, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants