Image caption fixes from azaozz: captions are properly created in tables and in lists, all tags are properly removed when deleting a caption, the align buttons can be used to align the captions. see #6812

git-svn-id: https://develop.svn.wordpress.org/trunk@8260 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2008-07-06 16:38:37 +00:00
parent 3373e4334e
commit 7dccf2c37c
6 changed files with 106 additions and 101 deletions

View File

@@ -53,6 +53,7 @@ switchEditors = {
content = content.replace(new RegExp('\\s*<div', 'mg'), '\n<div');
content = content.replace(new RegExp('</div>\\s*', 'mg'), '</div>\n');
content = content.replace(new RegExp('\\s*\\[wp_caption([^\\[]+)\\[/wp_caption\\]\\s*', 'gi'), '\n\n[wp_caption$1[/wp_caption]\n\n');
content = content.replace(new RegExp('wp_caption\\]\\n\\n+\\[wp_caption', 'g'), 'wp_caption]\n\n[wp_caption');
var blocklist2 = 'blockquote|ul|ol|li|table|thead|tr|th|td|h[1-6]|pre';
content = content.replace(new RegExp('\\s*<(('+blocklist2+') ?[^>]*)\\s*>', 'mg'), '\n<$1>');