Comments (4)
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.
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.
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.
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)
- Cannot read properties of null (reading 'offsetTop') HOT 1
- 如何将mermaid CDN引入改为本地引入? HOT 1
- 关于内存溢出的咨询 HOT 5
- 代码块未知原因不显示 HOT 1
- 预览组件不显示有序列表 HOT 3
- 关于全部关闭CDN的问题 HOT 7
- Cannot use domEventHandlers HOT 6
- 仅预览模式,’\n‘换行后空了一行出来 HOT 9
- 编辑器工具栏消失 HOT 11
- 工具栏水平滑动失效 HOT 1
- 预览模式下能不能添加个变量识别? HOT 2
- 为什么类似于a.is,这样的字符串会被渲染成<a>标签呀?如图 HOT 5
- mermaid instance设置问题 HOT 1
- 怎么取消点击事件的向上冒泡 HOT 2
- 插入`<img>`元素,渲染之后没有了具体的 src 属性 HOT 2
- 请问如何实现插入内容到光标处 HOT 2
- 纯本地环境如何加载第三方类库 HOT 2
- 内容布局选项(居左居中居右)图片尺寸的编辑功能 HOT 1
- katex公式标识符自定义 HOT 1
- transformImgUrl HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from md-editor-v3.