mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
autolink chat messages
This commit is contained in:
parent
7918ea4bc3
commit
08420a305a
4 changed files with 18 additions and 2 deletions
|
@ -44,7 +44,8 @@ aside.chat(
|
|||
p(
|
||||
mathjax,
|
||||
ng-repeat="content in message.contents track by $index"
|
||||
) {{ content }}
|
||||
)
|
||||
span(ng-bind-html="linkify(content)")
|
||||
|
||||
.new-message
|
||||
textarea(
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
define [
|
||||
"base"
|
||||
"libs/autolinker"
|
||||
"ide/chat/services/chatMessages"
|
||||
], (App) ->
|
||||
], (App, autolinker) ->
|
||||
App.controller "ChatController", ($scope, chatMessages, ide, $location) ->
|
||||
$scope.chat = chatMessages.state
|
||||
|
||||
|
@ -29,4 +30,7 @@ define [
|
|||
$scope.loadMoreMessages = ->
|
||||
chatMessages.loadMoreMessages()
|
||||
|
||||
$scope.linkify = (message)->
|
||||
return autolinker.link(message)
|
||||
|
||||
|
|
@ -9,4 +9,5 @@ define [
|
|||
"libs/fineuploader"
|
||||
"libs/angular-sanitize-1.2.17"
|
||||
"libs/angular-cookie"
|
||||
"libs/autolinker"
|
||||
], () ->
|
||||
|
|
10
services/web/public/js/libs/autolinker.js
Normal file
10
services/web/public/js/libs/autolinker.js
Normal file
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue