feat: hide ONLYOFFICE logo via direct CSS patch + iframe injection + init script for persistence
This commit is contained in:
@@ -359,6 +359,17 @@ async function openOnlyofficeEditor(templateId, templateName) {
|
||||
},
|
||||
onDocumentReady: function() {
|
||||
console.log('Document loaded in editor');
|
||||
// Inject CSS into ONLYOFFICE iframe to hide the logo
|
||||
try {
|
||||
var iframe = document.getElementById(containerId).querySelector('iframe');
|
||||
if (iframe && iframe.contentDocument) {
|
||||
var style = iframe.contentDocument.createElement('style');
|
||||
style.textContent = '#header-logo { display: none !important; }';
|
||||
iframe.contentDocument.head.appendChild(style);
|
||||
}
|
||||
} catch(e) {
|
||||
console.log('Could not inject CSS into iframe:', e);
|
||||
}
|
||||
},
|
||||
onSave: function(event) {
|
||||
toast('Document saved successfully');
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
<!-- Modals -->
|
||||
<div class="modal-overlay" id="modal-overlay"></div>
|
||||
|
||||
<script src="/static/app.js?v=9"></script>
|
||||
<script src="/static/carbone.js?v=9"></script>
|
||||
<script src="/static/app.js?v=10"></script>
|
||||
<script src="/static/carbone.js?v=10"></script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user