       tokenView.emit "viewAppended"
       return tokenView.getElement().outerHTML
 
+  getTokenFilter: ->
+    switch @activeRule.prefix
+      when "#" then (token) -> token instanceof JTag
+      else noop
+
   fillTokenMap = (tokens, map) ->
     tokens.forEach (token) ->
       map[token.getId()] = token

    @tokenInput.textContent = prefix + words.join "-"
    @utils.selectEnd @tokenInput

  keyDown: (event) ->
    super
    return  if event.isPropagationStopped()
    switch event.which
      when 27 # Escape
        @emit "Escape"

  focus: ->
    return  if @focused

class ActivityInputView extends KDTokenizedInput
  {JTag} = KD.remote.api

  constructor: (options = {}, data) ->
    options.cssClass         = KD.utils.curry "input-view", options.cssClass
    options.type           or= "html"
