Angularjs 字体是TextAngular的绝佳选择
我正在使用TextAngular编辑器,但无法理解font awesome是如何打包的!!我不想使用字体真棒,因为我有另一个自定义字体css 谁能告诉我在哪里编辑它,这样我就可以调用我的custom-font.css文件,并做出必要的安排 我使用Angularjs 字体是TextAngular的绝佳选择,angularjs,font-awesome,textangular,Angularjs,Font Awesome,Textangular,我正在使用TextAngular编辑器,但无法理解font awesome是如何打包的!!我不想使用字体真棒,因为我有另一个自定义字体css 谁能告诉我在哪里编辑它,这样我就可以调用我的custom-font.css文件,并做出必要的安排 我使用 <span class="icon icon-bold"></span> 而不是 <i class="fa fa-bold"></i> 我推荐两件事中的一件- 1-分叉/分支te
<span class="icon icon-bold"></span>
而不是
<i class="fa fa-bold"></i>
我推荐两件事中的一件- 1-分叉/分支textangular的存储库并对此文件进行更改 如果您进行搜索,您将在那里看到您要更改的html(搜索“fa-”,我能告诉您的是,图标的所有html都在那里。您只需用自己的代码替换fa代码,就像您在问题中用
图标粗体
它们位于iconClass
下,因此从源代码中随机抽取一个,您可以更改该部分,请参见此处:
taRegisterTool('insertImage', {
iconclass: 'fa fa-picture-o', <<< change this to what you want
taRegisterTool('insertImage'{
iconclass:'fa-picture-o',你可以将它放在angular应用程序的配置中,并更改内容(其中包括图标),如下所示:
.config("$provide",function($provide) {
// this demonstrates how to register a new tool and add it to the default toolbar
$provide.decorator('taOptions',
[
'$delegate', function(taOptions) {
// $delegate is the taOptions we are decorating
// here we override the default toolbars and classes specified in taOptions.
taOptions.forceTextAngularSanitize =
true; // set false to allow the textAngular-sanitize provider to be replaced
taOptions.keyMappings =
[]; // allow customizable keyMappings for specialized key boards or languages
taOptions.toolbar = [
['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p', 'pre', 'quote'],
['bold', 'italics', 'underline', 'ul', 'ol', 'redo', 'undo', 'clear'],
['justifyLeft', 'justifyCenter', 'justifyRight', 'justifyFull'],
['html', 'insertImage', 'insertLink']
];
taOptions.classes = {
focussed: 'focussed',
toolbar: 'md-toolbar',
toolbarGroup: 'span',
toolbarButton: 'md-button md-raised hh-small-button',
toolbarButtonActive: 'active',
disabled: 'disabled',
textEditor: 'form-control',
htmlEditor: 'form-control'
};
return taOptions; // whatever you return will be the taOptions
}
]);
// this demonstrates changing the classes of the icons for the tools for font-awesome v3.x
$provide.decorator('taTools',
[
'$delegate', function(taTools) {
taTools.bold.iconclass = 'material-icons';
taTools.italics.iconclass = 'icon-italic';
taTools.underline.iconclass = 'icon-underline';
taTools.ul.iconclass = 'icon-list-ul';
taTools.ol.iconclass = 'icon-list-ol';
taTools.undo.iconclass = 'icon-undo';
taTools.redo.iconclass = 'icon-repeat';
taTools.justifyLeft.iconclass = 'icon-align-left';
taTools.justifyRight.iconclass = 'icon-align-right';
taTools.justifyCenter.iconclass = 'icon-align-center';
taTools.clear.iconclass = 'icon-ban-circle';
taTools.insertLink.iconclass = 'icon-link';
taTools.insertImage.iconclass = 'icon-picture';
// there is no quote icon in old font-awesome so we change to text as follows
delete taTools.quote.iconclass;
taTools.quote.buttontext = 'quote';
return taTools;
}
]);
}
然后我假设,一旦完成,我必须将textAngularSetup.js编译成textAngular.min.js?谢谢:)@user3362364是的,如果你拉他们的repo并安装grunt/gulp或npm或他们使用的任何东西,他们可能有一个构建过程