mirror of
https://github.com/codex-team/editor.js
synced 2026-03-16 23:55:49 +01:00
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:
parent
aff9ea13ad
commit
510764a3cd
15 changed files with 667 additions and 41 deletions
18
example.html
18
example.html
|
|
@ -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 : {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue