Fossil SCM
Code styling and comment tweaks.
Commit
a3cf0e3390e23fc3ed2f58b7b28bdb99da9d71da
Parent
a374824d923b2ce…
1 file changed
+9
-4
+9
-4
| --- src/wysiwyg.c | ||
| +++ src/wysiwyg.c | ||
| @@ -252,16 +252,21 @@ | ||
| 252 | 252 | @ |
| 253 | 253 | @ /* Run the editing command if in WYSIWYG mode */ |
| 254 | 254 | @ function formatDoc(sCmd, sValue) { |
| 255 | 255 | @ if (isWysiwyg()){ |
| 256 | 256 | @ try { |
| 257 | - @ // First try the draft standard W3C way, which works on non-IE | |
| 258 | - @ // for a long time, and now finally supported in IE11+. | |
| 257 | + @ // First, try the W3C draft standard way, which has | |
| 258 | + @ // been working on all non-IE browsers for a while. | |
| 259 | + @ // It is also supported by IE11 and higher. | |
| 259 | 260 | @ document.execCommand("styleWithCSS", false, false); |
| 260 | 261 | @ } catch (e) { |
| 261 | - @ try { document.execCommand("useCSS", 0, true); } // IE9/10 | |
| 262 | - @ catch (e) { } // old IE | |
| 262 | + @ try { | |
| 263 | + @ // For IE9 or IE10, this should work. | |
| 264 | + @ document.execCommand("useCSS", 0, true); | |
| 265 | + @ } catch (e) { | |
| 266 | + @ // Ok, that apparently did not work, do nothing. | |
| 267 | + @ } | |
| 263 | 268 | @ } |
| 264 | 269 | @ document.execCommand(sCmd, false, sValue); |
| 265 | 270 | @ oDoc.focus(); |
| 266 | 271 | @ } |
| 267 | 272 | @ } |
| 268 | 273 |
| --- src/wysiwyg.c | |
| +++ src/wysiwyg.c | |
| @@ -252,16 +252,21 @@ | |
| 252 | @ |
| 253 | @ /* Run the editing command if in WYSIWYG mode */ |
| 254 | @ function formatDoc(sCmd, sValue) { |
| 255 | @ if (isWysiwyg()){ |
| 256 | @ try { |
| 257 | @ // First try the draft standard W3C way, which works on non-IE |
| 258 | @ // for a long time, and now finally supported in IE11+. |
| 259 | @ document.execCommand("styleWithCSS", false, false); |
| 260 | @ } catch (e) { |
| 261 | @ try { document.execCommand("useCSS", 0, true); } // IE9/10 |
| 262 | @ catch (e) { } // old IE |
| 263 | @ } |
| 264 | @ document.execCommand(sCmd, false, sValue); |
| 265 | @ oDoc.focus(); |
| 266 | @ } |
| 267 | @ } |
| 268 |
| --- src/wysiwyg.c | |
| +++ src/wysiwyg.c | |
| @@ -252,16 +252,21 @@ | |
| 252 | @ |
| 253 | @ /* Run the editing command if in WYSIWYG mode */ |
| 254 | @ function formatDoc(sCmd, sValue) { |
| 255 | @ if (isWysiwyg()){ |
| 256 | @ try { |
| 257 | @ // First, try the W3C draft standard way, which has |
| 258 | @ // been working on all non-IE browsers for a while. |
| 259 | @ // It is also supported by IE11 and higher. |
| 260 | @ document.execCommand("styleWithCSS", false, false); |
| 261 | @ } catch (e) { |
| 262 | @ try { |
| 263 | @ // For IE9 or IE10, this should work. |
| 264 | @ document.execCommand("useCSS", 0, true); |
| 265 | @ } catch (e) { |
| 266 | @ // Ok, that apparently did not work, do nothing. |
| 267 | @ } |
| 268 | @ } |
| 269 | @ document.execCommand(sCmd, false, sValue); |
| 270 | @ oDoc.focus(); |
| 271 | @ } |
| 272 | @ } |
| 273 |