E
E
Egor Antropov2019-10-18 07:12:09
opencart
Egor Antropov, 2019-10-18 07:12:09

How to change field type?

35Tjj36ZI_8.jpg
I need something like a text editor (xs what it's called) in the custom field, like on a toaster, or an image selection
How to do this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton R., 2019-10-18
@anton_reut

Add script to head:

<script src='https://cdn.tiny.cloud/1/no-api-key/tinymce/5/tinymce.min.js' referrerpolicy="origin"></script>
  <script>
  tinymce.init({
    selector: '#mytextarea'
  });
  </script>

And then assign a selector to your field to which you want to make an editor:
<form method="post">
    <textarea id="mytextarea" name="mytextarea">Hello, World!</textarea>
  </form>

Brief documentation: https://www.tiny.cloud/docs/quick-start/
BUT! Your form validator will most likely remove all html tags, so you still need to play around with it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question