ice icon indicating copy to clipboard operation
ice copied to clipboard

ice for TinyMCE - changeIdAttribute

Open driscom opened this issue 12 years ago • 2 comments

hi, we have another unusual use case that stems from our use of TinyMCE, with ice, in Salesforce.com. The editor and plug in track changes as expected, but when we commit our changes to the underlying Salesforce field, our span tags are being sanitized by Salesforce. Specifically, they are removing the default changeIdAttribute "data-cid" and the related default userIdAttribute and userNameAttribute attributes. The effect of this is that we cannot approve/reject individual changes. We've experimented with some workarounds, one of which is to just initialize ice with changeIdAttribute = id. This is sub-optimal as we run the risk of generating some duplicate id's. We can imagine that there may be others that are integrating with other restrictive packaged products like Salesforce and would be interested in some other ways to allow for individual changes to be accepted or rejected. Thanks for your consideration!

driscom avatar Aug 07 '13 13:08 driscom

Can you describe what's happening here: "when we commit our changes to the underlying Salesforce field." Also, are you working on or integrating into the salesforce.com app?

delambo avatar Aug 09 '13 19:08 delambo

hi, our implementation is within the Salesforce application. It involves a Visualforce page with Rich Text fields, overriding the standard Rich Text editor with TinyMCE with ICE.

What we observed is that an individual change is tracked with the following span prior to the record being saved:

...span class="ins cts-1" title="Inserted by someuser - 08/9/2013 4:59pm" data-cid="2" data-userid="someuser" data-username="someuser" data-time="1376081956305"...

However, when we save to Salesforce and later edit the record, we see the following span in the html:

,,,span class="ins cts-1" title="Inserted by someuser - 08/9/2013 4:59pm...

Through our testing we confirmed that the html is definitely being modified by Salesforce.

driscom avatar Aug 09 '13 21:08 driscom