You can create floating text at any point (say, the position of the unit taking/dealing the damage). If you look carefully at the other text "actions" available to you in the editor, you will see ones that allow you to change velocity, color, and even duration (though I don't believe it's labeled "duration", but rather lifetime or something to that effect). Changing the floating text to have a lifetime automatically removes the floating text when it's lifetime expires, so you don't have to worry about trying to keep track of it and removing it when you want to.
For the event, simply use "Unit takes Damage".
For the condition, simply use something like "Unit classification of damaging unit equal to hero".
To help prevent lag, you may want to create a point variable at wherever you want the text to appear, and then immediately delete that point once you have your text created (otherwise, I think the game "saves" all the points used to create floating text).