Attaches plugin (#181)

* Attaches plugin

* Ignore server dir

* Progress bar added

* Styles upd

* Fix

* refactoring

* core.ajax fix

* Upd

* Upd

* update styles

* remove tmp return

* styles updated

* file title now 'title'

* Current upload check

* update attaches and image plugin
This commit is contained in:
George Berezhnoy 2017-03-21 21:45:52 +03:00 committed by Peter Savchenko
commit 510764a3cd
15 changed files with 667 additions and 41 deletions

View file

@ -54,6 +54,9 @@
<script src="plugins/raw/raw.js"></script>
<link rel="stylesheet" href="plugins/raw/raw.css">
<script src="plugins/attaches/attaches.js"></script>
<link rel="stylesheet" href="plugins/attaches/attaches.css">
<script>
codex.editor.start({
holderId : "codex-editor",
@ -206,6 +209,21 @@
destroy: rawPlugin.destroy,
enableLineBreaks: true,
allowPasteHTML: true
},
attaches: {
type: 'attaches',
displayInToolbox: true,
iconClassname: 'cdx-attaches__icon',
prepare: cdxAttaches.prepare,
render: cdxAttaches.render,
save: cdxAttaches.save,
validate: cdxAttaches.validate,
destroy: cdxAttaches.destroy,
appendCallback: cdxAttaches.appendCallback,
config: {
fetchUrl: '/test',
maxSize: 50000,
}
}
},
data : {