weikai There's editors like tinymce, ckeditor, etc which can serve this purpose.
AFAIK nobody has wised up and implemented this kind of functionality into any kind of forum. phpbb had something like this, but the plugin is out of date.
Discourse guys are totally against it and very much markdown fanboys.
I wrote a basic blogging engine with ckeditor in 2 days using the inline base64 attachment plugin for seeing inline images as you type, a la wordpress. On the backend, it takes the base64 images uploaded into the text box and uploads them as images to the server, and then when you go back to edit the post, it converts them to base64 images and puts them inline again. It works great, except for the fact that inline base64 images are 33% larger, so uploading them or reloading them into the editor form is slower. To get around that, you need to use a javascript function for rescaling the images to a maximum size first.. or rescale them as the user uploads them.. possibly through php and imagemagick/GD.
Upside to this approach is that you don't have to tap very far into flarum's form processing code.. You also don't need to dynamically patch images in through javascript, which would require some editing of ckeditor's code, i think.
This is kind of the fast and easy way to do it, but not the best way.