Code Monkey home page Code Monkey logo

Comments (4)

imzbf avatar imzbf commented on June 27, 2024

I think you can do something like this: #511 (comment)

Of course, if you want to target a single theme, the selector should be '.md-editor-preview.vuepress-theme p'

In addition, the theme source code can be https://github.com/imzbf/markdown-theme in the repository

from md-editor-v3.

mickey58github avatar mickey58github commented on June 27, 2024

Thanks, but sorry, I'm not experienced in CSS, so I still don't know where to insert the suggested CSS in my code.

If I understand you correctly, the suggested CSS for fixing the word breaks is this:

.md-editor-preview.vue-press-theme p {
    word-break: break-word;
}

So I put this at the end of my vue file, in SASS syntax, because I use SASS CSS preprocessor:

<style
  lang="sass"
  scoped
>
.md-editor-preview.vuepress-theme p
  word-break: break-word
</style>

But how can I use it with MdEditor?

I tried this:

<MdEditor 
   class="md-editor-preview.vuepress-theme"
   previewTheme="vuepress"
>

And I tried:

<MdEditor 
   class="md-editor-preview"
   previewTheme="vuepress"
>

But none of my attempts have an effect on the word breaks in the preview area.

from md-editor-v3.

mickey58github avatar mickey58github commented on June 27, 2024

Update: I found a workaround, by modifying the style.css file that ships with md-editor-v3, and importing that modified version of style.css. Not sure though whether that is the officially supported way of doing this.

from md-editor-v3.

imzbf avatar imzbf commented on June 27, 2024

No, '.md-editor-preview.vue-press-theme' is the class name in the editor, which will appear when you use the vue-press theme, and does not need to be set manually

<MdEditor 
-   class="md-editor-preview"
   previewTheme="vuepress"
>

from md-editor-v3.

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.