Advertisement
Guest User

Untitled

a guest
Nov 26th, 2014
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.35 KB | None | 0 0
  1. <script type='text/javascript' src='../_Js/jquery.simplemodal.js'></script>
  2. <script>
  3. jQuery(function ($) {
  4. $('.edit').click(function (e) {
  5. $('#blog-edit-content').modal();
  6. return false;
  7. });
  8. });
  9. </script>
  10.  
  11. <a class="edit" style="font-size:16px;color:#CCC;" href="">Edit</a>
  12.  
  13. <div id="blog-edit-content" style="display:none;">
  14. <form name="newblog" id="newblog" action="#" method="post">
  15. <font color="#000000"><strong>Title: </strong></font>
  16. <input name="blogtitle" id="blogtitle" type="text" id="title" size="80" maxlength="255" value="'.$blogtitle.'" /><br /><br />
  17. <textarea class="ckeditor" cols="80" id="blog-edit-body" name="blog-edit-body" rows="10"></textarea><br />
  18. Please separate tages with a <strong>comma</strong>.<br />
  19. <font color="#000000"><strong>Tags: </strong></font>
  20. <input name="tags" id="tags" type="text" size="80" maxlength="255" alue="tags" /><br /><br />
  21. <input type="submit" value="Post Blog" />
  22. <span id="blogFormProcessGif" style="display:none;">
  23. <img src="../_Images/loading.gif" width="28px" height="28px" alt="Loading" />
  24. </span>
  25. </form>
  26. </div>
  27.  
  28. <!DOCTYPE html>
  29. <!--
  30. Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
  31. For licensing, see LICENSE.md or http://ckeditor.com/license
  32. -->
  33. <html>
  34. <head>
  35. <meta charset="utf-8">
  36. <title>API Usage &mdash; CKEditor Sample</title>
  37. <script src="ckeditor/ckeditor.js"></script>
  38. <link href="sample.css" rel="stylesheet">
  39. <script>
  40.  
  41. // The instanceReady event is fired, when an instance of CKEditor has finished
  42. // its initialization.
  43. CKEDITOR.on( 'instanceReady', function( ev ) {
  44.  
  45. // Show this sample buttons.
  46. document.getElementById( 'eButtons' ).style.display = 'block';
  47. });
  48.  
  49.  
  50. function GetContents() {
  51. // Get the editor instance that you want to interact with.
  52. var editor = CKEDITOR.instances.editor1;
  53.  
  54. // Get editor contents
  55. // http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-getData
  56. alert( editor.getData());
  57. }
  58. function Focus() {
  59. CKEDITOR.instances.editor1.focus();
  60. }
  61.  
  62. function onFocus() {
  63. document.getElementById( 'eMessage' ).innerHTML = '<b>' + this.name + ' is focused </b>';
  64. }
  65.  
  66. function onBlur() {
  67. document.getElementById( 'eMessage' ).innerHTML = this.name + ' lost focus';
  68. }
  69.  
  70. </script>
  71.  
  72. </head>
  73. <body>
  74. <h1 class="samples">
  75. <noscript>
  76. </noscript>
  77. </h1>
  78. <form action="../../../samples/sample_posteddata.php" method="post">
  79. <textarea cols="100" id="editor1" name="editor1" rows="10"><p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p></textarea>
  80.  
  81. <script>
  82. // Replace the <textarea id="editor1"> with an CKEditor instance.
  83. CKEDITOR.replace( 'editor1', {
  84. on: {
  85. focus: onFocus,
  86. blur: onBlur,
  87.  
  88. // Check for availability of corresponding plugins.
  89. pluginsLoaded: function( evt ) {
  90. var doc = CKEDITOR.document, ed = evt.editor;
  91. if ( !ed.getCommand( 'bold' ) )
  92. doc.getById( 'exec-bold' ).hide();
  93. if ( !ed.getCommand( 'link' ) )
  94. doc.getById( 'exec-link' ).hide();
  95. }
  96. }
  97. });
  98. </script>
  99.  
  100.  
  101. </form><br>
  102.  
  103. <input type="button" onClick="javascript:GetContents()" value="Save"/>
  104. </body>
  105. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement