User:Cacycle/wikEd dev.js: Difference between revisions

Content deleted Content added
No edit summary
0.9.14b
Line 3:
/*
Name: wikEd (wikEd.js)
Version: wikEd 0.9.x (beta) (DecemberJanuary, 20062007)
What: Comfortable JavaScript in-browser editor for Wikipedia and other MediaWikis
Update: press SHIFT-Reload to update to the newest version
Line 16:
 
// version information
var wikEdProgramVersion = '0.9.14a14b (beta)';
var wikEdProgramDate = 'DecemberJanuary 213, 20062007';
 
 
Line 512:
'wikify': '9/9f/WikEd_wikify.png',
'wikiLink': '2/21/WikEd_wikilink.png'
});
 
// buttons (id, class, popup title, image src, width, height, alt text, onClick and parameters)
var wikEdButton = wikEdButton || [];
WikEdInitObject(wikEdButton, {
 
// format top
1: ['wikEdUndo', 'wikEdButtonInactive', wikEdText['wikEdUndo title'], wikEdImage['undo'], '16', '16', wikEdText['wikEdUndo alt'], 'javascript:WikEdEditButton(this.id);' ],
2: ['wikEdRedo', 'wikEdButtonInactive', wikEdText['wikEdRedo title'], wikEdImage['redo'], '16', '16', wikEdText['wikEdRedo alt'], 'javascript:WikEdEditButton(this.id);' ],
3: ['wikEdBold', 'wikEdButton', wikEdText['wikEdBold title'], wikEdImage['bold'], '16', '16', wikEdText['wikEdBold alt'], 'javascript:WikEdEditButton(this.id);' ],
4: ['wikEdItalic', 'wikEdButton', wikEdText['wikEdItalic title'], wikEdImage['italic'], '16', '16', wikEdText['wikEdItalic alt'], 'javascript:WikEdEditButton(this.id);' ],
5: ['wikEdUnderline', 'wikEdButton', wikEdText['wikEdUnderline title'], wikEdImage['underline'], '16', '16', wikEdText['wikEdUnderline alt'], 'javascript:WikEdEditButton(this.id);' ],
6: ['wikEdStrikethrough', 'wikEdButton', wikEdText['wikEdStrikethrough title'], wikEdImage['strikethrough'], '16', '16', wikEdText['wikEdStrikethrough alt'], 'javascript:WikEdEditButton(this.id);' ],
7: ['wikEdNowiki', 'wikEdButton', wikEdText['wikEdNowiki title'], wikEdImage['nowiki'], '16', '16', wikEdText['wikEdNowiki alt'], 'javascript:WikEdEditButton(this.id);' ],
8: ['wikEdSuperscript', 'wikEdButton', wikEdText['wikEdSuperscript title'], wikEdImage['superscript'], '16', '16', wikEdText['wikEdSuperscript alt'], 'javascript:WikEdEditButton(this.id);' ],
9: ['wikEdSubscript', 'wikEdButton', wikEdText['wikEdSubscript title'], wikEdImage['subscript'], '16', '16', wikEdText['wikEdSubscript alt'], 'javascript:WikEdEditButton(this.id);' ],
10: ['wikEdCase', 'wikEdButton', wikEdText['wikEdCase title'], wikEdImage['case'], '16', '16', wikEdText['wikEdCase alt'], 'javascript:WikEdEditButton(this.id);' ],
11: ['wikEdUndoAll', 'wikEdButton', wikEdText['wikEdUndoAll title'], wikEdImage['undoAll'], '16', '16', wikEdText['wikEdUndoAll alt'], 'javascript:WikEdEditButton(this.id);' ],
12: ['wikEdRedoAll', 'wikEdButtonInactive', wikEdText['wikEdRedoAll title'], wikEdImage['redoAll'], '16', '16', wikEdText['wikEdRedoAll alt'], 'javascript:WikEdEditButton(this.id);' ],
13: ['wikEdUpdateSyntax', 'wikEdButton', wikEdText['wikEdUpdateSyntax title'], wikEdImage['updateSyntax'], '16', '16', wikEdText['wikEdUpdateSyntax alt'], 'javascript:WikEdEditButton(this.id);' ],
 
// format bottom
14: ['wikEdWikiLink', 'wikEdButton', wikEdText['wikEdWikiLink title'], wikEdImage['wikiLink'], '16', '16', wikEdText['wikEdWikiLink alt'], 'javascript:WikEdEditButton(this.id);' ],
15: ['wikEdWebLink', 'wikEdButton', wikEdText['wikEdWebLink title'], wikEdImage['webLink'], '16', '16', wikEdText['wikEdWebLink alt'], 'javascript:WikEdEditButton(this.id);' ],
16: ['wikEdDecreaseHeading', 'wikEdButton', wikEdText['wikEdDecreaseHeading title'], wikEdImage['decreaseHeading'], '16', '16', wikEdText['wikEdDecreaseHeading alt'], 'javascript:WikEdEditButton(this.id);' ],
17: ['wikEdIncreaseHeading', 'wikEdButton', wikEdText['wikEdIncreaseHeading title'], wikEdImage['increaseHeading'], '16', '16', wikEdText['wikEdIncreaseHeading alt'], 'javascript:WikEdEditButton(this.id);' ],
18: ['wikEdBulletList', 'wikEdButton', wikEdText['wikEdBulletList title'], wikEdImage['bulletList'], '16', '16', wikEdText['wikEdBulletList alt'], 'javascript:WikEdEditButton(this.id);' ],
19: ['wikEdNumberList', 'wikEdButton', wikEdText['wikEdNumberList title'], wikEdImage['numberList'], '16', '16', wikEdText['wikEdNumberList alt'], 'javascript:WikEdEditButton(this.id);' ],
20: ['wikEdIndentList', 'wikEdButton', wikEdText['wikEdIndentList title'], wikEdImage['indentList'], '16', '16', wikEdText['wikEdIndentList alt'], 'javascript:WikEdEditButton(this.id);' ],
21: ['wikEdDefinitionList', 'wikEdButton', wikEdText['wikEdDefinitionList title'], wikEdImage['definitionList'], '16', '16', wikEdText['wikEdDefinitionList alt'], 'javascript:WikEdEditButton(this.id);' ],
22: ['wikEdImage', 'wikEdButton', wikEdText['wikEdImage title'], wikEdImage['image'], '16', '16', wikEdText['wikEdImage alt'], 'javascript:WikEdEditButton(this.id);' ],
23: ['wikEdTable', 'wikEdButton', wikEdText['wikEdTable title'], wikEdImage['table'], '16', '16', wikEdText['wikEdTable alt'], 'javascript:WikEdEditButton(this.id);' ],
24: ['wikEdRedirect', 'wikEdButton', wikEdText['wikEdRedirect title'], wikEdImage['redirect'], '16', '16', wikEdText['wikEdRedirect alt'], 'javascript:WikEdEditButton(this.id);' ],
25: ['wikEdWikify', 'wikEdButton', wikEdText['wikEdWikify title'], wikEdImage['wikify'], '16', '16', wikEdText['wikEdWikify alt'], 'javascript:WikEdEditButton(this.id);' ],
26: ['wikEdTextify', 'wikEdButton', wikEdText['wikEdTextify title'], wikEdImage['textify'], '16', '16', wikEdText['wikEdTextify alt'], 'javascript:WikEdEditButton(this.id);' ],
 
// control top
27: ['wikEdTextZoom', 'wikEdButton', wikEdText['wikEdTextZoom title'], wikEdImage['textZoom'], '16', '16', wikEdText['wikEdTextZoom alt'], 'javascript:WikEdButton(this.id);' ],
28: ['wikEdClearHistory', 'wikEdButton', wikEdText['wikEdClearHistory title'], wikEdImage['clearHistory'], '16', '16', wikEdText['wikEdClearHistory alt'], 'javascript:WikEdButton(this.id);' ],
29: ['wikEdScrollToButtons', 'wikEdButton', wikEdText['wikEdScrollToButtons title'], wikEdImage['scrollToButtons'], '16', '16', wikEdText['wikEdScrollToButtons alt'], 'javascript:WikEdButton(this.id);' ],
30: ['wikEdScrollToInput', 'wikEdButton', wikEdText['wikEdScrollToInput title'], wikEdImage['scrollToText'], '16', '16', wikEdText['wikEdScrollToInput alt'], 'javascript:WikEdButton(this.id);' ],
 
// control bottom
31: ['wikEdUseWikEd', 'wikEdButtonChecked', wikEdText['wikEdUseWikEd title'], wikEdImage['useWikEd'], '16', '16', wikEdText['wikEdUseWikEd alt'], 'javascript:WikEdButton(this.id, true);' ],
32: ['wikEdHighlightSyntax', 'wikEdButtonUnchecked', wikEdText['wikEdHighlightSyntax title'], wikEdImage['highlightSyntax'], '16', '16', wikEdText['wikEdHighlightSyntax alt'], 'javascript:WikEdButton(this.id, true);' ],
33: ['wikEdSource', 'wikEdButton', wikEdText['wikEdSource title'], wikEdImage['source'], '16', '16', wikEdText['wikEdSource alt'], 'javascript:WikEdEditButton(this.id);' ],
34: ['wikEdUsing', 'wikEdButtonUnchecked', wikEdText['wikEdUsing title'], wikEdImage['using'], '16', '16', wikEdText['wikEdUsing alt'], 'javascript:WikEdButton(this.id, true);' ],
35: ['wikEdFullScreen', 'wikEdButton', wikEdText['wikEdFullScreen title'], wikEdImage['fullScreen'], '16', '16', wikEdText['wikEdFullScreen alt'], 'javascript:WikEdButton(this.id, true);' ],
 
// find top
36: ['wikEdGetFind', 'wikEdButton', wikEdText['wikEdGetFind title'], wikEdImage['getFind'], '16', '16', wikEdText['wikEdGetFind alt'], 'javascript:WikEdEditButton(this.id);" ondblclick="javascript:WikEdEditButton(this.id);' ],
37: ['wikEdFindAll', 'wikEdButton', wikEdText['wikEdFindAll title'], wikEdImage['findAll'], '16', '16', wikEdText['wikEdFindAll alt'], 'javascript:WikEdEditButton(this.id);' ],
38: ['wikEdFindPrev', 'wikEdButton', wikEdText['wikEdFindPrev title'], wikEdImage['findPrev'], '16', '16', wikEdText['wikEdFindPrev alt'], 'javascript:WikEdEditButton(this.id);' ],
39: ['wikEdFindNext', 'wikEdButton', wikEdText['wikEdFindNext title'], wikEdImage['findNext'], '16', '16', wikEdText['wikEdFindNext alt'], 'javascript:WikEdEditButton(this.id);' ],
40: ['wikEdUpdown', 'wikEdButton', wikEdText['wikEdUpdown title'], wikEdImage['jumpTopBottom'], '16', '16', wikEdText['wikEdUpdown alt'], 'javascript:WikEdEditButton(this.id);' ],
41: ['wikEdPrevPos', 'wikEdButtonInactive', wikEdText['wikEdPrevPos title'], wikEdImage['prevPos'], '16', '16', wikEdText['wikEdPrevPos alt'], 'javascript:WikEdEditButton(this.id);' ],
42: ['wikEdLastPos', 'wikEdButtonInactive', wikEdText['wikEdLastPos title'], wikEdImage['lastPos'], '16', '16', wikEdText['wikEdLastPos alt'], 'javascript:WikEdEditButton(this.id);' ],
 
// find bottom
43: ['wikEdClearFind', 'wikEdButton', wikEdText['wikEdClearFind title'], wikEdImage['clearFind'], '16', '16', wikEdText['wikEdClearFind alt'], 'javascript:WikEdButton(this.id);' ],
44: ['wikEdReplaceAll', 'wikEdButton', wikEdText['wikEdReplaceAll title'], wikEdImage['replaceAll'], '16', '16', wikEdText['wikEdReplaceAll alt'], 'javascript:WikEdEditButton(this.id);' ],
45: ['wikEdReplacePrev', 'wikEdButton', wikEdText['wikEdReplacePrev title'], wikEdImage['replacePrev'], '16', '16', wikEdText['wikEdReplacePrev alt'], 'javascript:WikEdEditButton(this.id);' ],
46: ['wikEdReplaceNext', 'wikEdButton', wikEdText['wikEdReplaceNext title'], wikEdImage['replaceNext'], '16', '16', wikEdText['wikEdReplaceNext alt'], 'javascript:WikEdEditButton(this.id);' ],
47: ['wikEdCaseSensitive', 'wikEdButtonUnchecked', wikEdText['wikEdCaseSensitive title'], wikEdImage['caseSensitive'], '16', '16', wikEdText['wikEdCaseSensitive alt'], 'javascript:WikEdButton(this.id, true);' ],
48: ['wikEdRegExp', 'wikEdButtonUnchecked', wikEdText['wikEdRegExp title'], wikEdImage['regExp'], '16', '16', wikEdText['wikEdRegExp alt'], 'javascript:WikEdButton(this.id, true);' ],
49: ['wikEdFindAhead', 'wikEdButtonUnchecked', wikEdText['wikEdFindAhead title'], wikEdImage['findAhead'], '16', '16', wikEdText['wikEdFindAhead alt'], 'javascript:WikEdButton(this.id, true);' ],
 
// fix top
50: ['wikEdFixBasic', 'wikEdButton', wikEdText['wikEdFixBasic title'], wikEdImage['fixBasic'], '16', '16', wikEdText['wikEdFixBasic alt'], 'javascript:WikEdEditButton(this.id);' ],
51: ['wikEdFixHtml', 'wikEdButton', wikEdText['wikEdFixHtml title'], wikEdImage['fixHtml'], '16', '16', wikEdText['wikEdFixHtml alt'], 'javascript:WikEdEditButton(this.id);' ],
52: ['wikEdFixCaps', 'wikEdButton', wikEdText['wikEdFixCaps title'], wikEdImage['fixCaps'], '16', '16', wikEdText['wikEdFixCaps alt'], 'javascript:WikEdEditButton(this.id);' ],
53: ['wikEdfixUnicode', 'wikEdButton', wikEdText['wikEdfixUnicode title'], wikEdImage['fixUnicode'], '16', '16', wikEdText['wikEdfixUnicode alt'], 'javascript:WikEdEditButton(this.id);' ],
54: ['wikEdFixAll', 'wikEdButton', wikEdText['wikEdFixAll title'], wikEdImage['fixAll'], '16', '16', wikEdText['wikEdFixAll alt'], 'javascript:WikEdEditButton(this.id);' ],
55: ['wikEdFixRegExTypo', 'wikEdButton', wikEdText['wikEdFixRegExTypo title'], wikEdImage['fixRegExTypo'], '16', '16', wikEdText['wikEdFixRegExTypo alt'], 'javascript:WikEdEditButton(this.id);' ],
 
// fix bottom
56: ['wikEdFixDashes', 'wikEdButton', wikEdText['wikEdFixDashes title'], wikEdImage['fixDash'], '16', '16', wikEdText['wikEdFixDashes alt'], 'javascript:WikEdEditButton(this.id);' ],
57: ['wikEdFixPunct', 'wikEdButton', wikEdText['wikEdFixPunct title'], wikEdImage['fixPunct'], '16', '16', wikEdText['wikEdFixPunct alt'], 'javascript:WikEdEditButton(this.id);' ],
58: ['wikEdFixMath', 'wikEdButton', wikEdText['wikEdFixMath title'], wikEdImage['fixMath'], '16', '16', wikEdText['wikEdFixMath alt'], 'javascript:WikEdEditButton(this.id);' ],
59: ['wikEdFixChem', 'wikEdButton', wikEdText['wikEdFixChem title'], wikEdImage['fixChem'], '16', '16', wikEdText['wikEdFixChem alt'], 'javascript:WikEdEditButton(this.id);' ],
60: ['wikEdFixUnits', 'wikEdButton', wikEdText['wikEdFixUnits title'], wikEdImage['fixUnits'], '16', '16', wikEdText['wikEdFixUnits alt'], 'javascript:WikEdEditButton(this.id);' ],
 
// preview
61: ['wikEdPreview', 'wikEdButton', wikEdText['wikEdPreview title'], wikEdImage['preview'], '16', '16', wikEdText['wikEdPreview alt'], 'javascript:WikEdButton(this.id);' ],
62: ['wikEdDiff', 'wikEdButton', wikEdText['wikEdDiff title'], wikEdImage['diff'], '16', '16', wikEdText['wikEdDiff alt'], 'javascript:WikEdButton(this.id);' ],
63: ['wikEdClose', 'wikEdButton', wikEdText['wikEdClose title'], wikEdImage['close'], '16', '16', wikEdText['wikEdClose alt'], 'javascript:WikEdButton(this.id);' ],
64: ['wikEdScrollToButtons2', 'wikEdButton', wikEdText['wikEdScrollToButtons2 title'], wikEdImage['scrollToButtons'], '16', '16', wikEdText['wikEdScrollToButtons2 alt'], 'javascript:WikEdButton(this.id);' ],
65: ['wikEdScrollToInput2', 'wikEdButton', wikEdText['wikEdScrollToInput2 title'], wikEdImage['scrollToText'], '16', '16', wikEdText['wikEdScrollToInput2 alt'], 'javascript:WikEdButton(this.id);' ],
 
// preview2
66: ['wikEdPreview2', 'wikEdButton', wikEdText['wikEdPreview2 title'], wikEdImage['preview'], '16', '16', wikEdText['wikEdPreview2 alt'], 'javascript:WikEdButton(this.id);' ],
67: ['wikEdDiff2', 'wikEdButton', wikEdText['wikEdDiff2 title'], wikEdImage['diff'], '16', '16', wikEdText['wikEdDiff2 alt'], 'javascript:WikEdButton(this.id);' ],
68: ['wikEdClose2', 'wikEdButton', wikEdText['wikEdClose2 title'], wikEdImage['close'], '16', '16', wikEdText['wikEdClose2 alt'], 'javascript:WikEdButton(this.id);' ],
69: ['wikEdScrollToButtons3', 'wikEdButton', wikEdText['wikEdScrollToButtons3 title'], wikEdImage['scrollToButtons'], '16', '16', wikEdText['wikEdScrollToButtons3 alt'], 'javascript:WikEdButton(this.id);' ],
70: ['wikEdScrollToInput3', 'wikEdButton', wikEdText['wikEdScrollToInput3 title'], wikEdImage['scrollToText'], '16', '16', wikEdText['wikEdScrollToInput3 alt'], 'javascript:WikEdButton(this.id);' ],
 
// jump
71: ['wikEdScrollToButtons4', 'wikEdButtonSolo', wikEdText['wikEdScrollToButtons4 title'], wikEdImage['scrollToButtons'], '16', '16', wikEdText['wikEdScrollToButtons4 alt'], 'javascript:WikEdButton(this.id);' ],
72: ['wikEdScrollToInput4', 'wikEdButtonSolo', wikEdText['wikEdScrollToInput4 title'], wikEdImage['scrollToText'], '16', '16', wikEdText['wikEdScrollToInput4 alt'], 'javascript:WikEdButton(this.id);' ]
});
 
// button bars (id, class, button numbers)
var wikEdButtonBar = wikEdButtonBar || [];
WikEdInitObject(wikEdButtonBar, {
'format': ['wikEdButtonsFormat', 'wikEdButtonsFormat', [1,2,3,4,5,6,7,8,9,10,11,12,13,'br',14,15,16,17,18,19,20,21,22,23,24,25,26] ],
'control': ['wikEdButtonsControl', 'wikEdButtonsControl', [27,28,29,30,'br',31,32,33,34,35] ],
'find': ['wikEdButtonsFind', 'wikEdButtonsFind', [36,37,38,'find',39,40,41,42,'br',43,44,45,'replace',46,47,48,49] ],
'fix': ['wikEdButtonsFix', 'wikEdButtonsFix', [50,51,52,53,54,55,'br',56,57,58,59,60] ],
'preview': ['wikEdButtonsPreview', 'wikEdButtonsPreview', [61,62,63,64,65] ],
'preview2': ['wikEdButtonsPreview2', 'wikEdButtonsPreview2', [66,67,68,69,70] ],
'jump': ['wikEdButtonsJump', 'wikEdButtonsJump', [71,72] ]
});
 
Line 1,054 ⟶ 1,165:
 
// add wikEd buttons to buttons wrapper
var html = '';
 
// format buttons
html += MakeButtonBar(wikEdButtonBar['format']);
html += '<div class="wikEdButtonsFormat" id="wikEdButtonsFormat">';
 
html += '<img class="wikEdButtonInactive" src="' + wikEdImage['undo'] + '" width="16" height="16" id="wikEdUndo" alt="' + wikEdText['wikEdUndo alt'] + '" title="' + wikEdText['wikEdUndo title'] + '" onClick="javascript:WikEdEditButton(\'wikEdUndo\');">';
html += '<img class="wikEdButtonInactive" src="' + wikEdImage['redo'] + '" width="16" height="16" id="wikEdRedo" alt="' + wikEdText['wikEdRedo alt'] + '" title="' + wikEdText['wikEdRedo title'] + '" onClick="javascript:WikEdEditButton(\'wikEdRedo\');">';
html += '<img class="wikEdButton" src="' + wikEdImage['bold'] + '" width="16" height="16" id="wikEdBold" alt="' + wikEdText['wikEdBold alt'] + '" title="' + wikEdText['wikEdBold title'] + '" onClick="javascript:WikEdEditButton(\'wikEdBold\');">';
html += '<img class="wikEdButton" src="' + wikEdImage['italic'] + '" width="16" height="16" id="wikEdItalic" alt="' + wikEdText['wikEdItalic alt'] + '" title="' + wikEdText['wikEdItalic title'] + '" onClick="javascript:WikEdEditButton(\'wikEdItalic\');">';
html += '<img class="wikEdButton" src="' + wikEdImage['underline'] + '" width="16" height="16" id="wikEdUnderline" alt="' + wikEdText['wikEdUnderline alt'] + '" title="' + wikEdText['wikEdUnderline title'] + '" onClick="javascript:WikEdEditButton(\'wikEdUnderline\');">';
html += '<img class="wikEdButton" src="' + wikEdImage['strikethrough'] + '" width="16" height="16" id="wikEdStrikethrough" alt="' + wikEdText['wikEdStrikethrough alt'] + '" title="' + wikEdText['wikEdStrikethrough title'] + '" onClick="javascript:WikEdEditButton(\'wikEdStrikethrough\');">';
html += '<img class="wikEdButton" src="' + wikEdImage['nowiki'] + '" width="16" height="16" id="wikEdNowiki" alt="' + wikEdText['wikEdNowiki alt'] + '" title="' + wikEdText['wikEdNowiki title'] + '" onClick="javascript:WikEdEditButton(\'wikEdNowiki\');">';
html += '<img class="wikEdButton" src="' + wikEdImage['superscript'] + '" width="16" height="16" id="wikEdSuperscript" alt="' + wikEdText['wikEdSuperscript alt'] + '" title="' + wikEdText['wikEdSuperscript title'] + '" onClick="javascript:WikEdEditButton(\'wikEdSuperscript\');">';
html += '<img class="wikEdButton" src="' + wikEdImage['subscript'] + '" width="16" height="16" id="wikEdSubscript" alt="' + wikEdText['wikEdSubscript alt'] + '" title="' + wikEdText['wikEdSubscript title'] + '" onClick="javascript:WikEdEditButton(\'wikEdSubscript\');">';
html += '<img class="wikEdButton" src="' + wikEdImage['case'] + '" width="16" height="16" id="wikEdCase" alt="' + wikEdText['wikEdCase alt'] + '" title="' + wikEdText['wikEdCase title'] + '" onClick="javascript:WikEdEditButton(\'wikEdCase\');">';
html += '<img class="wikEdButton" src="' + wikEdImage['undoAll'] + '" width="16" height="16" id="wikEdUndoAll" alt="' + wikEdText['wikEdUndoAll alt'] + '" title="' + wikEdText['wikEdUndoAll title'] + '" onClick="javascript:WikEdEditButton(\'wikEdUndoAll\');">';
html += '<img class="wikEdButtonInactive" src="' + wikEdImage['redoAll'] + '" width="16" height="16" id="wikEdRedoAll" alt="' + wikEdText['wikEdRedoAll alt'] + '" title="' + wikEdText['wikEdRedoAll title'] + '" onClick="javascript:WikEdEditButton(\'wikEdRedoAll\');">';
html += '<img class="wikEdButton" src="' + wikEdImage['updateSyntax'] + '" width="16" height="16" id="wikEdUpdateSyntax" alt="' + wikEdText['wikEdUpdateSyntax alt'] + '" title="' + wikEdText['wikEdUpdateSyntax title'] + '" onClick="javascript:WikEdEditButton(\'wikEdUpdateSyntax\');">';
html += '<br />';
 
html += '<img class="wikEdButton" src="' + wikEdImage['wikiLink'] + '" width="16" height="16" id="wikEdWikiLink" alt="' + wikEdText['wikEdWikiLink alt'] + '" title="' + wikEdText['wikEdWikiLink title'] + '" onClick="javascript:WikEdEditButton(\'wikEdWikiLink\');">';
html += '<img class="wikEdButton" src="' + wikEdImage['webLink'] + '" width="16" height="16" id="wikEdWebLink" alt="' + wikEdText['wikEdWebLink alt'] + '" title="' + wikEdText['wikEdWebLink title'] + '" onClick="javascript:WikEdEditButton(\'wikEdWebLink\');">';
html += '<img class="wikEdButton" src="' + wikEdImage['decreaseHeading'] + '" width="16" height="16" id="wikEdDecreaseHeading" alt="' + wikEdText['wikEdDecreaseHeading alt'] + '" title="' + wikEdText['wikEdDecreaseHeading title'] + '" onClick="javascript:WikEdEditButton(\'wikEdDecreaseHeading\');">';
html += '<img class="wikEdButton" src="' + wikEdImage['increaseHeading'] + '" width="16" height="16" id="wikEdIncreaseHeading" alt="' + wikEdText['wikEdIncreaseHeading alt'] + '" title="' + wikEdText['wikEdIncreaseHeading title'] + '" onClick="javascript:WikEdEditButton(\'wikEdIncreaseHeading\');">';
html += '<img class="wikEdButton" src="' + wikEdImage['bulletList'] + '" width="16" height="16" id="wikEdBulletList" alt="' + wikEdText['wikEdBulletList alt'] + '" title="' + wikEdText['wikEdBulletList title'] + '" onClick="javascript:WikEdEditButton(\'wikEdBulletList\');">';
html += '<img class="wikEdButton" src="' + wikEdImage['numberList'] + '" width="16" height="16" id="wikEdNumberList" alt="' + wikEdText['wikEdNumberList alt'] + '" title="' + wikEdText['wikEdNumberList title'] + '" onClick="javascript:WikEdEditButton(\'wikEdNumberList\');">';
html += '<img class="wikEdButton" src="' + wikEdImage['indentList'] + '" width="16" height="16" id="wikEdIndentList" alt="' + wikEdText['wikEdIndentList alt'] + '" title="' + wikEdText['wikEdIndentList title'] + '" onClick="javascript:WikEdEditButton(\'wikEdIndentList\');">';
html += '<img class="wikEdButton" src="' + wikEdImage['definitionList'] + '" width="16" height="16" id="wikEdDefinitionList" alt="' + wikEdText['wikEdDefinitionList alt'] + '" title="' + wikEdText['wikEdDefinitionList title'] + '" onClick="javascript:WikEdEditButton(\'wikEdDefinitionList\');">';
html += '<img class="wikEdButton" src="' + wikEdImage['image'] + '" width="16" height="16" id="wikEdImage" alt="' + wikEdText['wikEdImage alt'] + '" title="' + wikEdText['wikEdImage title'] + '" onClick="javascript:WikEdEditButton(\'wikEdImage\');">';
html += '<img class="wikEdButton" src="' + wikEdImage['table'] + '" width="16" height="16" id="wikEdTable" alt="' + wikEdText['wikEdTable alt'] + '" title="' + wikEdText['wikEdTable title'] + '" onClick="javascript:WikEdEditButton(\'wikEdTable\');">';
html += '<img class="wikEdButton" src="' + wikEdImage['redirect'] + '" width="16" height="16" id="wikEdRedirect" alt="' + wikEdText['wikEdRedirect alt'] + '" title="' + wikEdText['wikEdRedirect title'] + '" onClick="javascript:WikEdEditButton(\'wikEdRedirect\');">';
html += '<img class="wikEdButton" src="' + wikEdImage['wikify'] + '" width="16" height="16" id="wikEdWikify" alt="' + wikEdText['wikEdWikify alt'] + '" title="' + wikEdText['wikEdWikify title'] + '" onClick="javascript:WikEdEditButton(\'wikEdWikify\');">';
html += '<img class="wikEdButton" src="' + wikEdImage['textify'] + '" width="16" height="16" id="wikEdTextify" alt="' + wikEdText['wikEdTextify alt'] + '" title="' + wikEdText['wikEdTextify title'] + '" onClick="javascript:WikEdEditButton(\'wikEdTextify\');">';
html += '</div>';
 
// wikEd control buttons
html += MakeButtonBar(wikEdButtonBar['control']);
html += '<div class="wikEdButtonsControl" id="wikEdButtonsControl">';
html += '<img class="wikEdButton" src="' + wikEdImage['textZoom'] + '" width="16" height="16" id="wikEdTextZoom" alt="' + wikEdText['wikEdTextZoom alt'] + '" title="' + wikEdText['wikEdTextZoom title'] + '" onClick="javascript:WikEdButton(\'wikEdTextZoom\');">';
html += '<img class="wikEdButton" src="' + wikEdImage['clearHistory'] + '" width="16" height="16" id="wikEdClearHistory" alt="' + wikEdText['wikEdClearHistory alt'] + '" title="' + wikEdText['wikEdClearHistory title'] + '" onClick="javascript:WikEdButton(\'wikEdClearHistory\');">';
html += '<img class="wikEdButton" src="' + wikEdImage['scrollToButtons'] + '" width="16" height="16" id="wikEdScrollToButtons" alt="' + wikEdText['wikEdScrollToButtons alt'] + '" title="' + wikEdText['wikEdScrollToButtons title'] + '" onClick="javascript:WikEdButton(\'wikEdScrollToButtons\');">';
html += '<img class="wikEdButton" src="' + wikEdImage['scrollToText'] + '" width="16" height="16" id="wikEdScrollToInput" alt="' + wikEdText['wikEdScrollToInput alt'] + '" title="' + wikEdText['wikEdScrollToInput title'] + '" onClick="javascript:WikEdButton(\'wikEdScrollToInput\');">';
html += '<br />';
 
html += '<img class="wikEdButtonChecked" src="' + wikEdImage['useWikEd'] + '" width="16" height="16" id="wikEdUseWikEd" alt="' + wikEdText['wikEdUseWikEd alt'] + '" title="' + wikEdText['wikEdUseWikEd title'] + '" onClick="javascript:WikEdButton(\'wikEdUseWikEd\', true);">';
html += '<img class="wikEdButtonUnchecked" src="' + wikEdImage['highlightSyntax'] + '" width="16" height="16" id="wikEdHighlightSyntax" alt="' + wikEdText['wikEdHighlightSyntax alt'] + '" title="' + wikEdText['wikEdHighlightSyntax title'] + '" onClick="javascript:WikEdButton(\'wikEdHighlightSyntax\', true);">';
if (wikEdShowSourceButton == true) {
html += '<img class="wikEdButton" src="' + wikEdImage['source'] + '" width="16" height="16" id="wikEdSource" alt="' + wikEdText['wikEdSource alt'] + '" title="' + wikEdText['wikEdSource title'] + '" onClick="javascript:WikEdEditButton(\'wikEdSource\');">';
}
html += '<img class="wikEdButtonUnchecked" src="' + wikEdImage['using'] + '" width="16" height="16" id="wikEdUsing" alt="' + wikEdText['wikEdUsing alt'] + '" title="' + wikEdText['wikEdUsing title'] + '" onClick="javascript:WikEdButton(\'wikEdUsing\', true);">';
html += '<img class="wikEdButton" src="' + wikEdImage['fullScreen'] + '" width="16" height="16" id="wikEdFullScreen" alt="' + wikEdText['wikEdFullScreen alt'] + '" title="' + wikEdText['wikEdFullScreen title'] + '" onClick="javascript:WikEdButton(\'wikEdFullScreen\', true);">';
html += '</div>';
 
// find / replace buttons
html += MakeButtonBar(wikEdButtonBar['find']);
html += '<div class="wikEdButtonsFind" id="wikEdButtonsFind">';
 
html += '<img class="wikEdButton" src="' + wikEdImage['getFind'] + '" width="16" height="16" id="wikEdGetFind" alt="' + wikEdText['wikEdGetFind alt'] + '" title="' + wikEdText['wikEdGetFind title'] + '" onClick="javascript:WikEdEditButton(\'wikEdGetFind\');" ondblclick="javascript:WikEdEditButton(\'wikEdGetFindReplace\');">';
html += '<img class="wikEdButton" src="' + wikEdImage['findAll'] + '" width="16" height="16" id="wikEdFindAll" alt="' + wikEdText['wikEdFindAll alt'] + '" title="' + wikEdText['wikEdFindAll title'] + '" onClick="javascript:WikEdEditButton(\'wikEdFindAll\');">';
html += '<img class="wikEdButton" src="' + wikEdImage['findPrev'] + '" width="16" height="16" id="wikEdFindPrev" alt="' + wikEdText['wikEdFindPrev alt'] + '" title="' + wikEdText['wikEdFindPrev title'] + '" onClick="javascript:WikEdEditButton(\'wikEdFindPrev\');">';
 
html += '<span class="wikEdFindComboInput" id="wikEdFindComboInput">';
html += '<input class="wikEdCombo" id="wikEdFindText" type="text" value="" onfocus="javascript:this.setSelectionRange(0, this.textLength);">';
html += '<select class="wikEdCombo" id="wikEdFindSelect" onfocus="javascript:WikEdSetComboOptions(\'find\')" onChange="javascript:WikEdChangeComboInput(\'find\');">';
html += '</select>';
html += '</span>';
 
html += '<img class="wikEdButton" src="' + wikEdImage['findNext'] + '" width="16" height="16" id="wikEdFindNext" alt="' + wikEdText['wikEdFindNext alt'] + '" title="' + wikEdText['wikEdFindNext title'] + '" onClick="javascript:WikEdEditButton(\'wikEdFindNext\');">';
html += '<img class="wikEdButton" src="' + wikEdImage['jumpTopBottom'] + '" width="16" height="16" id="wikEdUpdown" alt="' + wikEdText['wikEdUpdown alt'] + '" title="' + wikEdText['wikEdUpdown title'] + '" onClick="javascript:WikEdEditButton(\'wikEdUpdown\');">';
html += '<img class="wikEdButtonInactive" src="' + wikEdImage['prevPos'] + '" width="16" height="16" id="wikEdPrevPos" alt="' + wikEdText['wikEdPrevPos alt'] + '" title="' + wikEdText['wikEdPrevPos title'] + '" onClick="javascript:WikEdEditButton(\'wikEdPrevPos\');">';
html += '<img class="wikEdButtonInactive" src="' + wikEdImage['lastPos'] + '" width="16" height="16" id="wikEdLastPos" alt="' + wikEdText['wikEdLastPos alt'] + '" title="' + wikEdText['wikEdLastPos title'] + '" onClick="javascript:WikEdEditButton(\'wikEdLastPos\');">';
html += '<br />';
 
html += '<img class="wikEdButton" src="' + wikEdImage['clearFind'] + '" width="16" height="16" id="wikEdClearFind" alt="' + wikEdText['wikEdClearFind alt'] + '" title="' + wikEdText['wikEdClearFind title'] + '" onClick="javascript:WikEdButton(\'wikEdClearFind\');">';
html += '<img class="wikEdButton" src="' + wikEdImage['replaceAll'] + '" width="16" height="16" id="wikEdReplaceAll" alt="' + wikEdText['wikEdReplaceAll alt'] + '" title="' + wikEdText['wikEdReplaceAll title'] + '" onClick="javascript:WikEdEditButton(\'wikEdReplaceAll\');">';
html += '<img class="wikEdButton" src="' + wikEdImage['replacePrev'] + '" width="16" height="16" id="wikEdReplacePrev" alt="' + wikEdText['wikEdReplacePrev alt'] + '" title="' + wikEdText['wikEdReplacePrev title'] + '" onClick="javascript:WikEdEditButton(\'wikEdReplacePrev\');">';
 
html += '<span class="wikEdReplaceComboInput" id="wikEdReplaceComboInput">';
html += '<input class="wikEdCombo" id="wikEdReplaceText" type="text" value="" onfocus="this.setSelectionRange(0, this.textLength);">';
html += '<select class="wikEdCombo" id="wikEdReplaceSelect" onfocus="WikEdSetComboOptions(\'replace\')" onChange="javascript:WikEdChangeComboInput(\'replace\');">';
html += '</select>';
html += '</span>';
 
html += '<img class="wikEdButton" src="' + wikEdImage['replaceNext'] + '" width="16" height="16" id="wikEdReplaceNext" alt="' + wikEdText['wikEdReplaceNext alt'] + '" title="' + wikEdText['wikEdReplaceNext title'] + '" onClick="javascript:WikEdEditButton(\'wikEdReplaceNext\');">';
html += '<img class="wikEdButtonUnchecked" src="' + wikEdImage['caseSensitive'] + '" width="16" height="16" id="wikEdCaseSensitive" alt="' + wikEdText['wikEdCaseSensitive alt'] + '" title="' + wikEdText['wikEdCaseSensitive title'] + '" onClick="javascript:WikEdButton(\'wikEdCaseSensitive\', true);">';
html += '<img class="wikEdButtonUnchecked" src="' + wikEdImage['regExp'] + '" width="16" height="16" id="wikEdRegExp" alt="' + wikEdText['wikEdRegExp alt'] + '" title="' + wikEdText['wikEdRegExp title'] + '" onClick="javascript:WikEdButton(\'wikEdRegExp\', true);">';
html += '<img class="wikEdButtonUnchecked" src="' + wikEdImage['findAhead'] + '" width="16" height="16" id="wikEdFindAhead" alt="' + wikEdText['wikEdFindAhead alt'] + '" title="' + wikEdText['wikEdFindAhead title'] + '" onClick="javascript:WikEdButton(\'wikEdFindAhead\', true);">';
html += '</div>';
 
// fixing buttons
html += MakeButtonBar(wikEdButtonBar['fix']);
html += '<div class="wikEdButtonsFix" id="wikEdButtonsFix">';
 
html += '<img class="wikEdButton" src="' + wikEdImage['fixBasic'] + '" width="16" height="16" id="wikEdFixBasic" alt="' + wikEdText['wikEdFixBasic alt'] + '" title="' + wikEdText['wikEdFixBasic title'] + '" onClick="javascript:WikEdEditButton(\'wikEdFixBasic\');">';
html += '<img class="wikEdButton" src="' + wikEdImage['fixHtml'] + '" width="16" height="16" id="wikEdFixHtml" alt="' + wikEdText['wikEdFixHtml alt'] + '" title="' + wikEdText['wikEdFixHtml title'] + '" onClick="javascript:WikEdEditButton(\'wikEdFixHtml\');">';
html += '<img class="wikEdButton" src="' + wikEdImage['fixCaps'] + '" width="16" height="16" id="wikEdFixCaps" alt="' + wikEdText['wikEdFixCaps alt'] + '" title="' + wikEdText['wikEdFixCaps title'] + '" onClick="javascript:WikEdEditButton(\'wikEdFixCaps\');">';
html += '<img class="wikEdButton" src="' + wikEdImage['fixUnicode'] + '" width="16" height="16" id="wikEdfixUnicode" alt="' + wikEdText['wikEdfixUnicode alt'] + '" title="' + wikEdText['wikEdfixUnicode title'] + '" onClick="javascript:WikEdEditButton(\'wikEdfixUnicode\');">';
html += '<img class="wikEdButton" src="' + wikEdImage['fixAll'] + '" width="16" height="16" id="wikEdFixAll" alt="' + wikEdText['wikEdFixAll alt'] + '" title="' + wikEdText['wikEdFixAll title'] + '" onClick="javascript:WikEdEditButton(\'wikEdFixAll\');">';
html += '<img class="wikEdButton" src="' + wikEdImage['fixRegExTypo'] + '" width="16" height="16" id="wikEdFixRegExTypo" alt="' + wikEdText['wikEdFixRegExTypo alt'] + '" title="' + wikEdText['wikEdFixRegExTypo title'] + '" onClick="javascript:WikEdEditButton(\'wikEdFixRegExTypo\');">';
html += '<br />';
 
html += '<img class="wikEdButton" src="' + wikEdImage['fixDash'] + '" width="16" height="16" id="wikEdFixDashes" alt="' + wikEdText['wikEdFixDashes alt'] + '" title="' + wikEdText['wikEdFixDashes title'] + '" onClick="javascript:WikEdEditButton(\'wikEdFixDashes\');">';
html += '<img class="wikEdButton" src="' + wikEdImage['fixPunct'] + '" width="16" height="16" id="wikEdFixPunct" alt="' + wikEdText['wikEdFixPunct alt'] + '" title="' + wikEdText['wikEdFixPunct title'] + '" onClick="javascript:WikEdEditButton(\'wikEdFixPunct\');">';
html += '<img class="wikEdButton" src="' + wikEdImage['fixMath'] + '" width="16" height="16" id="wikEdFixMath" alt="' + wikEdText['wikEdFixMath alt'] + '" title="' + wikEdText['wikEdFixMath title'] + '" onClick="javascript:WikEdEditButton(\'wikEdFixMath\');">';
html += '<img class="wikEdButton" src="' + wikEdImage['fixChem'] + '" width="16" height="16" id="wikEdFixChem" alt="' + wikEdText['wikEdFixChem alt'] + '" title="' + wikEdText['wikEdFixChem title'] + '" onClick="javascript:WikEdEditButton(\'wikEdFixChem\');">';
html += '<img class="wikEdButton" src="' + wikEdImage['fixUnits'] + '" width="16" height="16" id="wikEdFixUnits" alt="' + wikEdText['wikEdFixUnits alt'] + '" title="' + wikEdText['wikEdFixUnits title'] + '" onClick="javascript:WikEdEditButton(\'wikEdFixUnits\');">';
html += '</div>';
html += '<br style="clear: both;">';
 
Line 1,177 ⟶ 1,198:
 
// add preview box top bar to submit wrapper
 
 
 
var buttonsPreview = document.createElement('div');
buttonsPreview.id = 'wikEdButtonsPreview';
buttonsPreview.className = 'wikEdButtonsPreview';
 
html = MakeButtonBar(wikEdButtonBar['preview']);
html += '<img class="wikEdButton" src="' + wikEdImage['preview'] + '" width="16" height="16" id="wikEdPreview" alt="' + wikEdText['wikEdPreview alt'] + '" title="' + wikEdText['wikEdPreview title'] + '" onClick="javascript:WikEdButton(\'wikEdPreview\');">';
html += '<img class="wikEdButton" src="' + wikEdImage['diff'] + '" width="16" height="16" id="wikEdDiff" alt="' + wikEdText['wikEdDiff alt'] + '" title="' + wikEdText['wikEdDiff title'] + '" onClick="javascript:WikEdButton(\'wikEdDiff\');">';
html += '<img class="wikEdButton" src="' + wikEdImage['close'] + '" width="16" height="16" id="wikEdClose" alt="' + wikEdText['wikEdClose alt'] + '" title="' + wikEdText['wikEdClose title'] + '" onClick="javascript:WikEdButton(\'wikEdClose\');">';
html += '<img class="wikEdButton" src="' + wikEdImage['scrollToButtons'] + '" width="16" height="16" id="wikEdScrollToButtons2" alt="' + wikEdText['wikEdScrollToButtons2 alt'] + '" title="' + wikEdText['wikEdScrollToButtons2 title'] + '" onClick="javascript:WikEdButton(\'wikEdScrollToButtons2\');">';
html += '<img class="wikEdButton" src="' + wikEdImage['scrollToText'] + '" width="16" height="16" id="wikEdScrollToInput2" alt="' + wikEdText['wikEdScrollToInput2 alt'] + '" title="' + wikEdText['wikEdScrollToInput2 title'] + '" onClick="javascript:WikEdButton(\'wikEdScrollToInput2\');">';
 
buttonsPreview.innerHTML = html;
Line 1,198 ⟶ 1,217:
html += '</div>';
html += '</div>';
html += MakeButtonBar(wikEdButtonBar['preview2']);
 
html += '<div id="wikEdButtonsPreview2" class="wikEdButtonsPreview2">';
html += '<img class="wikEdButton" src="' + wikEdImage['preview'] + '" width="16" height="16" id="wikEdPreview2" alt="' + wikEdText['wikEdPreview2 alt'] + '" title="' + wikEdText['wikEdPreview2 title'] + '" onClick="javascript:WikEdButton(\'wikEdPreview2\');">';
html += '<img class="wikEdButton" src="' + wikEdImage['diff'] + '" width="16" height="16" id="wikEdDiff2" alt="' + wikEdText['wikEdDiff2 alt'] + '" title="' + wikEdText['wikEdDiff2 title'] + '" onClick="javascript:WikEdButton(\'wikEdDiff2\');">';
html += '<img class="wikEdButton" src="' + wikEdImage['close'] + '" width="16" height="16" id="wikEdClose2" alt="' + wikEdText['wikEdClose2 alt'] + '" title="' + wikEdText['wikEdClose2 title'] + '" onClick="javascript:WikEdButton(\'wikEdClose2\');">';
html += '<img class="wikEdButton" src="' + wikEdImage['scrollToButtons'] + '" width="16" height="16" id="wikEdScrollToButtons3" alt="' + wikEdText['wikEdScrollToButtons3 alt'] + '" title="' + wikEdText['wikEdScrollToButtons3 title'] + '" onClick="javascript:WikEdButton(\'wikEdScrollToButtons3\');">';
html += '<img class="wikEdButton" src="' + wikEdImage['scrollToText'] + '" width="16" height="16" id="wikEdScrollToInput3" alt="' + wikEdText['wikEdScrollToInput3 alt'] + '" title="' + wikEdText['wikEdScrollToInput3 title'] + '" onClick="javascript:WikEdButton(\'wikEdScrollToInput3\');">';
html += '</div>';
 
wikEdLocalPrevWrapper.innerHTML = html;
Line 1,220 ⟶ 1,232:
buttonsJump.className = 'wikEdButtonsJump';
 
html = MakeButtonBar(wikEdButtonBar['jump']);
html += '<img class="wikEdButtonSolo" src="' + wikEdImage['scrollToButtons'] + '" width="16" height="16" id="wikEdScrollToButtons4" alt="' + wikEdText['wikEdScrollToButtons4 alt'] + '" title="' + wikEdText['wikEdScrollToButtons4 title'] + '" onClick="javascript:WikEdButton(\'wikEdScrollToButtons4\');">';
html += '<img class="wikEdButtonSolo" src="' + wikEdImage['scrollToText'] + '" width="16" height="16" id="wikEdScrollToInput4" alt="' + wikEdText['wikEdScrollToInput4 alt'] + '" title="' + wikEdText['wikEdScrollToInput4 title'] + '" onClick="javascript:WikEdButton(\'wikEdScrollToInput4\');">';
 
buttonsJump.innerHTML = html;
Line 1,557 ⟶ 1,567:
 
return;
}
 
 
//
// MakeButtonBar: generate button bar html code
//
 
function MakeButtonBar(bar) {
 
var html = '<div id="' + bar[0] + '" class="' + bar[1] + '">';
for each (buttonNo in bar[2]) {
switch (buttonNo) {
case 'br':
html += '<br />';
break;
case 'find':
html += '<span class="wikEdFindComboInput" id="wikEdFindComboInput">';
html += '<input class="wikEdCombo" id="wikEdFindText" type="text" value="" onfocus="javascript:this.setSelectionRange(0, this.textLength);">';
html += '<select class="wikEdCombo" id="wikEdFindSelect" onfocus="javascript:WikEdSetComboOptions(\'find\')" onChange="javascript:WikEdChangeComboInput(\'find\');">';
html += '</select>';
html += '</span>';
break;
case 'replace':
html += '<span class="wikEdReplaceComboInput" id="wikEdReplaceComboInput">';
html += '<input class="wikEdCombo" id="wikEdReplaceText" type="text" value="" onfocus="this.setSelectionRange(0, this.textLength);">';
html += '<select class="wikEdCombo" id="wikEdReplaceSelect" onfocus="WikEdSetComboOptions(\'replace\')" onChange="javascript:WikEdChangeComboInput(\'replace\');">';
html += '</select>';
html += '</span>';
default:
if ( (wikEdButton[0] != 'wikEdSource') || (wikEdShowSourceButton == true) ) {
html += '<img id="' + wikEdButton[0] + '" class="' + wikEdButton[1] + '" title="' + wikEdButton[2] + '" src="' + wikEdButton[3] + '" width="' + wikEdButton[4] + '" height="' + wikEdButton[5] + '" alt="' + wikEdButton[6] + '" onClick="' + wikEdButton[7] + '">';
}
break;
}
}
html += '</div>';
return(html);
}
 
Line 1,999 ⟶ 2,046:
break;
 
// wikify, textify: selection / whole
case 'wikEdWikify':
case 'wikEdTextify':
WikEdGetText(obj, 'selection');
if (obj.selection.plain != '') {
Line 2,008 ⟶ 2,054:
else {
WikEdGetText(obj, 'whole');
obj.changed = obj.whole;
}
break;
 
// textify: selection / whole, without wikifying
case 'wikEdTextify':
WikEdGetText(obj, 'selection', true);
if (obj.selection.plain != '') {
obj.changed = obj.selection;
}
else {
WikEdGetText(obj, 'whole', true);
obj.changed = obj.whole;
}
Line 2,451 ⟶ 2,509:
// textify: strip html from pasted content
case 'wikEdTextify':
WikEdTextify(obj.changed);
var objTextify = {};
break;
 
 
// get inner html without wikifying
if (obj.changedselection.fromplain =!= 'whole') {
WikEdGetInnerHTML(objTextify, wikEdFrameBody);
}
else {
obj.selection.range = obj.sel.getRangeAt(obj.sel.rangeCount - 1);
var documentFragment = obj.selection.range.cloneContents();
WikEdGetInnerHTML(objTextify, documentFragment);
}
else {
WikEdTextify(objTextify);
obj.changed.plainfrom = objTextify.plain'whole';
obj.changed.range.setStartBefore(wikEdFrameBody.firstChild);
obj.changed.range.setEndAfter(wikEdFrameBody.lastChild);
WikEdGetInnerHTML(objTextify, wikEdFrameBody);
}
break;
 
Line 2,917 ⟶ 2,978:
//
 
function WikEdGetText(obj, whichFragment, noWikify) {
 
// get selection object
Line 2,951 ⟶ 3,012:
WikEdGetInnerHTML(obj.whole, wikEdFrameBody);
obj.whole.code = obj.whole.html;
WikEdRemoveHighlightingWikify(obj.whole, noWikify);
obj.whole.plain = obj.whole.html;
obj.whole.plain = obj.whole.plain.replace(/<br\b[^>]*>/g, '\n');
obj.whole.plain = obj.whole.plain.replace(/\u00a0/g, ' ');
obj.whole.range.setStartBefore(wikEdFrameBody.firstChild);
obj.whole.range.setEndAfter(wikEdFrameBody.lastChild);
}
}
Line 2,973 ⟶ 3,032:
WikEdGetInnerHTML(obj.selection, documentFragment);
obj.selection.code = obj.selection.html;
WikEdRemoveHighlightingWikify(obj.selection, noWikify);
obj.selection.plain = obj.selection.html;
obj.selection.plain = obj.selection.plain.replace(/<br\b[^>]*>/g, '\n');
Line 2,999 ⟶ 3,058:
WikEdGetInnerHTML(obj.focusWord, documentFragment);
obj.focusWord.code = obj.focusWord.html;
WikEdRemoveHighlightingWikify(obj.focusWord, noWikify);
obj.focusWord.plain = obj.focusWord.html;
obj.focusWord.plain = obj.focusWord.plain.replace(/<br\b[^>]*>/g, '\n');
Line 3,008 ⟶ 3,067:
WikEdGetInnerHTML(obj.focusLine, documentFragment);
obj.focusLine.code = obj.focusLine.html;
WikEdRemoveHighlightingWikify(obj.focusLine, noWikify);
obj.focusLine.plain = obj.focusLine.html;
obj.focusLine.plain = obj.focusLine.plain.replace(/<br\b[^>]*>/g, '\n');
Line 3,036 ⟶ 3,095:
WikEdGetInnerHTML(obj.selectionWord, documentFragment);
obj.selectionWord.code = obj.selectionWord.html;
WikEdRemoveHighlightingWikify(obj.selectionWord, noWikify);
obj.selectionWord.plain = obj.selectionWord.html;
obj.selectionWord.plain = obj.selectionWord.plain.replace(/<br\b[^>]*>/g, '\n');
Line 3,045 ⟶ 3,104:
WikEdGetInnerHTML(obj.selectionLine, documentFragment);
obj.selectionLine.code = obj.selectionLine.html;
WikEdRemoveHighlightingWikify(obj.selectionLine, noWikify);
obj.selectionLine.plain = obj.selectionLine.html;
obj.selectionLine.plain = obj.selectionLine.plain.replace(/<br\b[^>]*>/g, '\n');
Line 3,149 ⟶ 3,208:
}
 
// foundRanges.push(obj.changed.range.cloneRange());
/// return(foundRanges);
 
//
Line 3,986 ⟶ 4,043:
//
 
function WikEdRemoveHighlightingWikify(obj, noWikify) {
 
if (obj.html != '') {
Line 3,994 ⟶ 4,051:
 
// wikify, don't allow many attributes
if ( (obj.htmlCode == true) && (noWikify != true) ) {
WikEdWikifyHTML(obj, false);
}
Line 4,877 ⟶ 4,934:
 
// <nowiki> <math> <noinclude> <includeonly> <ref> <references> wiki markup
obj.html = obj.html.replace(/((&lt;)(nowiki|math|gallery|noinclude|includeonly|ref|references)\b.*?(&gt;)(.*?)(&lt;)\/(nowiki|math|gallery|noinclude|includeonly|ref|references)\3\b.*?(&gt;))/gi, '<span class="wikEdWiki">$1</span><!--wikEdWiki-->');
 
// URLs, allowed chars: \w / . & ? = - @ # % ~ + (; allowed because of &amp; and common misuse)
Line 4,886 ⟶ 4,943:
}
);
 
// URLs with text
obj.html = obj.html.replace(/(\[)( *<span class=\"wikEdURLLink\">.*?<\!--wikEdURLLink--> *)([^\]\n]*?)( *\])/gi,
Line 4,901 ⟶ 4,957:
}
);
 
// [[Image: ]] images
var regExpImg = new RegExp('(\\[\\[)(' + wikEdText['wikicode Image'] + ' *: *)([^\\]\\[\\|]*? *)(\\|(\\[[^\\]]*\\]|\\[\\[[^\\]]*\\]\\]|[^\\[\\]\\|]+|\\|)*)(\\]\\])', 'gi');