admin管理员组文章数量:1405156
Froala doesn't want show some buttons (like: video, image, table ...) and I don't now why. Maybe I just forget add some script? This My options:
public tb = [
"bold", "italic" , "insertTable","insertImage"];
public options: Object = {
placeholderText: 'Edit Your Content Here!',
toolbarInline: false,
toolbarButtons: this.tb,
toolbarButtonsMD: this.tb,
toolbarButtonsSM: this.tb,
toolbarButtonsXS: this.tb
}
This My scripts:
<script src=".9.0.js"></script>
<script src=".2.1.js"></script>
<script src="bower_ponents/froala-wysiwyg-editor/js/froala_editor.min.js"></script>
<script src="bower_ponents/froala-wysiwyg-editor/js/plugins/image.min.js"></script>
<script src="bower_ponents/froala-wysiwyg-editor/js/plugins/image_manager.min.js"></script>
<script src="bower_ponents/froala-wysiwyg-editor/js/plugins/video.min.js"></script>
And My client just show Bold and Italic, how can I fix it?
Froala doesn't want show some buttons (like: video, image, table ...) and I don't now why. Maybe I just forget add some script? This My options:
public tb = [
"bold", "italic" , "insertTable","insertImage"];
public options: Object = {
placeholderText: 'Edit Your Content Here!',
toolbarInline: false,
toolbarButtons: this.tb,
toolbarButtonsMD: this.tb,
toolbarButtonsSM: this.tb,
toolbarButtonsXS: this.tb
}
This My scripts:
<script src="http://code.jquery./jquery-1.9.0.js"></script>
<script src="http://code.jquery./jquery-migrate-1.2.1.js"></script>
<script src="bower_ponents/froala-wysiwyg-editor/js/froala_editor.min.js"></script>
<script src="bower_ponents/froala-wysiwyg-editor/js/plugins/image.min.js"></script>
<script src="bower_ponents/froala-wysiwyg-editor/js/plugins/image_manager.min.js"></script>
<script src="bower_ponents/froala-wysiwyg-editor/js/plugins/video.min.js"></script>
And My client just show Bold and Italic, how can I fix it?
Share Improve this question edited Jan 20, 2017 at 7:59 ChrisB 2,5852 gold badges26 silver badges44 bronze badges asked Jan 19, 2017 at 16:17 Kirill AchramionokKirill Achramionok 1132 silver badges10 bronze badges3 Answers
Reset to default 1Make sure you also have the css counterparts. Like plugins/image.min.css
Here's the list
To add buttons that require Plugins:
1.package.json
"dependencies": {
. . .
"angular-froala-wysiwyg": "4.0.8",
- Add import of plugins for your button in app.module.ts
For example for fullscreen button:
import 'froala-editor/js/plugins/fullscreen.min.js';
import 'froala-editor/js/plugins/code_view.min.js';
import { FroalaEditorModule, FroalaViewModule } from 'angular-froala-wysiwyg';
@NgModule({
...
imports: [FroalaEditorModule.forRoot(), FroalaViewModule.forRoot() ... ],
...
Add in your angular.json (I am using styles.scss)
"styles": [ "src/styles.scss", "node_modules/froala-editor/css/froala_editor.pkgd.min.css", "node_modules/froala-editor/css/froala_style.min.css" ], "scripts": [ "node_modules/froala-editor/js/froala_editor.pkgd.min.js" ]
4.app.module.ts
<div [froalaEditor]>Hello, Froala!</div>
- You will see a fullscreen button:
Froala version 2 requires Font Awesome (as well as jQuery). You need to include the font-awesome CSS file, e.g. through a CDN, to have the buttons in the toolbar visible:
<link href="https://stackpath.bootstrapcdn./font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
本文标签: javascriptfroala not showing some toolbar buttonsStack Overflow
版权声明:本文标题:javascript - froala not showing some toolbar buttons - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744869432a2629538.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论