         dom(node).text(dom.EMBED_TEXT) if dom.EMBED_TAGS[@config.tag]?   # TODO is this desireable?
     if _.isString(@config.parentTag)
       dom(node.parentNode).unwrap()
+    if _.isFunction(@config.remove)
+      node = @config.remove(node)
     if node.tagName == dom.DEFAULT_INLINE_TAG and !node.hasAttributes()
       node = dom(node).unwrap()
     return node
 
   value: (node) ->
     return undefined unless this.match(node)
+    if @config.value
+      return @config.value(node)
     if _.isString(@config.attribute)
       return node.getAttribute(@config.attribute) or undefined    # So "" does not get returned
     else if _.isString(@config.style)

        node.setAttribute(@config.attribute, value)
      if _.isString(@config.class)
        dom(node).addClass(@config.class + value)
    return node

  isType: (type) ->


    link:
      tag: 'A'
      add: (node, value) ->
        node.setAttribute('href', value)
        return node
      remove: (node) ->
        node.removeAttribute('href')
        return node
      value: (node) ->
        return node.getAttribute('href')

    image:
      tag: 'IMG'
