737 |
|
|
738 |
var linksRegExp = this.makePhraseRegExp('^([^%O]+)?%O%O(([^|]+)?\\||)([^%C]+)%C%C', ''); |
var linksRegExp = this.makePhraseRegExp('^([^%O]+)?%O%O(([^|]+)?\\||)([^%C]+)%C%C', ''); |
739 |
|
|
740 |
var wikiRegExp = this.makePhraseRegExp('^([^%O]+)?%O([0-9]*)([:\/\*_])([^%C]+)[:\/\*_]%C', ''); |
var wikiRegExp = this.makePhraseRegExp('^([^%O]+)?%O([0-9]*)([#!])?([:\/\*_-])([^%C]+)[:\/\*_-]%C', ''); |
741 |
|
|
742 |
var montaRegExp = this.makePhraseRegExp('^([^%O]+)?%O([^%C]+)%C', ''); |
var montaRegExp = this.makePhraseRegExp('^([^%O]+)?%O([^%C]+)%C', ''); |
743 |
|
|
886 |
// modify font size and wiki-style |
// modify font size and wiki-style |
887 |
else if (wikiRegExp.test(line)) { |
else if (wikiRegExp.test(line)) { |
888 |
fragment.lastChild.appendChild(document.createElement('description')); |
fragment.lastChild.appendChild(document.createElement('description')); |
889 |
fragment.lastChild.lastChild.setAttribute('value', RegExp.$4); |
fragment.lastChild.lastChild.setAttribute('value', RegExp.$5); |
890 |
var style = 'font-size:'+ ( RegExp.$2 || 100 ) +'%'; |
var style = 'font-size:'+ ( RegExp.$2 || 100 ) +'%'; |
891 |
if (RegExp.$3 == '*') { |
if (RegExp.$4 == '*') { |
892 |
style += '; font-weight: bold;'; |
style += '; font-weight: bold;'; |
893 |
} else if (RegExp.$3 == '/') { |
} else if (RegExp.$4 == '/') { |
894 |
style += '; font-style: italic;'; |
style += '; font-style: italic;'; |
895 |
} else if (RegExp.$3 == '_') { |
} else if (RegExp.$4 == '_') { |
896 |
style += '; text-decoration: underline;'; |
style += '; text-decoration: underline;'; |
897 |
|
} else if (RegExp.$4 == '-') { |
898 |
|
style += '; text-decoration: line-through;'; |
899 |
} |
} |
900 |
fragment.lastChild.lastChild.setAttribute('style', style); |
fragment.lastChild.lastChild.setAttribute('style', style); |
901 |
|
if (RegExp.$3 == '!') fragment.lastChild.lastChild.setAttribute('class', 'em-text'); |
902 |
|
else if (RegExp.$3 == '#') fragment.lastChild.lastChild.setAttribute('class', 'preformatted-text'); |
903 |
} |
} |
904 |
|
|
905 |
// Monta |
// Monta |
1060 |
}, |
}, |
1061 |
|
|
1062 |
insert : function(aType) { |
insert : function(aType) { |
1063 |
|
var scrollTop = this.textbox.scrollTop; |
1064 |
|
// alert(this.textbox.scrollTop); |
1065 |
switch (aType) |
switch (aType) |
1066 |
{ |
{ |
1067 |
case 'page': |
case 'page': |
1096 |
default: |
default: |
1097 |
return; |
return; |
1098 |
} |
} |
1099 |
|
this.textbox.scrollTop = scrollTop; |
1100 |
this.onEdit(); |
this.onEdit(); |
1101 |
}, |
}, |
1102 |
insertTextFor : function(aString, aNode, aPosOffset) |
insertTextFor : function(aString, aNode, aPosOffset) |