Opened 16 years ago
Closed 16 years ago
#6862 closed defect (bug) (fixed)
Image Alignment Changes when Author Saves
Reported by: | scvbruce | Owned by: | azaozz |
---|---|---|---|
Milestone: | 2.7 | Priority: | normal |
Severity: | normal | Version: | 2.5 |
Component: | TinyMCE | Keywords: | image alignment roles |
Focuses: | Cc: |
Description
My authors are not able to save the alignment they apply to images in posts with the Insert/edit emage icon.
When "admin" edits the picture with the Insert/edit emage icon on the visual editor, the code looks like this:
<strong>Does Microsoft really need Yahoo?<img class="alignright" style="float: right; margin: 4px;" src="http://technology.newsbyte.com/wp-content/uploads/2008/04/dignanperlow.jpg" alt="Dignan and Perlow" width="300" height="172" /></strong>
When an "author" edits the picture with the Insert/edit emage icon on the visual editor, and then saves the picture, the code looks like this, and the alignment goes away:
<strong>Does Microsoft really need Yahoo?<img class="alignright" style="4px;" src="http://technology.newsbyte.com/wp-content/uploads/2008/04/dignanperlow.jpg" alt="Dignan and Perlow" width="300" height="172" /></strong>
It's like an author doesn't have the permission to change that part of the code.
Attachments (1)
Change History (7)
#3
@
16 years ago
I am having the same type of problem and I believe it is in the manner the code is written.
"alignleft" or center or right does not seem to work. When I delete the "alignwhatever" and add at the end of the string manually align="left" right of whatever, everything aligns as it should. Very annoying.
#4
@
16 years ago
- Milestone set to 2.6
- Priority changed from high to normal
- Severity changed from major to normal
The problem is kses related, I think. Authors don't have unfiltered_html, so they get kses applied and the float style gets removed. Admins do have unfiltered_html, and so they can do it.
#5
@
16 years ago
Also, the alignleft/right/center classes are new to 2.5, and you will need to adjust your theme to account for them.
Read this, bottom of the post:
http://wordpress.org/support/topic/164999
My authors are not able to save the alignment they apply to images in posts with the Insert/edit emage icon.
When "admin" edits the picture with the Insert/edit emage icon on the visual editor, the code looks like this:
<strong>Does Microsoft really need Yahoo?<img class="alignright" style="float: right; margin: 4px;" src="http://technology.newsbyte.com/wp-content/uploads/2008/04/dignanperlow.jpg" alt="Dignan and Perlow" width="300" height="172" /></strong>
When an "author" edits the picture with the Insert/edit emage icon on the visual editor, and then saves the picture, the code looks like this, and the alignment goes away:
<strong>Does Microsoft really need Yahoo?<img class="alignright" style="4px;" src="http://technology.newsbyte.com/wp-content/uploads/2008/04/dignanperlow.jpg" alt="Dignan and Perlow" width="300" height="172" /></strong>
It's like an author doesn't have the permission to change that part of the code.