[英]froala not showing some toolbar buttons
Froala doesn't want show some buttons (like: video, image, table ...) and I don't now why. Froala 不想显示一些按钮(例如:视频、图像、表格......),我现在不知道为什么。 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.com/jquery-1.9.0.js"></script>
<script src="http://code.jquery.com/jquery-migrate-1.2.1.js"></script>
<script src="bower_components/froala-wysiwyg-editor/js/froala_editor.min.js"></script>
<script src="bower_components/froala-wysiwyg-editor/js/plugins/image.min.js"></script>
<script src="bower_components/froala-wysiwyg-editor/js/plugins/image_manager.min.js"></script>
<script src="bower_components/froala-wysiwyg-editor/js/plugins/video.min.js"></script>
And My client just show Bold and Italic, how can I fix it?我的客户只显示粗体和斜体,我该如何解决?
Froala version 2 requires Font Awesome (as well as jQuery). Froala 版本 2 需要 Font Awesome(以及 jQuery)。 You need to include the font-awesome CSS file, eg through a CDN, to have the buttons in the toolbar visible:您需要包含字体很棒的 CSS 文件,例如通过 CDN,以使工具栏中的按钮可见:
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
To add buttons that require Plugins:添加需要插件的按钮:
1.package.json 1.package.json
"dependencies": {
. . .
"angular-froala-wysiwyg": "4.0.8",
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)添加你的 angular.json(我使用的是 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 4.app.module.ts
<div [froalaEditor]>Hello, Froala!</div>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.