 			$(@).after(el)
 			$(@).remove()
 		@restoreSelection()
-	assignNewNameToCurrentSelectedElement: ->
-		@getSelectedElement().attr 'name', @rand()
+	assignNameAttribute: (jqel)->
+		jqel.attr 'name', @rand()
+	bindTo: (jqel)->
+		jqel.on 'mousemove', (e)->
+			parentOffset = $(@).parent().offset()
+
+			thisOffset = $(@).offset()
+			console.log "x:#{e.pageX - thisOffset.left} , y:#{e.pageY - thisOffset.top}"
 	update: ->
 		self = @
 		# giving names

					item.name
				$.each attributes, (i, key)=>
					$(@).removeAttr(key)
			document.execCommand 'insertHtml', false, $(pasteElement).text()
		.blur =>
			@updateTitlePrompt(false)

		@articleDeleteURL = options.articleDeleteURL

	init: ()->
		self = @
		$('#editor').html '<p><br></p>' if @status.new
		$('#editor').children().each ->
			self.bindTo $(@)
		@update()
		@checkTitleEmpty()
		@checkEmpty()
