Git Product home page Git Product logo

Comments (2)

my-nihongo avatar my-nihongo commented on June 7, 2024

@Killers0992 so far this is not implemented in the library
I have already thought about this problem and I had an idea of implementing it with highlight.js, but have not started doing it

To be honest, I am not really sure when I can try to start doing it (probably I will try to do it a bit later this week)

from mudblazor.markdown.

MihailsKuzmins avatar MihailsKuzmins commented on June 7, 2024

This should be done by #38.
Please refer to the upgrade guide because there are some changes

For toggling dark/light modes please refer to this code sample

private void PublishTheme(bool isDark)
{
var codeBlockTheme = isDark ? CodeBlockTheme.DraculaBase16 : CodeBlockTheme.Monokai;
_mudMarkdownThemeService.SetCodeBlockTheme(codeBlockTheme);
_isDarkThemeSubject.OnNext(isDark);
}

For a basic usage please refer to

<MudMarkdown Value="@Value"
TableCellMinWidth="100"
OverrideLinkUrl="OverrideLink"
CodeBlockTheme="CodeBlockTheme.DraculaBase16" />

I hope it will work 😃

from mudblazor.markdown.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.