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

Make emotion can be configured #279

Merged
merged 3 commits into from
Jan 15, 2022
Merged

Make emotion can be configured #279

merged 3 commits into from
Jan 15, 2022

Conversation

Saul-Mirone
Copy link
Member

Closes: 233

import { emotionConfigCtx } from '@milkdown/core';

const editor = Editor.make()
    .config((ctx) => {
        ctx.set(emotionConfigCtx, {
            key: 'milkdown-instance',
            container: document.querySelector('#app') as HTMLElement,
        });
    })
// ....

@echarles
Copy link

Is there an example of such a configuration? That would help to get started with that new great feature. Thx.

@Saul-Mirone Saul-Mirone merged commit 36cb935 into main Jan 15, 2022
@Saul-Mirone Saul-Mirone deleted the config-emotion branch January 15, 2022 07:56
@Saul-Mirone
Copy link
Member Author

Is there an example of such a configuration? That would help to get started with that new great feature. Thx.

The example is already in PR description, isn't it?

@echarles
Copy link

True, but I was thinking more on a real example with code and deployed application to show in real what kind of configuration can be applied to emotion. Eg. It is not clear to me if we can theme the ui with that config, or just override some emotion settings, and what for.

@Saul-Mirone
Copy link
Member Author

True, but I was thinking more on a real example with code and deployed application to show in real what kind of configuration can be applied to emotion. Eg. It is not clear to me if we can theme the ui with that config, or just override some emotion settings, and what for.

It's just used for providing custom instance of emotion:

https://emotion.sh/docs/@emotion/css#custom-instances

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.

Make emotion to be configurable
2 participants