This repository has been archived by the owner on Jun 4, 2018. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add composer button and add formatting on composer.enhanced event
- Loading branch information
frissdiegurke
committed
Apr 27, 2016
1 parent
d546d34
commit 668d4ca
Showing
5 changed files
with
10 additions
and
7 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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"build": 1234 | ||
"build": 1238 | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
require(["composer/formatting"], function (composer) { | ||
$(window).on("action:composer.enhanced", function () { | ||
"use strict"; | ||
|
||
composer.addButtonDispatch("@{id}", function (textarea, selectionStart, selectionEnd) { | ||
require(["@{type.name}/@{id}/composer/modal"], function (modal) { | ||
modal.openAndInsert(textarea, selectionStart, selectionEnd); | ||
require(["composer/formatting"], function (composer) { | ||
composer.addButtonDispatch("@{id}", function (textarea, selectionStart, selectionEnd) { | ||
require(["@{type.name}/@{id}/composer/modal"], function (modal) { | ||
modal.openAndInsert(textarea, selectionStart, selectionEnd); | ||
}); | ||
}); | ||
}); | ||
}); |
668d4ca
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this change included in a release? When I disable emoji extended this error seems to go away NodeBB/NodeBB#4709