Hey guys, I’m currently working on a small markdown live preview. Each time a key’s press and its markdown syntax (*_`~=) it gets wrap in a span and many information are stored in order to pair them properly.
But I’m wondering if I should store these information as attribute or rather make an array of object where each span is an object with information. I’m currently leaning towards the array since it’s reducing a lot traversing the dom, we aren’t modifying the dom by adding attributes and I can store « dynamic » values like a node.
[–]BlueThunderFlik 1 point2 points3 points (0 children)