Nuggets Markdown editor problem description

I wanted to post my first blog in nuggets on August 25, 2021, however, I ran into a few inconveniences while using Nuggets Markdown, so here’s a note.

Note: The following issues were encountered as of aug 25, 2021 11:08:16, and the Nuggets may make improvements and feature additions to the Markdown editor.

I also posted a related boiling point at the time:

Markdown editor – Digging gold

1. How to center pictures or text

, set the font with . Typora does support setting the style attribute. But neither CSDN nor the Nuggets’ Markdown editor seems to be able to apply the style attribute.

Solution :(thanks to byte2021 youth training camp staff @liang * zhi for their answers)

Use

XXXX

.

<div align="center"><img src="https://p1-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/271e674b224341509876caa2eeb210c0~tplv-k3u1fbpfcp-watermark.image"></div>
Copy the code

Such as:

<div align="center"><img width="240px" src="https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/1773706239424d03bf5226cd9764a04a~tplv-k3u1fbpfcp-zoom-1.image"/></div><div align="center" color="gray">Image center effect (nuggets level hint, look at the light in my eyes ~)</div>
Copy the code

Display effect:


Image center effect (nuggets level hint, look at the light in my eyes ~)

<div align="center">xxxx</div>This approach can solve the centralization problem of CSDN, Nuggets and Typora.

We hope that the official can provide a scheme that makes it very convenient for us to set the image center and set the image size. For example, CSDN does this by adding relevant parameters after the image link:

CSDN official example


If you want to set the size of your image in the Nuggets Markdown editor, you can set the width and height properties of the IMG tag. This method can solve the problem of CSDN, Nuggets and Typora setting the image size.

<img width="240px" src="https://i.loli.net/2021/08/30/rBO1VhTgoeHusGQ.png"/>
Copy the code

2. Unusable<mark>xxx</mark>Way to highlight text

Effects in the Gold-digging Markdown editor Effects in Typora and CSDN editor (desired effects)
image-20210825112003943


image-20210825112146619


Solution:

Use the tag. .

Recommend a regular expression online tool:

Reference: the regular expression online test tools | rookies

3. Pasted code blocks sometimes don’t wrap themselves (formatting is out of order)

Sometimes when you paste the contents of typora code into a gold digging editor, some blocks of code don’t wrap themselves on one line. Something like this:

image-20210825112810215


The original format (expected) looks like this:

image-20210825112919383


I ran into this problem when I pasted a large amount of content from Typora into the gold digging editor at once, where the first few blocks of code showed up as expected, but the later blocks generally did. I guess the problem is that I pasted a lot of content at once. .

Solution:

We can only hope for a feature that imports Markdown files from the authorities, or manually re-copy and paste the misformatted code blocks ourselves.

After a few experiments, I found that this problem can occur when I select the entire content directly from the preview mode of the local Markdown editor and then copy and paste it into the Gold-digging Markdown editor, but not when I copy and paste it from source mode.

4. Unable to set text style (font, size, color)

You cannot set text styles (type, size, background color, foreground color) using the font tag. (Although this tag is officially deprecated by MDN, it feels very useful when writing Markdown, but the gold digging editor does not support it…) . Fortunately, if you use a font tag, it doesn’t matter, except that some attributes won’t be parsed.

5. Unusable<kbd>The label

This seems to be really no way, do not support is not support, have to see the official how to do.

[Update: 30 Aug 2021 20:09:43] It turns out that the Markdown editor does support parsing < KBD > tags, but the display is not good, just the font has changed a bit, and the border effect is not as expected.