-
Notifications
You must be signed in to change notification settings - Fork 2k
/
index.js
63 lines (51 loc) · 1.27 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/** @format */
/**
* External dependencies
*/
import { ExternalLink } from '@wordpress/components';
import { Fragment } from '@wordpress/element';
/**
* Internal dependencies
*/
import './editor.scss';
import edit from './edit';
import save from './save';
import { __ } from 'gutenberg/extensions/presets/jetpack/utils/i18n';
export const name = 'markdown';
export const settings = {
title: __( 'Markdown' ),
description: (
<Fragment>
<p>{ __( 'Use regular characters and punctuation to style text, links, and lists.' ) }</p>
<ExternalLink href="https://en.support.wordpress.com/markdown-quick-reference/">
{ __( 'Support reference' ) }
</ExternalLink>
</Fragment>
),
icon: (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 208 128">
<rect
width="198"
height="118"
x="5"
y="5"
ry="10"
stroke="currentColor"
strokeWidth="10"
fill="none"
/>
<path d="M30 98v-68h20l20 25 20-25h20v68h-20v-39l-20 25-20-25v39zM155 98l-30-33h20v-35h20v35h20z" />
</svg>
),
category: 'jetpack',
keywords: [ __( 'formatting' ), __( 'syntax' ), __( 'markup' ) ],
attributes: {
//The Markdown source is saved in the block content comments delimiter
source: { type: 'string' },
},
supports: {
html: false,
},
edit,
save,
};