Demo 5 : Editor Styles

NicEdit instances and the panel can be styled using CSS classes to fit the look and feel of your site.

This is text above the Panel
This is text below the Panel

Selected Style Example

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed magna dolor, faucibus ac, iaculis non, cursus et, dui. Donec non urna. Aliquam volutpat ornare augue. Phasellus egestas, nisl fermentum porttitor rutrum, magna metus rutrum risus, id fringilla magna mi nec lorem. Etiam eget metus sed justo ultricies rhoncus. Praesent rhoncus arcu non dolor. Proin eu eros. Curabitur vehicula. Nulla vehicula lectus eget eros. Nulla vel nulla at dui dictum mollis. Etiam purus felis, pretium vel, eleifend id, consectetuer nec, purus. Vivamus pretium orci ac sapien. Etiam at tortor. Nunc tincidunt mi sed sapien. Etiam lacus pede, fermentum eu, blandit ac, congue eget, metus. Quisque sed sem. Mauris at sapien. Ut luctus.

Source Code

  1.  
  2. <style type="text/css">
  3. /*<![CDATA[*/
  4. #myInstance1 {
  5. border: 2px dashed #0000ff;
  6. }
  7. .nicEdit-selected {
  8. border: 2px solid #0000ff !important;
  9. }
  10.  
  11. .nicEdit-panel {
  12. background-color: #fff !important;
  13. }
  14.  
  15. .nicEdit-button {
  16. background-color: #fff !important;
  17. }
  18. /*]]>*/
  19. </style><div id="sample">
  20. <script type="text/javascript" src="http://js.nicedit.com/nicEdit-latest.js"></script> <script type="text/javascript">
  21. //<![CDATA[
  22. bkLib.onDomLoaded(function() {
  23. var myNicEditor = new nicEditor();
  24. myNicEditor.setPanel('myNicPanel');
  25. myNicEditor.addInstance('myInstance1');
  26. });
  27. //]]>
  28. </script> This is text above the Panel
  29. <div id="myNicPanel" style="width: 350px;"></div>This is text below the Panel<br />
  30. <br />
  31. <h4>
  32. Selected Style Example
  33. </h4>
  34. <div id="myInstance1" style="font-size: 16px; background-color: #ccc; padding: 3px; width: 400px;">
  35. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed magna dolor, faucibus ac, iaculis non, cursus et, dui. Donec non urna. Aliquam volutpat ornare augue. Phasellus egestas, nisl
  36. fermentum porttitor rutrum, magna metus rutrum risus, id fringilla magna mi nec lorem. Etiam eget metus sed justo ultricies rhoncus. Praesent rhoncus arcu non dolor. Proin eu eros. Curabitur
  37. vehicula. Nulla vehicula lectus eget eros. Nulla vel nulla at dui dictum mollis. Etiam purus felis, pretium vel, eleifend id, consectetuer nec, purus. Vivamus pretium orci ac sapien. Etiam at
  38. tortor. Nunc tincidunt mi sed sapien. Etiam lacus pede, fermentum eu, blandit ac, congue eget, metus. Quisque sed sem. Mauris at sapien. Ut luctus.
  39. </div>
  40. </div>