<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://physikerwelt.de:8080/w/index.php?action=history&amp;feed=atom&amp;title=User%3ASchubotz%2Fvector.js</id>
	<title>User:Schubotz/vector.js - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://physikerwelt.de:8080/w/index.php?action=history&amp;feed=atom&amp;title=User%3ASchubotz%2Fvector.js"/>
	<link rel="alternate" type="text/html" href="https://physikerwelt.de:8080/w/index.php?title=User:Schubotz/vector.js&amp;action=history"/>
	<updated>2026-05-24T03:26:27Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.0-wmf.28</generator>
	<entry>
		<id>https://physikerwelt.de:8080/w/index.php?title=User:Schubotz/vector.js&amp;diff=2303&amp;oldid=prev</id>
		<title>Schubotz: Die Seite wurde neu angelegt: „  // define  custom buttons (id, class, popup title, image src, width, height, alt text, onClick and parameters) var wikEdButton = {}; wikEdButton[100] = [&#039;wikEdD…“</title>
		<link rel="alternate" type="text/html" href="https://physikerwelt.de:8080/w/index.php?title=User:Schubotz/vector.js&amp;diff=2303&amp;oldid=prev"/>
		<updated>2010-08-30T11:13:32Z</updated>

		<summary type="html">&lt;p&gt;Die Seite wurde neu angelegt: „  // define  custom buttons (id, class, popup title, image src, width, height, alt text, onClick and parameters) var wikEdButton = {}; wikEdButton[100] = [&amp;#039;wikEdD…“&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
// define  custom buttons (id, class, popup title, image src, width, height, alt text, onClick and parameters)&lt;br /&gt;
var wikEdButton = {};&lt;br /&gt;
wikEdButton[100] = [&amp;#039;wikEdDiv&amp;#039;, &amp;#039;wikEdButton&amp;#039;, &amp;#039;Make the selection a html DIV element&amp;#039;, &amp;#039;http://upload.wikimedia.org/wikipedia/commons/6/67/WikEd_logo.png&amp;#039;, &amp;#039;16&amp;#039;, &amp;#039;16&amp;#039;, &amp;#039;DIV&amp;#039;, &amp;#039;javascript:WikEdEditButton(this, this.id, null, TestHandler);&amp;#039; ];&lt;br /&gt;
wikEdButton[101] = [&amp;#039;wikEdTest&amp;#039;, &amp;#039;wikEdButton&amp;#039;, &amp;#039;This is a test button&amp;#039;, &amp;#039;http://upload.wikimedia.org/wikipedia/commons/0/07/WikEd_disabled.png&amp;#039;, &amp;#039;16&amp;#039;, &amp;#039;16&amp;#039;, &amp;#039;Test&amp;#039;, &amp;#039;javascript:WikEdEditButton(this, this.id, null, TestHandler);&amp;#039; ];&lt;br /&gt;
&lt;br /&gt;
// define custom button bars (id outer, class outer, id inner, class inner, height, grip title, button numbers)&lt;br /&gt;
var wikEdButtonBar = {};&lt;br /&gt;
wikEdButtonBar[&amp;#039;custom1&amp;#039;] = [&amp;#039;wikEdButtonBarCustom1&amp;#039;,  &amp;#039;wikEdButtonBarCustom1&amp;#039;,  &amp;#039;wikEdButtonsCustom1&amp;#039;,  &amp;#039;wikEdButtonsCustom1&amp;#039;,  44, &amp;#039;My custom buttons&amp;#039;, [100, &amp;#039;br&amp;#039;, 101] ];&lt;br /&gt;
wikEdButtonBar[&amp;#039;custom2&amp;#039;] = [&amp;#039;wikEdButtonBarCustom2&amp;#039;,  &amp;#039;wikEdButtonBarCustom2&amp;#039;,  &amp;#039;wikEdButtonsCustom2&amp;#039;,  &amp;#039;wikEdButtonsCustom2&amp;#039;,  44, &amp;#039;My custom buttons&amp;#039;, [100, &amp;#039;br&amp;#039;, 101] ];&lt;br /&gt;
&lt;br /&gt;
// define the function which is called upon clicking the custom button&lt;br /&gt;
// this example code adds or removes div tags around the selected text&lt;br /&gt;
&lt;br /&gt;
function TestHandler(obj) {&lt;br /&gt;
&lt;br /&gt;
// select the appropriate text change target (whole, selection, cursor, focusWord, focusLine, selectionWord, or selectionLine)&lt;br /&gt;
//   focus... is the text under the cursor; ...Word and ...Line extend the target to the start/end of the word or line&lt;br /&gt;
WikEdGetText(obj, &amp;#039;selection, cursor&amp;#039;);&lt;br /&gt;
if (obj.selection.plain != &amp;#039;&amp;#039;) {&lt;br /&gt;
obj.changed = obj.selection;&lt;br /&gt;
}&lt;br /&gt;
else {&lt;br /&gt;
obj.changed = obj.cursor;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// make the changes to the plain target text&lt;br /&gt;
&lt;br /&gt;
// remove the previously added formatting&lt;br /&gt;
if ( /&amp;amp;lt;div&amp;amp;gt;(.*?)&amp;amp;lt;\/div&amp;amp;gt;/i.test(obj.changed.plain) ) {&lt;br /&gt;
obj.changed.plain = obj.changed.plain.replace(/&amp;amp;lt;div&amp;amp;gt;(.*?)&amp;amp;lt;\/div&amp;amp;gt;/gi, &amp;#039;$1&amp;#039;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// add the text formatting&lt;br /&gt;
else {&lt;br /&gt;
obj.changed.plain = &amp;#039;&amp;amp;lt;div&amp;amp;gt;&amp;#039; + obj.changed.plain + &amp;#039;&amp;amp;lt;/div&amp;amp;gt;&amp;#039;;&lt;br /&gt;
obj.changed.plain = obj.changed.plain.replace(/(&amp;amp;lt;div&amp;amp;gt;)( *)(.*?)( *)(&amp;amp;lt;\/div&amp;amp;gt;)/, &amp;#039;$2$1$3$5$4&amp;#039;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// keep the changed text selected, needed to remove the formatting with a second custom button click&lt;br /&gt;
obj.changed.keepSel = true;&lt;br /&gt;
&lt;br /&gt;
return;&lt;br /&gt;
}&lt;/div&gt;</summary>
		<author><name>Schubotz</name></author>
	</entry>
</feed>