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

not wotking display markdown #141

Closed
ysmanse opened this issue Jan 20, 2025 · 3 comments
Closed

not wotking display markdown #141

ysmanse opened this issue Jan 20, 2025 · 3 comments

Comments

@ysmanse
Copy link

ysmanse commented Jan 20, 2025

Hello, I just followed examples. but not successful display markdown.

Could you help how can i do something?

<script>

    import {onDestroy, onMount} from "svelte";
    import { Carta, MarkdownEditor, Markdown } from 'carta-md';
    import { attachment } from '@cartamd/plugin-attachment';
    import { emoji } from '@cartamd/plugin-emoji';
    import { slash } from '@cartamd/plugin-slash';
    import { code } from '@cartamd/plugin-code';

    import 'carta-md/default.css';
    import '$lib/styles/github.scss';

    const carta = new Carta({
        sanitizer: false,
        extensions: [
            attachment({
                async upload() {
                    return 'some-url-from-server.xyz';
                }
            }),
            emoji(),
            slash(),
            code()
        ]
    });

    export let value = `This is an example inspired by [GitHub](https://github.com)
\`\`\`js
console.log('Hello, World!');
\`\`\``;

</script>

<MarkdownEditor bind:value mode="tabs" theme="github" {carta} />

<style>
    :global(.shiki),
    :global(.shiki span) {
        color: var(--shiki-dark) !important;
    }

    :global(button) {
        background: transparent;
        border: 0;
    }
</style>
Image Image Image
@karanravindra
Copy link

it seems like its working in the screen shots ... could you elaborate on your specific issue?

@ysmanse
Copy link
Author

ysmanse commented Jan 21, 2025

@karanravindra Thanks for your reply. I thinks working code expression. but not working original markup express.
(p, h, and a tag not working)

Could you help me?

Image Image Image

@ysmanse
Copy link
Author

ysmanse commented Jan 21, 2025

@karanravindra It's solved to using github-markdown-css. thanks!

@ysmanse ysmanse closed this as completed Jan 21, 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

No branches or pull requests

2 participants