2
0
mirror of https://github.com/Ionaru/easy-markdown-editor synced 2025-06-30 06:31:01 -06:00

Title attributes added to toolbar buttons

This commit is contained in:
Wes Cossick 2015-07-14 00:40:36 -05:00
parent 1c1f3fdecd
commit c089fc5753

View File

@ -41,6 +41,9 @@ function createIcon(name, options) {
} }
} }
if(options.title)
el.title = options.title;
el.className = options.className || 'icon-' + name; el.className = options.className || 'icon-' + name;
return el; return el;
} }
@ -393,46 +396,54 @@ function wordCount(data) {
var toolbar = [{ var toolbar = [{
name: 'bold', name: 'bold',
action: toggleBold, action: toggleBold,
className: "fa fa-bold" className: "fa fa-bold",
}, { title: "Bold",
},
{
name: 'italic', name: 'italic',
action: toggleItalic, action: toggleItalic,
className: "fa fa-italic" className: "fa fa-italic",
title: "Italic",
}, },
'|', '|',
{ {
name: 'quote', name: 'quote',
action: toggleBlockquote, action: toggleBlockquote,
className: "fa fa-quote-left" className: "fa fa-quote-left",
}, { title: "Quote",
},
{
name: 'unordered-list', name: 'unordered-list',
action: toggleUnOrderedList, action: toggleUnOrderedList,
className: "fa fa-list-ul" className: "fa fa-list-ul",
}, { title: "Generic List",
},
{
name: 'ordered-list', name: 'ordered-list',
action: toggleOrderedList, action: toggleOrderedList,
className: "fa fa-list-ol" className: "fa fa-list-ol",
title: "Numbered List",
}, },
'|', '|',
{ {
name: 'link', name: 'link',
action: drawLink, action: drawLink,
className: "fa fa-link" className: "fa fa-link",
}, { title: "Create Link",
},
{
name: 'image', name: 'image',
action: drawImage, action: drawImage,
className: "fa fa-picture-o" className: "fa fa-picture-o",
title: "Insert Image",
}, },
'|', '|',
{ {
name: 'preview', name: 'preview',
action: togglePreview, action: togglePreview,
className: "fa fa-eye" className: "fa fa-eye",
}, title: "Toggle Preview",
]; }];
/** /**
* Interface of SimpleMDE. * Interface of SimpleMDE.