2019-09-12 20:48:21 -05:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="en">
|
|
|
|
|
|
|
|
<head>
|
|
|
|
<meta charset="UTF-8">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
|
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
|
|
|
<title>Example / Preview</title>
|
|
|
|
<link rel="stylesheet" href="../dist/easymde.min.css">
|
|
|
|
<script src="../dist/easymde.min.js"></script>
|
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
|
|
|
<textarea></textarea>
|
|
|
|
<script>
|
2022-09-17 23:07:24 +02:00
|
|
|
const easyMDE = new EasyMDE({
|
|
|
|
showIcons: ["code", "table"],
|
|
|
|
toolbar: [
|
|
|
|
{
|
|
|
|
name: "bold",
|
|
|
|
action: EasyMDE.toggleBold,
|
|
|
|
className: "fa fa-bold",
|
|
|
|
title: "Bold",
|
|
|
|
},
|
|
|
|
'table',
|
|
|
|
{
|
|
|
|
name: "italic",
|
|
|
|
action: EasyMDE.toggleItalic,
|
|
|
|
className: "fa fa-italic",
|
|
|
|
title: "Italic",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "strikethrough",
|
|
|
|
action: EasyMDE.toggleStrikethrough,
|
|
|
|
className: "fa fa-strikethrough",
|
|
|
|
title: "Strikethrough",
|
|
|
|
children: [
|
|
|
|
{
|
|
|
|
name: 'link',
|
|
|
|
action: 'https://github.com/Ionaru/easy-markdown-editor',
|
|
|
|
className: 'fa fab fa-github',
|
|
|
|
title: 'A Custom Link',
|
|
|
|
noDisable: true,
|
|
|
|
noMobile: true,
|
|
|
|
},
|
|
|
|
'preview',
|
|
|
|
{
|
|
|
|
name: 'bold',
|
|
|
|
action: EasyMDE.toggleBold,
|
|
|
|
className: 'fa fas fa-bold',
|
|
|
|
title: 'Bold',
|
|
|
|
attributes: {
|
|
|
|
'data-custom': 'some value',
|
|
|
|
'data-custom-2': 'another value',
|
|
|
|
}
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
toolbarButtonClassPrefix: 'mde'
|
|
|
|
});
|
2019-09-12 20:48:21 -05:00
|
|
|
</script>
|
|
|
|
</body>
|
|
|
|
|
2020-05-09 01:12:52 +02:00
|
|
|
</html>
|