I'm using WYMeditor with Ruby On Rails. I have very small knowledge of JS and its frameworks, nowadays there are so many of them that it is impossible to know all of them (Prototype, jQuery, Script.aculo.us,...).
I would like to use WYMeditor as I like the WYSIWYM theory and I would like to add feature that can insert an image to the WYMeditor's textarea. The only problem I have is that I can't figure out how to do a simple "onclick" action that inserts some HTML (certainly the <img> tag) to the editor.
Is there someone who could give me a hint how to do that?
I was trying something like this:
- Code: Select all
$j('.wymeditor').html('<p>Hello, World.</p>')
which didn't work for me.