Demo:
Cách làm:
B1: Vào ACP --> Modules --> JavaScript codes management
Tạo 1 script mới
Tên : Là lá la 123 ( gì cũng được )
Placement : In all the pages
Paste đoạn code phía dưới:
Lưu Ý: Để add thêm font vào thì dùng mẫu code này nhé
Chỉ add thêm được những font mà có sẵn trong máy tính thôi nhé =)) , ai không có thì không thấy đâu
Nguồn: http://fmdesign.forumotion.com/t220-add-more-font-choices-to-the-editor
Cách làm:
B1: Vào ACP --> Modules --> JavaScript codes management
Tạo 1 script mới
Tên : Là lá la 123 ( gì cũng được )
Placement : In all the pages
Paste đoạn code phía dưới:
- Code:
$(function(){$(function() {
$('.sceditor-button-font').click(function() {
addFont('Calibri');
addFont('Papyrus');
addFont('Avantgarde');
$('.sceditor-font-option.new-font').click(function(e){$('#text_editor_textarea').sceditor('instance').insertText('[font='+$(this).attr('data-font')+']','[/font]');$('.sceditor-font-picker').remove();e.preventDefault()})
});
function addFont(font){$('.sceditor-font-picker div').append('<a unselectable="on" class="sceditor-font-option new-font" href="#" data-font="'+font+'"><font unselectable="on" face="'+font+'">'+font+'</font></a>')}
})});
Lưu Ý: Để add thêm font vào thì dùng mẫu code này nhé
- Code:
addFont('FONT-NAME');
Chỉ add thêm được những font mà có sẵn trong máy tính thôi nhé =)) , ai không có thì không thấy đâu
+++Bonus+++
Nếu mà thanh chọn Font quá dài thì dùng đoạn css này nhé :) - Code:
.sceditor-font-picker {
height:250px;
width:150px;
overflow-y:auto;
}
Nguồn: http://fmdesign.forumotion.com/t220-add-more-font-choices-to-the-editor