Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Some Toolbar Buttons are missing in Froala wysiwyg Editor

Full Froala wysiwyg Editor looks like this: enter image description here

But after adding the API in my project, Some of the Toolbar buttons are missing. The snap is shown below.

enter image description here

As seen from the above, most of the toolbar buttons are missing from my editor, like- color, paragraph formatting etc.

I have included the following libraries:

<link rel="stylesheet"
    href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" />
<link href='https://cdnjs.cloudflare.com/ajax/libs/froala-editor/2.7.1/css/froala_editor.min.css' rel='stylesheet' type='text/css' />
<link href='https://cdnjs.cloudflare.com/ajax/libs/froala-editor/2.7.1/css/froala_style.min.css' rel='stylesheet' type='text/css' />
<script type='text/javascript' src='https://cdnjs.cloudflare.com/ajax/libs/froala-editor/2.7.1/js/froala_editor.min.js'></script>

And using the following setting for editor:

<script>
        $(document).ready(function() {$('.editable-question').froalaEditor({
            initOnClick: true,
              charCounterCount: false,
        });
        });
    </script>

I have tried explicitly mentioning toolbarButtons array, also tried toolbarButtonsXS, toolbarButtonsMD etc for screen size option. Still no result. What am I missing?

Update: Using $('.editable-question').froalaEditor(); only has the same result.

like image 962
Deb Avatar asked Oct 26 '17 18:10

Deb


People also ask

Is Froala Editor good?

It is one of the few rich text editors around with a modern design and Retina Ready which makes it a really eye-catching editor. By carefully analyzing the latest web design trends and Froala Labs crafted a nice flat user interface that will fit in any web page and the users will just love it.

How do I remove powered by Froala editor?

In version 3, we added in UI a Powered By Froala text and it can be removed when using a correct activation key by turning off the following option: https://www.froala.com/wysiwyg-editor/docs/options#attribution. Have more questions? Submit a request.

How do I use Froala license key?

Once you purchase a license, you can request license keys from [email protected] or use the keys sent to the email used at the time of purchase. To activate the license, pass the generated activation key as an option when initializing the editor.

Is Froala a wysiwyg?

Froala is 2022's best WYSIWYG HTML editor. It equips your web applications with rich text editing capabilities.


2 Answers

If you are doing this is angular, it wasn't working for me by including the plugin JS in the angular.json file. Sticking it at the top of the main.ts file like so:

import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';

import 'hammerjs';
import 'froala-editor/js/plugins/fullscreen.min.js';
import 'froala-editor/js/plugins/code_view.min.js';

import { AppModule } from './app/app.module';
import { environment } from './environments/environment';

export function getBaseUrl() {
  return document.getElementsByTagName('base')[0].href;
}

const providers = [
  { provide: 'BASE_URL', useFactory: getBaseUrl, deps: [] }
];

if (environment.production) {
  enableProdMode();
}

platformBrowserDynamic(providers).bootstrapModule(AppModule)
  .catch(err => console.log(err));

Worked for me.

like image 63
Derek J. Avatar answered Sep 28 '22 03:09

Derek J.


Some buttons for the Froala editor require separate plugins, for which the files must be included manually.

https://www.froala.com/wysiwyg-editor/docs/options#toolbarButtons

<script src="../js/plugins/lists.min.js"></script>
like image 42
Seano666 Avatar answered Sep 28 '22 04:09

Seano666