Browse Source

feat: remove html do ctrl-v no tinymce de expedientes

pull/3623/head
LeandroJatai 2 years ago
parent
commit
b128f20b1e
  1. 3
      frontend/src/__global/js/tinymce/index.js
  2. 2
      sapl/templates/sessao/expediente.html

3
frontend/src/__global/js/tinymce/index.js

@ -14,12 +14,13 @@ import 'tinymce/plugins/table'
import './langs/pt_BR.js' import './langs/pt_BR.js'
window.tinymce = tinymce window.tinymce = tinymce
window.initTextRichEditor = function (elements, readonly = false) { window.initTextRichEditor = function (elements, readonly = false, paste_as_text = false) {
const configTinymce = { const configTinymce = {
selector: elements === null || elements === undefined ? 'textarea' : elements, selector: elements === null || elements === undefined ? 'textarea' : elements,
language: 'pt_BR', language: 'pt_BR',
branding: false, branding: false,
forced_root_block: 'p', forced_root_block: 'p',
paste_as_text,
plugins: 'table lists advlist link code', plugins: 'table lists advlist link code',
toolbar: 'undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link | code', toolbar: 'undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link | code',
menubar: 'file edit view insert format table' menubar: 'file edit view insert format table'

2
sapl/templates/sessao/expediente.html

@ -49,7 +49,7 @@
{% block extra_js %} {% block extra_js %}
{% if perms|get_add_perm:view %} {% if perms|get_add_perm:view %}
<script language="JavaScript"> <script language="JavaScript">
initTextRichEditor(null); initTextRichEditor(null, false, true);
</script> </script>
<!-- Se nao tiver permissao, o texto rico fica readonly --> <!-- Se nao tiver permissao, o texto rico fica readonly -->
{% else %} {% else %}

Loading…
Cancel
Save