Skip to content

Latest commit

 

History

History
120 lines (89 loc) · 2.12 KB

File metadata and controls

120 lines (89 loc) · 2.12 KB

Richmd Slide Mode (v4)

From Richmd v4, Slide Mode is now available. This allows you to create presentation slides using markdown-like syntax.

How to Use

The usage is the same as normal, just use richmd(). However, there are rules for the format of the target markdown text, so caution is needed.

Also, when using this mode, it is strongly recommended to use @richmd/react or @richmd/vue.

pnpm add @richmd/react # Use React
pnpm add @richmd/vue # Use Vue

How to Write Markdown Text

In this mode, there are certain rules for writing text.

Using Slide Mode

To use slide mode, declare |use slide| on the first line.

|use slide|

...

This switches from normal mode to slide mode.

Defining Slides

Next, define the slides to display. The method for defining slides is described below. For slides, you need to define text alignment, display content layout, and theme.

Center Alignment

||---||
||---||

Left Alignment

||<--||
||---||

Right Alignment

||-->||
||---||

title Layout (Vertically Centered)

↓ In this case, it will be centered both vertically and horizontally
||---||title
||---||

content Layout

This is the default layout with vertical top alignment.

↓ In this case, text is left-aligned and vertically top-aligned
||<--||content
||---||

theme Option

After defining the layout, you can define a theme option. Themes are predefined.

↓ dark will be applied.
||---||title.dark
||---||

Displaying Content in Slides

It's easy to display content in defined slides. Just write markdown within the slide.

||---||title.dark
# Title

author: demo
||---||

||<--||content.dark
# Content

**content**
||---||

⚠️ Invalid Writing

In slide mode, markdown is only parsed within slides defined by the above method. Markdown written outside of slides is ignored.

# hoge <-- Not parsed

||---||title.dark
# Title

author: demo
||---||

Themes

List of themes available in slide mode.

  • default
  • sunset
  • malinka
  • moon
  • darkblue
  • sky
  • green
  • dark