Skip to content
Browse files

Content fields use TinyMCE

  • Loading branch information...
1 parent 588e51d commit bb3ff3dbd60bb24650d1fc2d07a5e3e41065c381 @DHS committed May 29, 2012
Showing with 18 additions and 4 deletions.
  1. +13 −0 js/plugins.js
  2. +4 −3 themes/default/partials/footer.html
  3. +1 −1 themes/default/partials/item_add.html
View
13 js/plugins.js
@@ -4,3 +4,16 @@ window.log = function f(){ log.history = log.history || []; log.history.push(arg
// Pretty dates
$('span').humaneDates({'lowercase': true});
+
+// TinyMCE
+setTimeout ( function() {
+ tinyMCE.init({
+ mode: "textareas",
+ theme: "advanced",
+ theme_advanced_buttons1: "bold,italic,underline,|,bullist,numlist,|,blockquote,|,link,unlink,|,code",
+ theme_advanced_buttons2: "",
+ theme_advanced_buttons3: "",
+ theme_advanced_toolbar_location: "top",
+ theme_advanced_resizing: true
+ });
+}, 500);
View
7 themes/default/partials/footer.html
@@ -21,12 +21,13 @@
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="{{ app.config.base_dir }}js/libs/jquery-1.7.1.min.js"><\/script>')</script>
- <script src="{{ app.config.base_dir }}js/libs/humane.js"></script>
- <script src="{{ app.config.base_dir }}js/plugins.js"></script>
<script src="{{ app.config.base_dir }}js/rat.js"></script>
<script src="{{ app.config.base_dir }}js/libs/bootstrap-dropdown.js"></script>
- <script src="{{ app.config.base_dir }}js/libs/bootstrap-modal.js"></script>
<script src="{{ app.config.base_dir }}js/libs/bootstrap-alert.js"></script>
+ <script src="{{ app.config.base_dir }}js/libs/tiny_mce/tiny_mce.js"></script>
+ <script src="{{ app.config.base_dir }}js/libs/humane.js"></script>
+ <script src="{{ app.config.base_dir }}js/plugins.js"></script>
+
{% if app.plugins.analytics %}
{{ app.plugins.analytics.view() }}
View
2 themes/default/partials/item_add.html
@@ -19,7 +19,7 @@
<div class="control-group">
<label class="control-label" for="content">{{ app.config.items.content.name }}</label>
<div class="controls">
- <textarea name="content" id="content" rows="5" cols="50">{{ app.uri.params.content }}</textarea>
+ <textarea name="content" id="wysiwyg" rows="5" cols="50">{{ app.uri.params.content }}</textarea>
</div>
</div>
{% endif %}

0 comments on commit bb3ff3d

Please sign in to comment.
Something went wrong with that request. Please try again.