12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <meta name="renderer" content="webkit">
- <style>
- html, body {
- padding: 0;
- margin: 0;
- font-size: 14px;
- }
- .horizontal-line-editor {
- width: 100%;
- }
- .pup_content{
- padding-top: 20px;
- padding-left: 20px;
- line-height: 24px;
- }
- .input-horizontal-line-number{
- margin-bottom: 10px;
- border:1px solid #aaa;
- padding:0;
- width:300px;
- line-height:1.8;
- min-height:22px;
- outline: none;
- }
- </style>
- <title></title>
- </head>
- <body>
- <div id="HorizontalLineContainer" class="horizontal-line-editor">
- <div class="pup_content">
- <span class="horizontal-line-editor-title">
- 横线行数:
- </span>
- <span class="horizontal-line-editor-content">
- <input type="number" id="HorizontalLineNumber" min="0" max="2000" class="input-horizontal-line-number">
- </span>
- </div>
- </div>
- <!--页面中一定要引入internal.js为了能直接使用当前打开dialog的实例变量-->
- <!--internal.js默认是放到dialogs目录下的-->
- <script type="text/javascript" src="../dialogs/internal.js"></script>
- <script src="../kityformula-plugin/kityformula/js/jquery-1.11.0.min.js"></script>
- <script>
- jQuery( function ($) {
- if ( document.body.addEventListener ) {
- dialog.onok = function(){
- var LatticeNumber = $( "#HorizontalLineNumber").val();
- var row = Number(LatticeNumber);
- var HorizontalLineHtml = '';
- for (var i = 0; i < row; i++) {
- HorizontalLineHtml += '<p class="horizontal-line"></p>';
- }
- HorizontalLineHtml += '<p></p>';
- editor.setContent(HorizontalLineHtml,true);
- dialog.close();
- return false
- }
- } else {
- }
- } );
- </script>
- </body>
- </html>
|