nodebb-plugin-composer-default 10.3.13 → 10.3.14

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": "10.3.13",
3
+ "version": "10.3.14",
4
4
  "description": "Default composer for NodeBB",
5
5
  "main": "library.js",
6
6
  "repository": {
@@ -127,7 +127,15 @@ define('composer', [
127
127
 
128
128
  if (existingUUID) {
129
129
  taskbar.updateActive(existingUUID);
130
- return composer.load(existingUUID);
130
+ if (post.body) {
131
+ const postContainer = $('.composer[data-uuid="' + existingUUID + '"]');
132
+ const bodyEl = postContainer.find('textarea');
133
+ const prevText = bodyEl.val();
134
+ composer.posts[existingUUID].body = (prevText.length ? prevText + '\n\n' : '') + post.body;
135
+ bodyEl.val(composer.posts[existingUUID].body);
136
+ preview.render(postContainer);
137
+ }
138
+ return;
131
139
  }
132
140
 
133
141
  var actionText = '[[topic:composer.new-topic]]';