-
Task
-
Resolution: Done
-
Minor
-
2.7.15
One of the use of MDL-54710 is to hide the original while resizing or add a border styling while resizing. These are accomplish by attaching classes to images (or other html elements) that is under a css rule. For instance:
demo.css |
atto-helper-border {
|
border: 1px solid black;
|
}
|
demo.html |
<div class="atto-helper-border">
|
<!-- some contents. -->
|
</div>
|
The problem arises when save/autosave kicks in, saving unwanted styling. For instance, the border that is only intended as a helper will be saved.
To solve this, I will need to point you to the atto's clean.js (found in atto javascript source files). It contains getCleanHTML which is called before save/autosave. So what needs to be done is remove all classes that starts with "atto-helper" so that styles attached to "atto-helper-*" classes are not saved. This is a perfect solution since it goes with the name of the function getCleanHTML, that is, the intended html.