How to make Highlighting syntax work in Wysiwig Froala?

Asked

Viewed 70 times

1

I have a structure:

<div class="form-group">
            <label>Descrição</label>
            <textarea class="form-control" rows="3"></textarea>
            <small class="form-text text-muted">Somente informações verídicas e que possam ser comprovadas, sem
                especulações.
            </small>
        </div>

To which is the description textarea/news details. I added some Javascript and CSS dependencies:

<link href="assets/css/froala_style.min.css" rel="stylesheet" type="text/css">
<link href="assets/css/froala_editor.min.css" rel="stylesheet" type="text/css">

and

<script src="assets/js/froala_editor.min.js"></script>
<script src="assets/js/froala_lang.js"></script> //linguagem em pt-br

And now I want to make the code display button https://www.froala.com/wysiwyg-editor which is the link view code button shown. How can I do that?

I also tried to add:

<link href="assets/css/editor-plugins/code_view.min.css" rel="stylesheet" type="text/css">
<link href="assets/css/editor-plugins/code_mirror.min.css" rel="stylesheet" type="text/css">

and

<script src="assets/js/editor-plugins/code_beautifier.min.js"></script>
<script src="assets/js/editor-plugins/code_view.min.js"></script>
<script src="assets/js/editor-plugins/code_mirror.min.js"></script>

It even shows the code but is not highlighting anything. Is there any other requirement? Can you please help me?

Note: I don’t want to insert froala_editor.pkgd.min.js because it loads everything. And I won’t use and I don’t want to load what I won’t use.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.