Auto append data-content attribute using js

How about automatically append data-content attribute? I think it can also be used to long text