liquid_feedback_frontend

diff static/wysihtml/example.html @ 1309:32cc544d5a5b

Cumulative patch for upcoming frontend version 4
author bsw/jbe
date Sun Jul 15 14:07:29 2018 +0200 (2018-07-15)
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/static/wysihtml/example.html	Sun Jul 15 14:07:29 2018 +0200
     1.3 @@ -0,0 +1,183 @@
     1.4 +<!DOCTYPE html>
     1.5 +
     1.6 +<meta http-equiv="X-UA-Compatible" content="IE=Edge">
     1.7 +<meta charset="utf-8">
     1.8 +
     1.9 +<title>wysihtml - Advanced Demo</title>
    1.10 +
    1.11 +<style>
    1.12 +  body {
    1.13 +    font-family: Verdana;
    1.14 +    font-size: 11px;
    1.15 +  }
    1.16 +  
    1.17 +  h2 {
    1.18 +    margin-bottom: 0;
    1.19 +  }
    1.20 +  
    1.21 +  small {
    1.22 +    display: block;
    1.23 +    margin-top: 40px;
    1.24 +    font-size: 9px;
    1.25 +  }
    1.26 +  
    1.27 +  small,
    1.28 +  small a {
    1.29 +    color: #666;
    1.30 +  }
    1.31 +  
    1.32 +  a {
    1.33 +    color: #000;
    1.34 +    text-decoration: underline;
    1.35 +    cursor: pointer;
    1.36 +  }
    1.37 +  
    1.38 +  #toolbar [data-wysihtml-action] {
    1.39 +    float: right;
    1.40 +  }
    1.41 +  
    1.42 +  #toolbar,
    1.43 +  textarea {
    1.44 +    width: 920px;
    1.45 +    padding: 5px;
    1.46 +    -webkit-box-sizing: border-box;
    1.47 +    -ms-box-sizing: border-box;
    1.48 +    -moz-box-sizing: border-box;
    1.49 +    box-sizing: border-box;
    1.50 +  }
    1.51 +  
    1.52 +  textarea {
    1.53 +    height: 280px;
    1.54 +    border: 2px solid green;
    1.55 +    font-family: Verdana;
    1.56 +    font-size: 11px;
    1.57 +  }
    1.58 +  
    1.59 +  textarea:focus {
    1.60 +    color: black;
    1.61 +    border: 2px solid black;
    1.62 +  }
    1.63 +  
    1.64 +  .wysihtml-command-active {
    1.65 +    font-weight: bold;
    1.66 +  }
    1.67 +  
    1.68 +  [data-wysihtml-dialog] {
    1.69 +    margin: 5px 0 0;
    1.70 +    padding: 5px;
    1.71 +    border: 1px solid #666;
    1.72 +  }
    1.73 +  
    1.74 +  a[data-wysihtml-command-value="red"] {
    1.75 +    color: red;
    1.76 +  }
    1.77 +  
    1.78 +  a[data-wysihtml-command-value="green"] {
    1.79 +    color: green;
    1.80 +  }
    1.81 +  
    1.82 +  a[data-wysihtml-command-value="blue"] {
    1.83 +    color: blue;
    1.84 +  }
    1.85 +  
    1.86 +  div.editable {
    1.87 +    border: 1px dashed gray;
    1.88 +    padding: 10px;
    1.89 +  }
    1.90 +</style>
    1.91 +
    1.92 +<h1>wysihtml - Advanced Editor Example</h1>
    1.93 +
    1.94 +<h2>Example of editor with iframe wrapper and as textarea replacement</h2>
    1.95 +<br>
    1.96 +<form class="ewrapper">
    1.97 +  <div class="toolbar" style="display: none;">
    1.98 +    <a data-wysihtml-command="bold" title="CTRL+B">bold</a> |
    1.99 +    <a data-wysihtml-command="italic" title="CTRL+I">italic</a> |
   1.100 +    <a data-wysihtml-command="superscript" title="sup">superscript</a> |
   1.101 +    <a data-wysihtml-command="subscript" title="sub">subscript</a> |
   1.102 +    <a data-wysihtml-command="createLink">link</a> |
   1.103 +    <a data-wysihtml-command="removeLink"><s>link</s></a> |
   1.104 +    <a data-wysihtml-command="formatBlock" data-wysihtml-command-value="h1">h1</a> |
   1.105 +    <a data-wysihtml-command="formatBlock" data-wysihtml-command-value="h2">h2</a> |
   1.106 +    <a data-wysihtml-command="formatBlock" data-wysihtml-command-blank-value="true">plaintext</a> |
   1.107 +    <a data-wysihtml-command="insertUnorderedList">insertUnorderedList</a> |
   1.108 +    <a data-wysihtml-command="insertOrderedList">insertOrderedList</a> |
   1.109 +    <a data-wysihtml-command="formatCode" data-wysihtml-command-value="language-html">Code</a> |
   1.110 +    <a data-wysihtml-command="undo">undo</a> |
   1.111 +    <a data-wysihtml-command="redo">redo</a> |
   1.112 +    <a data-wysihtml-command="insertSpeech">speech</a>
   1.113 +    <a data-wysihtml-action="change_view">switch to html view</a>
   1.114 +    
   1.115 +    <div data-wysihtml-dialog="createLink" style="display: none;">
   1.116 +      <label>
   1.117 +        Link:
   1.118 +        <input data-wysihtml-dialog-field="href" value="http://">
   1.119 +      </label>
   1.120 +      <a data-wysihtml-dialog-action="save">OK</a>&nbsp;<a data-wysihtml-dialog-action="cancel">Cancel</a>
   1.121 +    </div>
   1.122 +    
   1.123 +  </div>
   1.124 +  <br>
   1.125 +  <textarea class="editable" placeholder="Enter text ..."></textarea>
   1.126 +  <br><input type="reset" value="Reset form!">
   1.127 +</form>
   1.128 +
   1.129 +<br/><br><h2>Example of editor without iframe wrapper</h2><br/>
   1.130 +<form class="ewrapper">
   1.131 +  <div class="toolbar" style="display: none;">
   1.132 +    <a data-wysihtml-command="bold" title="CTRL+B">bold</a> |
   1.133 +    <a data-wysihtml-command="italic" title="CTRL+I">italic</a> |
   1.134 +    <a data-wysihtml-command="createLink">link</a> |
   1.135 +    <a data-wysihtml-command="removeLink"><s>link</s></a> |
   1.136 +    <a data-wysihtml-command="formatBlock" data-wysihtml-command-value="h1">h1</a> |
   1.137 +    <a data-wysihtml-command="formatBlock" data-wysihtml-command-value="h2">h2</a> |
   1.138 +    <a data-wysihtml-command="formatBlock" data-wysihtml-command-blank-value="true">plaintext</a> |
   1.139 +    <a data-wysihtml-command="insertUnorderedList">insertUnorderedList</a> |
   1.140 +    <a data-wysihtml-command="insertOrderedList">insertOrderedList</a> |
   1.141 +    <a data-wysihtml-command="undo">undo</a> |
   1.142 +    <a data-wysihtml-command="redo">redo</a> |
   1.143 +    <a data-wysihtml-command="insertSpeech">speech</a>
   1.144 +    <a data-wysihtml-action="change_view">switch to html view</a>
   1.145 +    
   1.146 +    <div data-wysihtml-dialog="createLink" style="display: none;">
   1.147 +      <label>
   1.148 +        Link:
   1.149 +        <input data-wysihtml-dialog-field="href" value="http://">
   1.150 +      </label>
   1.151 +      <a data-wysihtml-dialog-action="save">OK</a>&nbsp;<a data-wysihtml-dialog-action="cancel">Cancel</a>
   1.152 +    </div>
   1.153 +    
   1.154 +  </div>
   1.155 +  <br>
   1.156 +  <div class="editable" data-placeholder="Enter text ..."></div>
   1.157 +  <br><input type="reset" value="Reset form!">
   1.158 +</form>
   1.159 +
   1.160 +<h2>Events:</h2>
   1.161 +<div id="log"></div>
   1.162 +
   1.163 +<small>powered by <a href="https://github.com/Voog/wysihtml" target="_blank">wysihtml</a>.</small>
   1.164 +
   1.165 +<script src="jquery.1.10.2.js"></script>
   1.166 +
   1.167 +<script src="wysihtml.js"></script>
   1.168 +<script src="wysihtml.all-commands.js"></script>
   1.169 +<!--<script src="wysihtml.table_editing.js"></script>-->
   1.170 +<script src="wysihtml.toolbar.js"></script>
   1.171 +
   1.172 +<script src="wysihtml_liquidfeedback_rules.js"></script>
   1.173 +
   1.174 +<script>
   1.175 +var editors = [];
   1.176 +  $('.ewrapper').each(function(idx, wrapper) {
   1.177 +    var e = new wysihtml.Editor($(wrapper).find('.editable').get(0), {
   1.178 +      toolbar:        $(wrapper).find('.toolbar').get(0),
   1.179 +      parserRules:    wysihtmlParserRules,
   1.180 +      stylesheets:  "css/stylesheet.css",
   1.181 +      useLineBreaks: true
   1.182 +      //showToolbarAfterInit: false
   1.183 +    });
   1.184 +    editors.push(e);
   1.185 +  });
   1.186 +</script>

Impressum / About Us