ckeditor5 自动格式化教程
The Autoformat
feature allows you to quickly apply formatting to the content you are writing.
格式化特性允许你快速的把你写的转化成格式化内容
This feature is enabled by default in all builds.
这个特性已经默认在构建时启用了
Block formatting
块模式下格式
The following block formatting options are available:
下面块模式下时有效的
- Bulleted list – Start a line with
*
or-
followed by a space. 无序列表 打一个*然后空格 - Numbered list – Start a line with
1.
or1)
followed by a space. 有序列表打一个1然后空格 - Headings – Start a line with
#
or##
or###
followed by a space to create a heading 1, heading 2 or heading 3 (up to heading 6 ifoptions
defines more headings). 标题打一个#或者##然后空格 - Block quote – Start a line with
>
followed by a space. 引用 打一个>然后空格 - Code block – Start a line with```
. 代码块 打三个
```然后空格
Inline formatting
内联模式
The following inline formatting options are available:
下面时内联模式下有效
- Bold – Type
**text**
or__text__
, - 加粗
- Italic – Type
*text*
or_text_
, - 斜体
- Code – Type
`text`
. - 代码
Autoformatting sample
格式化实例
Example:
- Delete all editor content.
- Press # and then Space.
- The current line will be turned into a heading.
来源:https://ckeditor.com/docs/ckeditor5/latest/features/code-blocks.html
阅读全文