Comments (7)
Thanks @StephenGrider, @MatheusPires99 and @jaywcjlove for your answers.
Indeed it was a style conflict, the responsible in my case was bulma (damn it bulma).
If someone passes by here with the same problem, here's my fix:
.w-md-editor .title {
line-height: unset !important;
font-size: unset !important;
font-weight: unset !important;
}
from react-md-editor.
@ArthurKnoep @brutomfr I had the same problem as well, so I stated to look at the CSS properties that is applied and I found a line-height: 18px;
on the element with class.w-md-editor-text
. So a set the line-height
of this element to unset
, and that resolved my problem.
.w-md-editor-text {
line-height: unset;
}
from react-md-editor.
Hey, sorry for the late reply.
Actually this was a big induced by a conflicting style caused by bulma. This is not something that is desirable because it breaks the lines alignment.
from react-md-editor.
I have the same problem.
I did not find a solution
from react-md-editor.
There is no instance, it can only be judged that it may be a style conflict
from react-md-editor.
The editor uses Prism to apply syntax highlighting, see here: https://github.com/uiwjs/react-md-editor/blob/master/src/components/TextArea/index.tsx#L56
Prism itself applies some classnames to elements to get the syntax highlighting effect. Unfortunately, those classnames are extremely common and generic - stuff like title
, token
, etc.
Here's the crux: if you have any CSS that affects those classNames it'll interfere with Prism's default styling! So @ArthurKnoep, you probably have a .title
css rule somewhere that is increasing the font size of that # hello
text.
There's no option in this lib to disable the highlighting stuff, but you can sabotage prism directly to keep it from doing any highlighting:
import Prism from 'prismjs';
Prism.languages.markdown = {};
from react-md-editor.
@ArthurKnoep, how do you manage to add that syntax highlighting?
I mean: how do you manage to type "# hello" and apply the heading style in the "hello" word?
from react-md-editor.
Related Issues (20)
- Next.js problem while writing an article HOT 6
- ul li tag automatically created HOT 2
- toolbar只使用部分功能 HOT 3
- skipHtml not working
- Controlled toolbar? HOT 1
- Bug: When I push (option+ ₩) + (option + Enter) in MacOS, the cursor is broken HOT 1
- blinking cursor not showing inside md editor when placed in overflows modal HOT 1
- THIS IS NOT AN ISSUE: HACK to Paste Image directly from clipboard HOT 2
- The editor is stuck When value is large HOT 1
- 工具栏提示如何设置中文 HOT 2
- Spell Checker/ Auto Correct? HOT 1
- 预览标题的时候可以屏蔽链接标识吗 HOT 1
- Missing Source Map Files for parse5 in hast-util-raw Dependencies HOT 4
- How can i set textarea(.w-md-editor-text-input)'s parent <div> height style? HOT 4
- IMPORTANT MISSING FEATURE: Prop to limit the character length - maxLength and minLength attributes HOT 2
- [BUG] numbered list can't render number in preview panel HOT 3
- How to have hashtags render as links? HOT 3
- 预览模式下换行符显示问题 HOT 2
- 自适应高度时,切到preview模式,高度没了 HOT 6
- Change font size of editor HOT 1
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 react-md-editor.