diff --git a/public/assets/kindeditor/kindeditor.js b/public/assets/kindeditor/kindeditor.js
index 5f1063f0b..aadb295f4 100644
--- a/public/assets/kindeditor/kindeditor.js
+++ b/public/assets/kindeditor/kindeditor.js
@@ -277,7 +277,7 @@ K.options = {
['#337FE5', '#003399', '#4C33E5', '#9933E5', '#CC33E5', '#EE33EE'],
['#FFFFFF', '#CCCCCC', '#999999', '#666666', '#333333', '#000000']
],
- fontSizeTable : ['9px', '10px', '12px', '14px', '16px', '18px', '24px', '32px'],
+ fontSizeTable : ['选中的字体大小:','9px', '10px', '12px', '14px', '16px', '18px', '24px', '32px'],
htmlTags : {
font : ['id', 'class', 'color', 'size', 'face', '.background-color'],
span : [
@@ -5737,20 +5737,45 @@ _plugin('core', function(K) {
});
});
self.clickToolbar('fontsize', function() {
+ // knode = self.getSelectedAnchor();
+
+ //console.log(self.cmd.range.startContainer.parentElement.style.fontSize)
var curVal = self.cmd.val('fontsize'),
menu = self.createMenu({
name : 'fontsize',
width : 150
});
_each(self.fontSizeTable, function(i, val) {
- menu.addItem({
- title : '' + val + '',
- height : _removeUnit(val) + 12,
- checked : curVal === val,
- click : function() {
- self.exec('fontsize', val).hideMenu();
- }
- });
+ if (i==0){
+ fontsize = "14px"
+ if(self.cmd.range.startContainer.parentElement.style.fontSize) {
+ fontsize = self.cmd.range.startContainer.parentElement.style.fontSize
+ menu.addItem({
+ title: '首个选中字体:' + fontsize + '',
+ height: 14,
+ click: function () {
+ }
+ });
+ }else {
+ menu.addItem({
+ title: '当前为默认字体:' + fontsize + '',
+ height: 14,
+ click: function () {
+ }
+ });
+ }
+ }else {
+ menu.addItem({
+ title: '' + val + '',
+ height: _removeUnit(val) + 12,
+ checked: curVal === val,
+ click: function () {
+ self.exec('fontsize', val).hideMenu();
+
+ }
+ });
+ }
+
});
});
_each('forecolor,hilitecolor'.split(','), function(i, name) {