Hello, I'm going to make a form and I do not know how to do it to include an image inside the text area, something like that.
TEXT
IMAGE
TEXT
Something of a kind for the include user to know? As it is done here in stack overflow, for questions.
What you want to do is resolved with WYSIWYG editors ( What You See Is What You Get ). A simple example of these editors is TinyMCE . To use it:
To use it on the page, you can download the library directly from the site. Here I will use the version in the cloud for example purposes. Add the tinymce.min.js
JavaScript file, stating your API key:
<script src="https://cloud.tinymce.com/stable/tinymce.min.js?apiKey=your_API_key"></script>
andcreatethetextarea
elementthatyouwanttosetaseditor.InyourJavaScriptfile,addthecodesnippetthatinitializestheeditor:
tinymce.init({selector:'textarea'});
Aboutusingimagesintheeditor,youcanreadthe File & Image Upload .
See the example below (not working as it is running on the Snippet):
tinymce.init({ selector:'textarea' });
<script src="https://cloud.tinymce.com/stable/tinymce.min.js?apiKey=API_KEY"></script><textarea>Seueditordetexto</textarea>
Othersimilareditors: