nodebb-plugin-composer-default 7.0.22 → 8.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nodebb-plugin-composer-default",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.0.0",
|
|
4
4
|
"description": "Default composer for NodeBB",
|
|
5
5
|
"main": "library.js",
|
|
6
6
|
"repository": {
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
},
|
|
27
27
|
"readmeFilename": "README.md",
|
|
28
28
|
"nbbpm": {
|
|
29
|
-
"compatibility": "^
|
|
29
|
+
"compatibility": "^2.0.0"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"screenfull": "^5.0.2",
|
package/plugin.json
CHANGED
|
@@ -27,10 +27,8 @@
|
|
|
27
27
|
"composer/scheduler.js": "./static/lib/composer/scheduler.js",
|
|
28
28
|
"composer/tags.js": "./static/lib/composer/tags.js",
|
|
29
29
|
"composer/uploads.js": "./static/lib/composer/uploads.js",
|
|
30
|
-
"composer/autocomplete.js": "./static/lib/composer/autocomplete.js"
|
|
30
|
+
"composer/autocomplete.js": "./static/lib/composer/autocomplete.js",
|
|
31
|
+
"../admin/plugins/composer-default.js": "./static/lib/admin.js"
|
|
31
32
|
},
|
|
32
|
-
"acpScripts": [
|
|
33
|
-
"./static/lib/admin.js"
|
|
34
|
-
],
|
|
35
33
|
"templates": "static/templates"
|
|
36
34
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
define('composer/autocomplete', [
|
|
3
|
+
define('composer/autocomplete', [
|
|
4
|
+
'composer/preview', 'textcomplete', 'textcomplete.contenteditable'
|
|
5
|
+
], function (preview, TextComplete, TextCompleteContentEditable) {
|
|
4
6
|
var autocomplete = {
|
|
5
7
|
_active: {},
|
|
6
8
|
};
|
|
@@ -70,17 +72,16 @@ define('composer/autocomplete', ['composer/preview'], function (preview) {
|
|
|
70
72
|
}
|
|
71
73
|
var editor;
|
|
72
74
|
if (element.nodeName === 'TEXTAREA') {
|
|
73
|
-
|
|
74
|
-
editor = new Textarea(element);
|
|
75
|
+
editor = new TextComplete.Textarea(element);
|
|
75
76
|
} else if (element.nodeName === 'DIV' && element.getAttribute('contenteditable') === 'true') {
|
|
76
|
-
var ContentEditable =
|
|
77
|
+
var ContentEditable = TextCompleteContentEditable.default;
|
|
77
78
|
editor = new ContentEditable(element);
|
|
78
79
|
}
|
|
79
80
|
|
|
80
81
|
// yuku-t/textcomplete inherits directionality from target element itself
|
|
81
82
|
element.setAttribute('dir', document.querySelector('html').getAttribute('data-dir'));
|
|
82
83
|
|
|
83
|
-
var textcomplete = new
|
|
84
|
+
var textcomplete = new TextComplete.Textcomplete(editor, {
|
|
84
85
|
dropdown: data.options,
|
|
85
86
|
});
|
|
86
87
|
textcomplete.register(data.strategies);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
define('composer/formatting', [
|
|
4
|
+
'composer/preview', 'composer/resize', 'topicThumbs', 'screenfull',
|
|
5
|
+
], function (preview, resize, topicThumbs, screenfull) {
|
|
6
6
|
var formatting = {};
|
|
7
7
|
|
|
8
8
|
var formattingDispatchTable = {
|
package/static/lib/composer.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
/* globals screenfull */
|
|
4
|
-
|
|
5
3
|
define('composer', [
|
|
6
4
|
'taskbar',
|
|
7
5
|
'translator',
|
|
@@ -22,9 +20,10 @@ define('composer', [
|
|
|
22
20
|
'hooks',
|
|
23
21
|
'messages',
|
|
24
22
|
'search',
|
|
23
|
+
'screenfull',
|
|
25
24
|
], function (taskbar, translator, uploads, formatting, drafts, tags,
|
|
26
25
|
categoryList, preview, resize, autocomplete, scheduler, scrollStop,
|
|
27
|
-
topicThumbs, api, bootbox, alerts, hooks, messagesModule, search) {
|
|
26
|
+
topicThumbs, api, bootbox, alerts, hooks, messagesModule, search, screenfull) {
|
|
28
27
|
var composer = {
|
|
29
28
|
active: undefined,
|
|
30
29
|
posts: {},
|