Sha256: f68abefae4fed493f348e8c1f652734fd336589d2923a445bd79d73ac8695dfb

Contents?: true

Size: 1.67 KB

Versions: 16

Compression:

Stored size: 1.67 KB

Contents

<script type="text/javascript" src="/js/tinymce/tinymce.min.js"></script>
<script type="text/javascript" src="/js/tinymce/jquery.tinymce.min.js"></script>


:javascript
    tinymce.init({
      selector: "textarea.editor",
      plugins: [
              "advlist autolink lists link image charmap print preview anchor",
              "searchreplace visualblocks code fullscreen",
              "insertdatetime media table contextmenu paste"
      ],
      toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image myblock",
      file_browser_callback : elFinderBrowser,
      relative_urls: false,
      content_css : "#{asset_path('optimacms/tinymce.css')}",
      protect2: [
              /\<\/?(if|endif)\>/g, // Protect <if> & </endif>
              /\<xsl\:[^>]+\>/g, // Protect <xsl:...>
              /<\?php.*?\?>/g // Protect php code
          ],
      setup: function(editor) {
          editor.addButton('myblock', {
              title: 'block',
              image: '/images/tinymce/icon_block2.png',
              onclick: function() {
                editor.insertContent('#{tinymce_editor_insert_block}');
              }

          });
      }


    });

    function elFinderBrowser (field_name, url, type, win) {
        tinymce.activeEditor.windowManager.open({
          file: '/elfinder_manager',// use an absolute path!
          title: 'elFinder 2.0',
          width: 900,
          height: 650,
          resizable: 'yes'
        }, {
          setUrl: function (url) {
            win.document.getElementById(field_name).value = url;
          }
        });
        return false;
    }

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
optimacms-0.3.9 app/views/optimacms/admin/common/_js_tinymce.html.haml
optimacms-0.3.8 app/views/optimacms/admin/common/_js_tinymce.html.haml
optimacms-0.3.7 app/views/optimacms/admin/common/_js_tinymce.html.haml
optimacms-0.3.6 app/views/optimacms/admin/common/_js_tinymce.html.haml
optimacms-0.3.5 app/views/optimacms/admin/common/_js_tinymce.html.haml
optimacms-0.3.2 app/views/optimacms/admin/common/_js_tinymce.html.haml
optimacms-0.3.1 app/views/optimacms/admin/common/_js_tinymce.html.haml
optimacms-0.2.23 app/views/optimacms/admin/common/_js_tinymce.html.haml
optimacms-0.2.22 app/views/optimacms/admin/common/_js_tinymce.html.haml
optimacms-0.2.19 app/views/optimacms/admin/common/_js_tinymce.html.haml
optimacms-0.2.18 app/views/optimacms/admin/common/_js_tinymce.html.haml
optimacms-0.2.17 app/views/optimacms/admin/common/_js_tinymce.html.haml
optimacms-0.2.8 app/views/optimacms/admin/common/_js_tinymce.html.haml
optimacms-0.2.7 app/views/optimacms/admin/common/_js_tinymce.html.haml
optimacms-0.2.6 app/views/optimacms/admin/common/_js_tinymce.html.haml
optimacms-0.2.5 app/views/optimacms/admin/common/_js_tinymce.html.haml