1
Hi, I’m going to make a form and I don’t know how to include an image within the text area, something like that.
TEXT
IMAGE
TEXT
Something to include user know? How is done here in stack overflow, for questions.
1
Hi, I’m going to make a form and I don’t know how to include an image within the text area, something like that.
TEXT
IMAGE
TEXT
Something to include user know? How is done here in stack overflow, for questions.
4
What you want to do is resolved with WYSIWYG editors (What You See Is What You Get). A simple example of these editors is the Tinymce. To use it:
To use it on the page, you can download the library directly from the site. Here I will use the cloud version for example. Add the Javascript file tinymce.min.js
, informing your API key:
<script src="https://cloud.tinymce.com/stable/tinymce.min.js?apiKey=your_API_key"></script>
and create the element textarea
you want to configure as editor. In your Javascript file, add the code snippet that initializes the editor:
tinymce.init({ selector:'textarea' });
About using images in the editor, you can read the documentation File & Image Upload.
See the example below (not functional as it is running on Snippet):
tinymce.init({ selector:'textarea' });
<script src="https://cloud.tinymce.com/stable/tinymce.min.js?apiKey=API_KEY"></script>
<textarea>Seu editor de texto</textarea>
Other similar editors:
Browser other questions tagged html css twitter-bootstrap ruby-on-rails ruby
You are not signed in. Login or sign up in order to post.
did not understand, would have an example with image?
– Lennon S. Bueno
something like it’s here to ask.
– Elis Bresciani
I wanted the user to be able to include an image anywhere, and be able to right after continuing writing. Like, he explains something, and he puts an image to illustrate it, and he keeps writing down.
– Elis Bresciani
One option is to use a WYSIWYG editor, such as Tinymce.
– Woss
That’s what I wanted, thank you very much!!!!
– Elis Bresciani
You might also like a div contenteditable https://stackoverflow.com/questions/30279671/how-to-pass-an-image-into-a-html-textarea
– user60252
@Andersoncarloswoss, answer the question with that answer.
– Arthur Felipe
Use the CK editor text editor plugin. http://ckeditor.com/
– André Sites
Nicedit: http://nicedit.com very simple to use, I used this, met my needs.
– MAKOTSUAMI