Ticket #121 (closed defect: fixed)
Classes won't apply to images in certain situations
| Reported by: | visual77 | Owned by: | jf.hovinne |
|---|---|---|---|
| Priority: | minor | Milestone: | 0.5 |
| Component: | editor | Version: | trunk |
| Keywords: | Cc: |
Description
I am attempting to place images into a textarea and then apply a custom class to float left or float right. While doing this, I noticed that the classes would stop applying when certain things were done.
Here are the steps that I followed to create the problem, using both methods that caused it
Method 1:
1. Open WYMEditor and type a paragraph of text.
2. Click Edit HTML.
3. At the beginning of the paragraph, right after the <p> tag, add in an <img /> tag with src as the only attribute.
4. Close Edit HTML
5. Click the image
6. Click the custom class
Method 2:
1. Open WYMEditor and type a paragraph of text.
2. Click Insert Image and type in all three values for an image that is on the same domain as WYMEditor, so the path would be "/images/image.jpg", rather than "http://domain.com/images/image.jpg"
3. Click the image.
4. Use Ctrl+X and Ctrl+V to move the image to any spot in the editor.
5. Click the image.
6. Click the custom class.
In method 2, I also noticed that the URL would change drastically. "/images/image.jpg" would become "../../../images/image.jpg".
The only method that reliably implemented the class was this:
1. Open WYMEditor and type a paragraph of text.
2. Click Insert Image and fill in the values.
3. Click the image
4. Click the custom class
It only appeared to break if I moved the image before putting the class or if I added the image manually through HTML.
I've attached the custom CSS file I am using for this.