set up medium-style editor with image embedding and appcache
This commit is contained in:
parent
fb6d4181e4
commit
4898ed74a5
52 changed files with 19955 additions and 1 deletions
29
public/editor/editor.js
Normal file
29
public/editor/editor.js
Normal file
|
@ -0,0 +1,29 @@
|
|||
var editor = new MediumEditor('.editable', {
|
||||
buttons: ['bold', 'italic', 'header1', 'header2', 'quote', 'unorderedlist', 'pre'],
|
||||
paste: {
|
||||
// This example includes the default options for paste, if nothing is passed this is what it used
|
||||
forcePlainText: false,
|
||||
cleanPastedHTML: true,
|
||||
cleanReplacements: [],
|
||||
cleanAttrs: ['class', 'style', 'dir'],
|
||||
cleanTags: ['meta']
|
||||
}
|
||||
});
|
||||
|
||||
$(function () {
|
||||
$('.editable').mediumInsert({
|
||||
editor: editor,
|
||||
beginning: true,
|
||||
addons: {
|
||||
images: {
|
||||
deleteScript: '/editor/delete-file',
|
||||
fileUploadOptions: {
|
||||
url: '/editor/upload'
|
||||
}
|
||||
},
|
||||
embeds: {
|
||||
oembedProxy: '/editor/oembed'
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue