5
I’m using the plugin Froala in a textarea
, in this way:
<textarea name="fDescription" class="form-control" rows="4"></textarea>
And then activating the plugin with jQuery:
$(document).ready(function () {
$('textarea').froalaEditor({
placeholderText: 'Digite os detalhes…',
language: 'pt_br',
pluginsEnabled: ['align', 'charCounter', 'codeBeautifier', 'codeView', 'colors', 'entities', 'fontFamily', 'fontSize', 'inlineStyle', 'lineBreaker', 'link', 'lists', 'paragraphFormat', 'paragraphStyle', 'fullscreen', 'image','quote', 'table', 'url', 'video'],
toolbarButtons: ['bold', 'italic', 'underline', 'strikeThrough', 'fontFamily', 'fontSize', 'color', 'undo', 'redo', 'clearFormatting', '|', 'paragraphFormat', 'quote', 'align', 'formatOL', 'formatUL', 'outdent', 'indent', 'subscript', 'superscript', '|', 'insertLink', 'insertTable', 'fullscreen', 'html'],
charCounterMax: -1,
});
});
Almost everything works as I want, entertained when I click the button Code View, even the text in code format is shown, but it is not highlighting the elements with the color, as shown in official website (click on the button Code View to see).
Could you help me fix this so it’s enhanced with colors by clicking the button?
This is my CSS import order:
<link href="assets/css/bootstrap.min.css" rel="stylesheet" type="text/css">
<link href="assets/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<link href="assets/css/froala_style.min.css" rel="stylesheet" type="text/css">
<link href="assets/css/froala_editor.pkgd.min.css" rel="stylesheet" type="text/css">
<link href="assets/css/froala_editor.min.css" rel="stylesheet" type="text/css">
and the Javascript files:
<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/popper.min.js"></script>
<script src="assets/js/bootstrap.min.js"></script>
<script src="assets/js/froala_editor.min.js"></script>
<script src="assets/js/froala_editor.pkgd.min.js"></script>
<script src="assets/js/froala_lang.min.js"></script>
You can help me?
Apparently in this example, website link, there is no color enhancement. Maybe you could integrate the froala editing features, with the enhancement capability of the Highlight.js
– Juven_v