onfullscreen.html 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <!DOCTYPE html>
  2. <html lang="zh">
  3. <head>
  4. <meta charset="utf-8" />
  5. <title>Onfullscreen & onfullscreenExit - Editor.md examples</title>
  6. <link rel="stylesheet" href="css/style.css" />
  7. <link rel="stylesheet" href="../css/editormd.css" />
  8. <link rel="shortcut icon" href="https://pandao.github.io/editor.md/favicon.ico" type="image/x-icon" />
  9. </head>
  10. <body>
  11. <div id="layout">
  12. <header>
  13. <h1>Onfullscreen & onfullscreenExit event</h1>
  14. <p>Plaese press F12, open the develop tools.</p>
  15. </header>
  16. <div id="test-editormd">
  17. <textarea style="display:none;">#### Setting
  18. ```javascript
  19. {
  20. onfullscreen : function() {
  21. // alert("onfullscreen");
  22. // console.log("onfullscreen =>", this, this.id, this.settings);
  23. },
  24. onfullscreenExit : function() {
  25. // alert("onfullscreenExit");
  26. // console.log("onfullscreenExit =>", this, this.id, this.settings);
  27. }
  28. }
  29. ```
  30. </textarea>
  31. </div>
  32. </div>
  33. <script src="js/jquery.min.js"></script>
  34. <script src="../editormd.js"></script>
  35. <script type="text/javascript">
  36. $(function() {
  37. var editor = editormd("test-editormd", {
  38. width : "90%",
  39. height : 720,
  40. path : '../lib/',
  41. onfullscreen : function() {
  42. alert("onfullscreen");
  43. console.log("onfullscreen =>", this, this.id, this.settings);
  44. },
  45. onfullscreenExit : function() {
  46. alert("onfullscreenExit");
  47. console.log("onfullscreenExit =>", this, this.id, this.settings);
  48. }
  49. });
  50. });
  51. </script>
  52. </body>
  53. </html>