| This is a test for Overwrite mode |
| |
| These are the original contents: |
| | "\n" |
| | <b> |
| | "foo" |
| | <a> |
| | href="http://www.google.com/" |
| | <div> |
| | id="linkText" |
| | "bar" |
| | "\n" |
| |
| After overwritting the first character: |
| | "\n" |
| | <b> |
| | "F<#selection-caret>oo" |
| | <a> |
| | href="http://www.google.com/" |
| | <div> |
| | id="linkText" |
| | "bar" |
| | "\n" |
| |
| After inserting a blank: |
| | "\n" |
| | <b> |
| | "F <#selection-caret>o" |
| | <a> |
| | href="http://www.google.com/" |
| | <div> |
| | id="linkText" |
| | "bar" |
| | "\n" |
| |
| After inserting a blank at the line end: |
| | "\n" |
| | <b> |
| | "F o <#selection-caret>" |
| | <a> |
| | href="http://www.google.com/" |
| | <div> |
| | id="linkText" |
| | "bar" |
| | "\n" |
| |
| Overwrite at the end of a line performs as a normal Insert: |
| | "\n" |
| | <b> |
| | "F o SOME MORE<#selection-caret>" |
| | <a> |
| | href="http://www.google.com/" |
| | <div> |
| | id="linkText" |
| | "bar" |
| | "\n" |
| |
| Overwritting works even if the inserted text is longer than the replaced text: |
| | "\n" |
| | <b> |
| | "F o SOME MORE" |
| | <a> |
| | href="http://www.google.com/" |
| | <div> |
| | id="linkText" |
| | "BAR.BAR<#selection-caret>" |
| | "\n" |
| |
| Overwrite should create new text nodes on demand: |
| | "\n" |
| | <b> |
| | "F o SOME MORE" |
| | <div> |
| | id="linkText" |
| | <a> |
| | href="http://www.google.com/" |
| | "BAR.BAR" |
| | <br> |
| | "TEXT IN NEW NODE<#selection-caret>" |
| | "\n" |
| |
| New plain text contents with an inner selection: |
| | "we<#selection-anchor>bk<#selection-focus>it" |
| |
| Overwrite behaves like insert on range selections: |
| | "weBK<#selection-caret>it" |
| |
| New CJK contents: |
| | "丠両丢丣" |
| |
| Overwrite CJK text: |
| | "且且<#selection-caret>丢丣" |
| |
| New RTL contents: |
| | <div> |
| | dir="rtl" |
| | id="rtl-div" |
| | "ℵℶℷℸ" |
| |
| Overwrite RTL text: |
| | <div> |
| | dir="rtl" |
| | id="rtl-div" |
| | "אא<#selection-caret>ℷℸ" |
| |
| console: |
| | |