Hi
I've wanted to use wymeditor for a long time in projects at work, luckily I am now in a position to say we're going to use it - personally though i really think that things like support for divs would make a huge difference and get more people using this very cool project.
I've written a custom file / image browser to insert a block of html into the editor using the
wym.insert() function. The actual browser part works fine but there are a few issues I'd like to try and resolve concerning what happens when I get the div in.
An example of the code that I would paste in would be something like this:
- Code: Select all
<div class="image-left"><img src="/upload/filename/upload.0.crrj.jpg" alt="Bay West" title="Bay West" width="85" height="42" /></div>
(This is a just an example, but it is equally valid for things like multiple column layouts or inserting wrapper elemenst for things like embeded flash. For the image example I
could wrap the image in a <p> and apply a class to that - meaning i can float the image accross multiple other block elements... but I would much prefer to use divs as containers.)
Anyway I've got two problems which I'd really appreciate it if somebody could help me with:
1. As
sehmaschine wrote:Post by sehmaschine on Tue Dec 02, 2008 11:37 am
I´ve tried this, but it´s not working: if I insert a DIV with a P inside, I´m stuck inside that DIV - there´s not way to insert something below that DIV. moreover, I´m not able to change the class of the DIV.
- is there a solution to being stuck inside the div?
I suppose that I could just make sure that I insert an empty <p> </p> after any div I insert to avoid this problem, but it seems a bit hacky!
2. I can't seem to change classes of the div's inserted - I'm guessing that this is something to do with the
containersItems variable ? I was looking at this post
http://forum.wymeditor.org/forum/viewtopic.php?f=2&t=469&p=1776&hilit=containerThanks in advance.