My favorites
▼
|
Sign in
mooeditable
MooEditable class for contentEditable-capable browsers
Project Home
Issues
Export to GitHub
READ-ONLY: This project has been
archived
. For more information see
this post
.
Search
Search within:
All issues
Open issues
New issues
Issues to verify
for
Advanced search
Search tips
Subscriptions
Issue
15
attachment: MooEditable.js.modos1.diff
(1015 bytes)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
--- MooEditable.js.orig Thu Nov 13 17:00:18 2008
+++ MooEditable.js Mon Nov 17 10:33:27 2008
@@ -456,9 +456,9 @@
// Semantic conversion
source = source.replace(/<span style="font-weight: bold;">(.*)<\/span>/gi, '<strong>$1</strong>');
source = source.replace(/<span style="font-style: italic;">(.*)<\/span>/gi, '<em>$1</em>');
- source = source.replace(/<b(?!r)[^>]*>(.*?)<\/b[^>]*>/gi, '<strong>$1</strong>')
- source = source.replace(/<i[^>]*>(.*?)<\/i[^>]*>/gi, '<em>$1</em>')
- source = source.replace(/<u(?!l)[^>]*>(.*?)<\/u[^>]*>/gi, '<span style="text-decoration: underline;">$1</span>')
+ source = source.replace(/<b\b[^>]*>(.*?)<\/b[^>]*>/gi, '<strong>$1</strong>')
+ source = source.replace(/<i\b[^>]*>(.*?)<\/i[^>]*>/gi, '<em>$1</em>')
+ source = source.replace(/<u\b[^>]*>(.*?)<\/u[^>]*>/gi, '<span style="text-decoration: underline;">$1</span>')
// Replace uppercase element names with lowercase
source = source.replace(/<[^> ]*/g, function(match){return match.toLowerCase();});
Powered by
Google Project Hosting