-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmarkdown_html.php
More file actions
47 lines (44 loc) · 1.55 KB
/
markdown_html.php
File metadata and controls
47 lines (44 loc) · 1.55 KB
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
<link rel="stylesheet" type="text/css" href="<?php echo BLOG_URL; ?>content/plugins/markdown-master/styles/simditor.css" />
<script type="text/javascript" src="<?php echo BLOG_URL; ?>content/plugins/markdown-master/scripts/js/module.min.js"></script>
<script type="text/javascript" src="<?php echo BLOG_URL; ?>content/plugins/markdown-master/scripts/js/hotkeys.js"></script>
<script type="text/javascript" src="<?php echo BLOG_URL; ?>content/plugins/markdown-master/scripts/js/simditor.min.js"></script>
<script type="text/javascript" src="<?php echo BLOG_URL; ?>content/plugins/markdown-master/scripts/js/simditor-markdown.js"></script>
<script>
var markdown_editor = '<textarea id="content" name="content" placeholder="输入内容,文章最后记得加回车哦~" autofocus></textarea>';
$(function() {
var val = $('#content').val();
$('.ke-container').remove();
$('#content').parent().remove();
$('#post_bar').css('width', '100%');
$('#FrameUpload').after(markdown_editor);
var editor = new Simditor({
textarea: $('#content'),
defaultImage: '/content/plugins/markdown-master/images/image.png',
toolbar: [
'title',
'bold',
'italic',
'underline',
'strikethrough',
'color',
'ol',
'ul',
'blockquote',
'code',
'table',
'link',
'image',
'hr',
'indent',
'outdent',
'source'
],
markdown: true,
});
editor.setValue(val);
editor.on('valuechanged', function(){
editor.sync();
});
$('.simditor-placeholder').css('top', 'auto');
});
</script>