You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While working on pat-tiptap I noticed that the current value of the textarea is always replicated in a data-value attribute. This can be quite long for big text documents and unnecessary JavaScript execution on each textarea value's update. Also, the DOM structure becomes unreadable due to this big data chunk in a DOM node's attribute.
pat-focus sets both the has-value class and the data-value attribute.
Options to solve the problem
Remove the functionality which updates data-value and/or has-value.
Add a method to explicitly include or explicitly exclude the update of data-value.
If possible, I'd opt for option 1) to reduce complexity.
Usage of data-value
When I search for data value through ploneintranet.prototype's code base I find these occurrences:
Good point. However for these large documents we will typically use real time collaboration in the phase two of the tiptap story.
If we have to do something now then I would opt for option 2), because I use data-value and might use it more in the future. Also, I intend to simplify instances of pat content mirror that we will keep using by a data-value based version of content mirror.
However, I don't see an emergency to look at this right now. All performs adequately.
thet
changed the title
Remove data-value and
Remove data-value
Sep 14, 2021
Problem
While working on
pat-tiptap
I noticed that the current value of the textarea is always replicated in adata-value
attribute. This can be quite long for big text documents and unnecessary JavaScript execution on each textarea value's update. Also, the DOM structure becomes unreadable due to this big data chunk in a DOM node's attribute.pat-focus
sets both thehas-value
class and thedata-value
attribute.Options to solve the problem
data-value
and/orhas-value
.data-value
.If possible, I'd opt for option 1) to reduce complexity.
Usage of data-value
When I search for data value through ploneintranet.prototype's code base I find these occurrences:
In OiRA, it's not used at all:
Usage of has-value
in ploneintranet.prototype:
in oira.prototype:
The text was updated successfully, but these errors were encountered: