I made CSS for printing to hide multiple fields. The problem was complicated by the fact that I used nicEdit, which dynamically creates an IFRAME. So I had to add an event that took onblur events and copied them to a hidden (except for printing) Div. "divtext" is the Hid Div, and "storyText" is TextArea.
textarea { display: none; } */ #divtext { display: block; } div, DIV { border-style: none !important; float: none !important; overflow: visible !important; display: inline !important; } #nav-wrapper, #navigation, img, p.message, .about, label, input, button, #nav-right, #nav-left, .template, #header, .nicEdit-pane, .nicEdit-selected, .nicEdit-panelContain, .nicEdit-panel, .nicEdit-frame { display: none !important; } .nicEdit-button-active, .nicEdit-button-hover, .nicEdit-buttonContain, .nicEdit-button, .nicEdit-buttonEnabled, .nicEdit-selectContain, .nicEdit-selectControl, .nicEdit-selectTxt { display: none !important; }
Javascript code for nicEdit:
<script type="text/javascript" src="/media/nicEdit.js"></script> <script type="text/javascript"> bkLib.onDomLoaded(function () { var nic = new nicEditor({ fullPanel: true }).panelInstance('storyText'); document.getElementById("storyText").nic = nic; nic.addEvent('blur', function () { document.getElementById("storyText").value = nic.instanceById('storyText').getContent(); document.getElementById("divtext").innerHTML = nic.instanceById('storyText').getContent(); }); }); </script>
torial
source share