.toolbar-tabs {
height: 21px;
-/* z-index: 1000;*/
-/* overflow: hidden;*/
}
.toolbar-tabs li:hover, .toolbar-tabs li.active {
cursor: default;
}
+.change-font-size {
+ width: 45px;
+ height: 18px;
+ padding: 3px 0 0;
+ position: absolute;
+ top: 0;
+ right: 0;
+}
+
+.change-font-size div {
+ float: left;
+ text-align: center;
+ width: 20px;
+ font-size: 13px;
+ margin: 1px;
+ cursor: default;
+ border-radius: 2px;
+ -moz-border-radius: 2px;
+ -webkit-border-radius: 2px;
+}
+
+.change-font-size div:hover {
+ background-color: #EEE;
+ border: 1px solid #AAA;
+ margin: 0;
+}
+
/* =========================== */
/* = DublinCore Editor panel = */
/* =========================== */
{% load toolbar_tags %}
{% toolbar %}
+<div class="change-font-size" style="">
+ <div class="decrease-font-size">A<sup>-</sup></div>
+ <div class="increase-font-size">A<sup>+</sup></div>
+</div>
<div class="iframe-container" style="position: absolute; top: 48px; left:0px; right:0px; bottom: 0px;">
<textarea name="text">{{ text }}</textarea>
</div>
}
});
+ $('.decrease-font-size', panel).click(function() {
+ var frameBody = $('body', $(texteditor.frame).contents());
+ console.log(frameBody.css('font-size'));
+ frameBody.css('font-size', parseInt(frameBody.css('font-size')) - 2);
+ });
+
+ $('.increase-font-size', panel).click(function() {
+ var frameBody = $('body', $(texteditor.frame).contents());
+ console.log(frameBody.css('font-size'));
+ frameBody.css('font-size', parseInt(frameBody.css('font-size')) + 2);
+ });
+
this.texteditor = texteditor;
},