forked from codex-team/editor.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve AJAX context saving (codex-team#184)
* Improve AJAX context saving Value returned in beforeSend method now will be passed as context to the Error, Success and Progress events * resolve conflict
- Loading branch information
Showing
8 changed files
with
121 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
{ | ||
/* | ||
* ENVIRONMENTS | ||
* ================= | ||
*/ | ||
|
||
// Define globals exposed by modern browsers. | ||
"browser": true, | ||
|
||
// Define globals exposed by Node.js. | ||
"node": true, | ||
|
||
// Define globals exposed by CodeX Team | ||
"predef": [ | ||
"codex" | ||
], | ||
|
||
// Allow ES6. | ||
"esversion": 6, | ||
|
||
/* | ||
* ENFORCING OPTIONS | ||
* ================= | ||
*/ | ||
|
||
// Force all variable names to use either camelCase style or UPPER_CASE | ||
// with underscores. | ||
"camelcase": true, | ||
|
||
// Prohibit use of == and != in favor of === and !==. | ||
"eqeqeq": true, | ||
|
||
// Enforce tab width of 2 spaces. | ||
"indent": 2, | ||
|
||
// Prohibit use of a variable before it is defined. | ||
"latedef": true, | ||
|
||
// Enforce line length to 100 characters | ||
"maxlen": 120, | ||
|
||
// Require capitalized names for constructor functions. | ||
"newcap": true, | ||
|
||
// Enforce use of single quotation marks for strings. | ||
"quotmark": "single", | ||
|
||
// Enforce placing 'use strict' at the top function scope | ||
"strict": true, | ||
|
||
// Prohibit use of explicitly undeclared variables. | ||
"undef": true, | ||
|
||
// Warn when variables are defined but never used. | ||
"unused": true, | ||
|
||
/* | ||
* RELAXING OPTIONS | ||
* ================= | ||
*/ | ||
|
||
// Suppress warnings about == null comparisons. | ||
"eqnull": true | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,6 +56,9 @@ | |
<script src="plugins/attaches/attaches.js"></script> | ||
<link rel="stylesheet" href="plugins/attaches/attaches.css"> | ||
|
||
<script src="plugins/personality/personality.js"></script> | ||
<link rel="stylesheet" href="plugins/personality/personality.css"> | ||
|
||
<script> | ||
codex.editor.start({ | ||
holderId : "codex-editor", | ||
|
@@ -218,6 +221,21 @@ | |
fetchUrl: '/test', | ||
maxSize: 50000, | ||
} | ||
}, | ||
personality: { | ||
type : 'personality', | ||
displayInToolbox : true, | ||
iconClassname : 'cdx-personality-icon', | ||
prepare : cdxEditorPersonality.prepare, | ||
render : cdxEditorPersonality.render, | ||
save : cdxEditorPersonality.save, | ||
validate : cdxEditorPersonality.validate, | ||
destroy : cdxEditorPersonality.destroy, | ||
enableLineBreaks : true, | ||
showInlineToolbar: true, | ||
config: { | ||
uploadURL: '/uploadPhoto', | ||
} | ||
} | ||
}, | ||
data : { | ||
|
@@ -234,6 +252,14 @@ | |
text : 'Пишите нам на [email protected]' | ||
} | ||
}, | ||
{ | ||
type : 'personality', | ||
data : { | ||
name : 'Красюк Светлана Ивановна', | ||
cite : 'Заместитель директора по учебно-воспитательной работе (начальная школа)', | ||
url : 'https://new.school332.ru/user/2' | ||
} | ||
}, | ||
{ | ||
type : 'list', | ||
data : { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters