var tabbedPane= false;

bbcodeMarkupSet = [   
    {type:'tab', text:'Text formattieren', //tooltip:'Format menu', icon:'gfx/markup/application_view_icons.png', 
      menu:[ 
    
    {tooltip:'Fett', type:'button', key:'B', tag:'b', plainAction:{ openWith:'[b]', closeWith:'[/b]'}, icon:'gfx/markup/bold.png', richAction:{ command:'bold'}},
    {tooltip:'Kursiv', type:'button', key:'I', tag:'i', plainAction:{ openWith:'[i]', closeWith:'[/i]'}, icon:'gfx/markup/italic.png', richAction:{ command:'italic'}},
    {tooltip:'Unterstreichen', type:'button', key:'U', tag:'u', plainAction:{ openWith:'[u]', closeWith:'[/u]'}, icon:'gfx/markup/underline.png', richAction:{ command:'underline'}},
    {tooltip:'Durchstreichen', type:'button', key:'S', tag:'s', plainAction:{ openWith:'[s]', closeWith:'[/s]'}, icon:'gfx/markup/strikethrough.png', richAction:{ command:'strikethrough'}},
    //{type:'separator' },
    //{tooltip:'Linksbündig', type:'button', tag:'align', plainAction:{ openWith:'[align=left]', closeWith:'[/align]'}, icon:'gfx/markup/align_left.png', richAction:{ command:'justifyleft'}},
    //{tooltip:'Zentriert', type:'button', tag:'align', plainAction:{ openWith:'[align=center]', closeWith:'[/align]'}, icon:'gfx/markup/align_center.png', richAction:{ command:'justifycenter'}},
    //{tooltip:'Rechtsbündig', type:'button', tag:'align', plainAction:{ openWith:'[align=right]', closeWith:'[/align]'}, icon:'gfx/markup/align_right.png', richAction:{ command:'justifyright'}},
    {type:'separator' },
    {tooltip:'Bild', type:'button', key:'P', tag:'img', plainAction:{ replaceWith:'[img][![Please type in the image url:!:http://]!][/img]'}, icon:'gfx/markup/picture.png', richAction:{ command:'insertimage', value:'[![Please type in the image url:!:http://]!]'}},
    {tooltip:'Link', type:'button', key:'L', tag:'url', plainAction:{ openWith:'[url=[![Please type in the link url:!:http://]!]]', closeWith:'[/url]', placeHolder:'Your text to link here...'}, icon:'gfx/markup/world_link.png', richAction:{ command:'createlink', value:'[![Please type in the link url:!:http://]!]'}},
    {tooltip:'Email', type:'button', key:'E', tag:'email', plainAction:{ openWith:'[email=[![Please type in the email address]!]]', closeWith:'[/email]', placeHolder:'Your text to link here...'}, icon:'gfx/markup/email_link.png', richAction:{ command:'createlink', value:'mailto:[![Please type in the email address]!]'}},
    {type:'separator' },
    {tooltip:'Liste', type:'button', tag:'list', plainAction:{ openWith:'[list=[![Please choose one of the item types "circle", "disc" and "square".:!:disc]!]]\n', closeWith:'\n[/list]'}, icon:'gfx/markup/list-bullet.png', richAction:{ command:'insertunorderedlist'}},
    {tooltip:'Geordnete Liste', type:'button', tag:'list', plainAction:{ openWith:'[list=[![Please choose one of the enum types "A", "a", "I", "i" and "1".]!]]\n', closeWith:'\n[/list]'}, icon:'gfx/markup/list-numeric.png', richAction:{ command:'insertorderedlist'}}, 
    {tooltip:'Listeneintrag', type:'button', tag:'\\*', plainAction:{ openWith:'[*] ', closeWith:'[/*]'}, icon:'gfx/markup/list-item.png'},
    {tooltip:'Einrücken', type:'button', icon:'gfx/markup/indent+.png', richAction:{ command:'indent'}}, 
    {tooltip:'Ausrücken', type:'button', icon:'gfx/markup/indent-.png', richAction:{ command:'outdent'}}, 
    {type:'separator' },
    {tooltip:'Schriftgröße', type:'button', tag:['size', 'font'], className:'block', plainAction:{ openWith:'[size=[![Please type in the text size (1 = tiny, ..., 7 = huge):!:3]!]]', closeWith:'[/size]'}, icon:'gfx/markup/fonts.png', richAction:{ command:'fontsize', value:'[![Please type in the text size (1 = tiny, ..., 7 = huge):!:3]!]'}, dropMenu:[
      //{text:'7 = XXL', type:'button', plainAction:{ openWith:'[size=7]', closeWith:'[/size]'}, richAction:{ command:'fontsize', value:'7'} },
      {text:'6 = Riesig', type:'button',  plainAction:{ openWith:'[size=6]', closeWith:'[/size]'}, richAction:{ command:'fontsize', value:'6'} },
      {text:'5 = Sehr groß', type:'button', plainAction:{ openWith:'[size=5]', closeWith:'[/size]'}, richAction:{ command:'fontsize', value:'5'} },
      {text:'4 = Groß', type:'button', plainAction:{ openWith:'[size=4]', closeWith:'[/size]'}, richAction:{ command:'fontsize', value:'4'} },
      {text:'3 = Normal', type:'button', plainAction:{ openWith:'[size=3]', closeWith:'[/size]'}, richAction:{ command:'fontsize', value:'3'} },
      {text:'2 = Klein', type:'button', plainAction:{ openWith:'[size=2]', closeWith:'[/size]'}, richAction:{ command:'fontsize', value:'2'} },
      {text:'1 = Winzig', type:'button', plainAction:{ openWith:'[size=1]', closeWith:'[/size]'}, richAction:{ command:'fontsize', value:'1'} }
    ]},
    {tooltip:'Schriftfarbe', type:'button', tag:['color', 'font'], className:'floating', plainAction:{ openWith:'[color=[![Choose a color\n(Standard names like "black", "white", "red", "green", "blue", ...\nor html color codes #rrggbb)]!]]', closeWith:'[/color]'}, icon:'gfx/markup/colors.png', richAction:{ command:'forecolor', value:'[![Choose a color\n(Standard names like "black", "white", "red", "green", "blue", ...\nor html color codes #rrggbb):!:red]!]'}, dropMenu:[
          {tooltip:'Rot', type:'button', plainAction:{ openWith:'[color=red]',   closeWith:'[/color]'}, style:'background-color: red;', richAction:{ command:'forecolor', value:'red'} },
          {tooltip:'Blau', type:'button', plainAction:{ openWith:'[color=blue]',  closeWith:'[/color]'}, style:'background-color: blue;', richAction:{ command:'forecolor', value:'blue'} },
          {tooltip:'Grün', type:'button', plainAction:{ openWith:'[color=green]',   closeWith:'[/color]'}, style:'background-color: green;', richAction:{ command:'forecolor', value:'green'} },
          {tooltip:'Gelb', type:'button', plainAction:{ openWith:'[color=yellow]',  closeWith:'[/color]'}, style:'background-color: yellow;', richAction:{ command:'forecolor', value:'yellow'} }, 
          {tooltip:'Magenta', type:'button', plainAction:{ openWith:'[color=magenta]',   closeWith:'[/color]'}, style:'background-color: magenta;', richAction:{ command:'forecolor', value:'magenta'} },
          
          {tooltip:'Dunkelrot', type:'button', plainAction:{ openWith:'[color=darkred]',   closeWith:'[/color]'}, style:'background-color: darkred;', richAction:{ command:'forecolor', value:'darkred'} },
          {tooltip:'Dunkelblau', type:'button', plainAction:{ openWith:'[color=darkblue]',  closeWith:'[/color]'}, style:'background-color: darkblue;', richAction:{ command:'forecolor', value:'darkblue'} },
          {tooltip:'Dunkelgrün', type:'button', plainAction:{ openWith:'[color=darkgreen]',   closeWith:'[/color]'}, style:'background-color: darkgreen;', richAction:{ command:'forecolor', value:'darkgreen'} },
          {tooltip:'Orange', type:'button', plainAction:{ openWith:'[color=orange]',  closeWith:'[/color]'}, style:'background-color: orange;', richAction:{ command:'forecolor', value:'orange'} },
          {tooltip:'Lila', type:'button', plainAction:{ openWith:'[color=purple]',  closeWith:'[/color]'}, style:'background-color: purple;', richAction:{ command:'forecolor', value:'purple'} },
            
          {tooltip:'Tomatenrot', type:'button', plainAction:{ openWith:'[color=tomato]',   closeWith:'[/color]'}, style:'background-color: tomato;', richAction:{ command:'forecolor', value:'tomato'} },
          {tooltip:'Hellblau', type:'button', plainAction:{ openWith:'[color=lightblue]',  closeWith:'[/color]'}, style:'background-color: lightblue;', richAction:{ command:'forecolor', value:'lightblue'} },
          {tooltip:'Lightgreen', type:'button', plainAction:{ openWith:'[color=lightgreen]',   closeWith:'[/color]'}, style:'background-color: lightgreen;', richAction:{ command:'forecolor', value:'lightgreen'} },
          {tooltip:'Oliv', type:'button', plainAction:{ openWith:'[color=olive]',  closeWith:'[/color]'}, style:'background-color: olive;', richAction:{ command:'forecolor', value:'olive'} },
          {tooltip:'Limettengrün', type:'button', plainAction:{ openWith:'[color=lime]',   closeWith:'[/color]'}, style:'background-color: lime;', richAction:{ command:'forecolor', value:'lime'} },
          
          {tooltip:'Pink', type:'button', plainAction:{ openWith:'[color=pink]',   closeWith:'[/color]'}, style:'background-color: pink;', richAction:{ command:'forecolor', value:'pink'} },
          {tooltip:'Türkis', type:'button', plainAction:{ openWith:'[color=cyan]',   closeWith:'[/color]'}, style:'background-color: cyan;', richAction:{ command:'forecolor', value:'cyan'} },
          {tooltip:'Teal', type:'button', plainAction:{ openWith:'[color=teal]',  closeWith:'[/color]'}, style:'background-color: teal;', richAction:{ command:'forecolor', value:'teal'} },          
          {tooltip:'Braun', type:'button', plainAction:{ openWith:'[color=brown]',  closeWith:'[/color]'}, style:'background-color: brown;', richAction:{ command:'forecolor', value:'brown'} }, 
          {tooltip:'Beige', type:'button', plainAction:{ openWith:'[color=beige]',  closeWith:'[/color]'}, style:'background-color: beige;', richAction:{ command:'forecolor', value:'beige'} }, 
          
          {tooltip:'Gold', type:'button', plainAction:{ openWith:'[color=gold]',   closeWith:'[/color]'}, style:'background-color: gold;', richAction:{ command:'forecolor', value:'gold'} },
          {tooltip:'Silber', type:'button', plainAction:{ openWith:'[color=silver]',   closeWith:'[/color]'}, style:'background-color: silver;', richAction:{ command:'forecolor', value:'silver'} },
          {tooltip:'Weiß', type:'button', plainAction:{ openWith:'[color=white]',   closeWith:'[/color]'}, style:'background-color: white;', richAction:{ command:'forecolor', value:'white'} },
          {tooltip:'Grau', type:'button', plainAction:{ openWith:'[color=gray]',  closeWith:'[/color]'}, style:'background-color: gray;', richAction:{ command:'forecolor', value:'gray'} },
          {tooltip:'Schwarz', type:'button', plainAction:{ openWith:'[color=black]',   closeWith:'[/color]'}, style:'background-color: black;', richAction:{ command:'forecolor', value:'black'} },
    ]},
    {type:'separator' },
    {tooltip:'Quotes', type:'button', tag:'quote', plainAction:{ openWith:'[quote]', closeWith:'[/quote]'}, icon:'gfx/markup/quotes.png'},
    {tooltip:'Code', type:'button', tag:'code', plainAction:{ openWith:'[code]', closeWith:'[/code]'}, icon:'gfx/markup/code.png'}, 
    {type:'separator' },
    {tooltip:'Formattierung entfernen', type:'button', className:'clean', plainAction:{ replaceWith:function(markup) { return markup.selection.replace(/\[(.*?)\]/g, '') }}, icon:'gfx/markup/clean.png', richAction:{ command:'removeformat'} },
    {type:'separator' }
    ]},
    /*
    {tooltip:'Forms search menu', type:'tab', icon:'gfx/markup/application_form.png', menu:[   
          {tooltip:'Script name', type:'combobox', id:'scriptchooser', editable:false, queryScript:'ajax/onlinehilfe.php', queryParams:{cmd:'get_script'}, style:'background-color:#FFF4E2; width:150px;', change:function(editor,value) { $("#fieldchooser").load('ajax/onlinehilfe.php', {cmd:'get_field', script:value}); }},
          {text:'Script name', type:'label', forID:'scriptchooser' },//, style:'background-color:#FFF4E2; color:orange; width:80px;'
          {tooltip:'Form field', type:'combobox', id:'fieldchooser', editable:false, style:'background-color:#FFF4E2; width:150px;',  change:function(editor,value) { editor.loadBBCode('ajax/onlinehilfe.php', {cmd:'get_info', id:value}); }},
          {text:'Form field', type:'label', forID:'fieldchooser' },//, style:'background-color:white; width:80px;'
          ]},*/
    
    {type:'tab', text:'Bestehende Texte wählen', //tooltip:'Search menu', icon:'gfx/markup/application_form.png', 
      menu:[
          {tooltip:'Script-Name', type:'combobox', id:'scriptchooser', editable:false, queryScript:'ajax/onlinehilfe.php', queryParams:{cmd:'get_script_field',fieldname:'',fieldlabel:''}, style:'background-color:#FFF4E2; width:100%;', change:function(editor,value) { editor.loadBBCode('ajax/onlinehilfe.php', {cmd:'get_info', id:value}); }}
          //{text:'Form field', type:'label', forID:'fieldchooser' },//, style:'background-color:white; width:80px;'
          ]}
  ];

bbcodeRTEditorSet = [   
    {tooltip:'Markup', type:'tab', icon:'gfx/markup/application_view_icons.png', menu:[ 
    
    {tooltip:'Fett', type:'button', key:'B', tag:'b', plainAction:{ openWith:'[b]', closeWith:'[/b]'}, icon:'gfx/markup/bold.png', richAction:{ command:'bold'}},
    {tooltip:'Kursiv', type:'button', key:'I', tag:'i', plainAction:{ openWith:'[i]', closeWith:'[/i]'}, icon:'gfx/markup/italic.png', richAction:{ command:'italic'}},
    {tooltip:'Unterstreichen', type:'button', key:'U', tag:'u', plainAction:{ openWith:'[u]', closeWith:'[/u]'}, icon:'gfx/markup/underline.png', richAction:{ command:'underline'}},
    //{tooltip:'Durchstreichen', type:'button', key:'S', plainAction:{ openWith:'[s]', closeWith:'[/s]'}, icon:'gfx/markup/strikethrough.png', richAction:{ command:'strikethrough'}},
    /*{type:'separator' },
    {tooltip:'Linksbündig', type:'button', plainAction:{ openWith:'[align=left]', closeWith:'[/align]'}, icon:'gfx/markup/align_left.png', richAction:{ command:'justifyleft'}},
    {tooltip:'Zentriert', type:'button', plainAction:{ openWith:'[align=center]', closeWith:'[/align]'}, icon:'gfx/markup/align_center.png', richAction:{ command:'justifycenter'}},
    {tooltip:'Rechtsbündig', type:'button', plainAction:{ openWith:'[align=right]', closeWith:'[/align]'}, icon:'gfx/markup/align_right.png', richAction:{ command:'justifyright'}},
    */{type:'separator' },
    {tooltip:'Tabelle', type:'button', key:'T', tag:['table','tr','th','td'], plainAction:{ replaceWith:'[table]\n[tr][td] [/td][td] [/td][/tr]\n[tr][td] [/td][td] [/td][/tr]\n[/table]'}, icon:'gfx/markup/table.png', richAction:{ command:'createtable'} },
    {tooltip:'Bild', type:'button', key:'P', tag:'img', plainAction:{ replaceWith:'[img][![Please type in the image url:!:http://]!][/img]'}, icon:'gfx/markup/picture.png', richAction:{ command:'insertimage', value:'[![Please type in the image url:!:http://]!]'}},
    {tooltip:'Link', type:'button', key:'L', tag:'url', plainAction:{ openWith:'[url=[![Please type in the link url:!:http://]!]]', closeWith:'[/url]', placeHolder:'Your text to link here...'}, icon:'gfx/markup/world_link.png', richAction:{ command:'createlink', value:'[![Please type in the link url:!:http://]!]'}},
    //{tooltip:'Email', type:'button', key:'E', plainAction:{ openWith:'[email=[![Please type in the email address]!]]', closeWith:'[/email]', placeHolder:'Your text to link here...'}, icon:'gfx/markup/email_link.png', richAction:{ command:'createlink', value:'mailto:[![Please type in the email address]!]'}},
    {type:'separator' },
    {tooltip:'Liste', type:'button', tag:'list', plainAction:{ openWith:'[list=[![Please choose one of the item types "circle", "disc" and "square".:!:disc]!]]\n', closeWith:'\n[/list]'}, icon:'gfx/markup/list-bullet.png', richAction:{ command:'insertunorderedlist'}},
    {tooltip:'Geordnete Liste', type:'button', plainAction:{ openWith:'[list=[![Please choose one of the enum types "A", "a", "I", "i" and "1".]!]]\n', closeWith:'\n[/list]'}, icon:'gfx/markup/list-numeric.png', richAction:{ command:'insertorderedlist'}}, 
    {tooltip:'Listeneintrag', type:'button', tag:'\\*', plainAction:{ openWith:'[*] ', closeWith:'[/*]'}, icon:'gfx/markup/list-item.png'},
    {tooltip:'Einrücken', type:'button', icon:'gfx/markup/indent+.png', richAction:{ command:'indent'}}, 
    {tooltip:'Ausrücken', type:'button', icon:'gfx/markup/indent-.png', richAction:{ command:'outdent'}}, 
    {type:'separator' },
    {tooltip:'Schriftgröße', type:'button', key:'S', tag:['size', 'font'], className:'block', plainAction:{ openWith:'[size=[![Please type in the text size (1 = tiny, ..., 7 = huge):!:3]!]]', closeWith:'[/size]'}, icon:'gfx/markup/fonts.png', richAction:{ command:'fontsize', value:'[![Please type in the text size (1 = tiny, ..., 7 = huge):!:3]!]'}, dropMenu:[
      //{text:'7 = XXL', type:'button', plainAction:{ openWith:'[size=7]', closeWith:'[/size]'}, richAction:{ command:'fontsize', value:'7'} },
      {text:'6 = Riesig', type:'button',  plainAction:{ openWith:'[size=6]', closeWith:'[/size]'}, richAction:{ command:'fontsize', value:'6'} },
      {text:'5 = Sehr groß', type:'button', plainAction:{ openWith:'[size=5]', closeWith:'[/size]'}, richAction:{ command:'fontsize', value:'5'} },
      {text:'4 = Groß', type:'button', plainAction:{ openWith:'[size=4]', closeWith:'[/size]'}, richAction:{ command:'fontsize', value:'4'} },
      {text:'3 = Normal', type:'button', plainAction:{ openWith:'[size=3]', closeWith:'[/size]'}, richAction:{ command:'fontsize', value:'3'} },
      {text:'2 = Klein', type:'button', plainAction:{ openWith:'[size=2]', closeWith:'[/size]'}, richAction:{ command:'fontsize', value:'2'} },
      {text:'1 = Winzig', type:'button', plainAction:{ openWith:'[size=1]', closeWith:'[/size]'}, richAction:{ command:'fontsize', value:'1'} }
    ]},
    {tooltip:'Schriftfarbe', type:'button', tag:['color', 'font'], className:'floating', plainAction:{ openWith:'[color=[![Choose a color\n(Standard names like "black", "white", "red", "green", "blue", ...\nor html color codes #rrggbb)]!]]', closeWith:'[/color]'}, icon:'gfx/markup/colors.png', richAction:{ command:'forecolor', value:'[![Choose a color\n(Standard names like "black", "white", "red", "green", "blue", ...\nor html color codes #rrggbb):!:red]!]'}, dropMenu:[
          {tooltip:'Magenta', type:'button', plainAction:{ openWith:'[color=magenta]',   closeWith:'[/color]'}, style:'background-color: magenta;', richAction:{ command:'forecolor', value:'magenta'} },
          {tooltip:'Dunkelrot', type:'button', plainAction:{ openWith:'[color=darkred]',   closeWith:'[/color]'}, style:'background-color: darkred;', richAction:{ command:'forecolor', value:'darkred'} },
          {tooltip:'Rot', type:'button', plainAction:{ openWith:'[color=red]',   closeWith:'[/color]'}, style:'background-color: red;', richAction:{ command:'forecolor', value:'red'} },
          {tooltip:'Tomatenrot', type:'button', plainAction:{ openWith:'[color=tomato]',   closeWith:'[/color]'}, style:'background-color: tomato;', richAction:{ command:'forecolor', value:'tomato'} },
          {tooltip:'Pink', type:'button', plainAction:{ openWith:'[color=pink]',   closeWith:'[/color]'}, style:'background-color: pink;', richAction:{ command:'forecolor', value:'pink'} },
            
          {tooltip:'Limettengrün', type:'button', plainAction:{ openWith:'[color=lime]',   closeWith:'[/color]'}, style:'background-color: lime;', richAction:{ command:'forecolor', value:'lime'} },
          {tooltip:'Lightgreen', type:'button', plainAction:{ openWith:'[color=lightgreen]',   closeWith:'[/color]'}, style:'background-color: lightgreen;', richAction:{ command:'forecolor', value:'lightgreen'} },
          {tooltip:'Grün', type:'button', plainAction:{ openWith:'[color=green]',   closeWith:'[/color]'}, style:'background-color: green;', richAction:{ command:'forecolor', value:'green'} },
          {tooltip:'Dunkelgrün', type:'button', plainAction:{ openWith:'[color=darkgreen]',   closeWith:'[/color]'}, style:'background-color: darkgreen;', richAction:{ command:'forecolor', value:'darkgreen'} },
          {tooltip:'Oliv', type:'button', plainAction:{ openWith:'[color=olive]',  closeWith:'[/color]'}, style:'background-color: olive;', richAction:{ command:'forecolor', value:'olive'} },
          
          {tooltip:'Lila', type:'button', plainAction:{ openWith:'[color=purple]',  closeWith:'[/color]'}, style:'background-color: purple;', richAction:{ command:'forecolor', value:'purple'} },
          {tooltip:'Dunkelblau', type:'button', plainAction:{ openWith:'[color=darkblue]',  closeWith:'[/color]'}, style:'background-color: darkblue;', richAction:{ command:'forecolor', value:'darkblue'} },
          {tooltip:'Blau', type:'button', plainAction:{ openWith:'[color=blue]',  closeWith:'[/color]'}, style:'background-color: blue;', richAction:{ command:'forecolor', value:'blue'} },
          {tooltip:'Hellblau', type:'button', plainAction:{ openWith:'[color=lightblue]',  closeWith:'[/color]'}, style:'background-color: lightblue;', richAction:{ command:'forecolor', value:'lightblue'} },
          {tooltip:'Türkis', type:'button', plainAction:{ openWith:'[color=cyan]',   closeWith:'[/color]'}, style:'background-color: cyan;', richAction:{ command:'forecolor', value:'cyan'} },
          
          {tooltip:'Braun', type:'button', plainAction:{ openWith:'[color=brown]',  closeWith:'[/color]'}, style:'background-color: brown;', richAction:{ command:'forecolor', value:'brown'} },
          {tooltip:'Beige', type:'button', plainAction:{ openWith:'[color=beige]',  closeWith:'[/color]'}, style:'background-color: beige;', richAction:{ command:'forecolor', value:'beige'} },  
          {tooltip:'Orange', type:'button', plainAction:{ openWith:'[color=orange]',  closeWith:'[/color]'}, style:'background-color: orange;', richAction:{ command:'forecolor', value:'orange'} },
          {tooltip:'Gelb', type:'button', plainAction:{ openWith:'[color=yellow]',  closeWith:'[/color]'}, style:'background-color: yellow;', richAction:{ command:'forecolor', value:'yellow'} }, 
          {tooltip:'Teal', type:'button', plainAction:{ openWith:'[color=teal]',  closeWith:'[/color]'}, style:'background-color: teal;', richAction:{ command:'forecolor', value:'teal'} },
          
          {tooltip:'Gold', type:'button', plainAction:{ openWith:'[color=gold]',   closeWith:'[/color]'}, style:'background-color: gold;', richAction:{ command:'forecolor', value:'gold'} },
          {tooltip:'Silber', type:'button', plainAction:{ openWith:'[color=silver]',   closeWith:'[/color]'}, style:'background-color: silver;', richAction:{ command:'forecolor', value:'silver'} },
          {tooltip:'Weiß', type:'button', plainAction:{ openWith:'[color=white]',   closeWith:'[/color]'}, style:'background-color: white;', richAction:{ command:'forecolor', value:'white'} },
          {tooltip:'Grau', type:'button', plainAction:{ openWith:'[color=gray]',  closeWith:'[/color]'}, style:'background-color: gray;', richAction:{ command:'forecolor', value:'gray'} },
          {tooltip:'Schwarz', type:'button', plainAction:{ openWith:'[color=black]',   closeWith:'[/color]'}, style:'background-color: black;', richAction:{ command:'forecolor', value:'black'} },
    ]},
    //{type:'separator' },
    //{tooltip:'Quotes', type:'button', plainAction:{ openWith:'[quote]', closeWith:'[/quote]'}, icon:'gfx/markup/quotes.png'},
    //{tooltip:'Code', type:'button', plainAction:{ openWith:'[code]', closeWith:'[/code]'}, icon:'gfx/markup/code.png'}, 
    {type:'separator' },
    {tooltip:'Formattierung entfernen', type:'button', className:'clean', plainAction:{ replaceWith:function(markup) { return markup.selection.replace(/\[(.*?)\]/g, '') }}, icon:'gfx/markup/clean.png', richAction:{ command:'removeformat'} },
    {type:'separator' }
    ]}
  ];
  
adminMarkupSet = [   
    {tooltip:'Markup', type:'tab', icon:'gfx/markup/application_view_icons.png', menu:[ 
    
    {tooltip:'Fett', type:'button', key:'B', tag:'b', plainAction:{ openWith:'[b]', closeWith:'[/b]'}, icon:'gfx/markup/bold.png', richAction:{ command:'bold'}},
    {tooltip:'Kursiv', type:'button', key:'I', tag:'i', plainAction:{ openWith:'[i]', closeWith:'[/i]'}, icon:'gfx/markup/italic.png', richAction:{ command:'italic'}},
    {tooltip:'Unterstreichen', type:'button', key:'U', tag:'u', plainAction:{ openWith:'[u]', closeWith:'[/u]'}, icon:'gfx/markup/underline.png', richAction:{ command:'underline'}},
    {tooltip:'Durchstreichen', type:'button', key:'S', tag:'s', plainAction:{ openWith:'[s]', closeWith:'[/s]'}, icon:'gfx/markup/strikethrough.png', richAction:{ command:'strikethrough'}},
    //{type:'separator' },
    //{tooltip:'Linksbündig', type:'button', tag:'align', plainAction:{ openWith:'[align=left]', closeWith:'[/align]'}, icon:'gfx/markup/align_left.png', richAction:{ command:'justifyleft'}},
    //{tooltip:'Zentriert', type:'button', tag:'align', plainAction:{ openWith:'[align=center]', closeWith:'[/align]'}, icon:'gfx/markup/align_center.png', richAction:{ command:'justifycenter'}},
    //{tooltip:'Rechtsbündig', type:'button', tag:'align', plainAction:{ openWith:'[align=right]', closeWith:'[/align]'}, icon:'gfx/markup/align_right.png', richAction:{ command:'justifyright'}},
    {type:'separator' },//,'cols','col'
    {tooltip:'Table', type:'button', key:'T', tag:['table','tr','th','td'], plainAction:{ replaceWith:'[table]\n[tr][td] [/td][td] [/td][/tr]\n[tr][td] [/td][td] [/td][/tr]\n[/table]'}, icon:'gfx/markup/table.png', richAction:{ command:'createtable'} },
    {tooltip:'Bild', type:'button', key:'P', tag:'img', plainAction:{ replaceWith:'[img][![Please type in the image url:!:http://]!][/img]'}, icon:'gfx/markup/picture.png', richAction:{ command:'insertimage', value:'[![Please type in the image url:!:http://]!]'}},
    {tooltip:'Link', type:'button', key:'L', tag:'url', plainAction:{ openWith:'[url=[![Please type in the link url:!:http://]!]]', closeWith:'[/url]', placeHolder:'Your text to link here...'}, icon:'gfx/markup/world_link.png', richAction:{ command:'createlink', value:'[![Please type in the link url:!:http://]!]'}},
    {tooltip:'Email', type:'button', key:'E', tag:'email', plainAction:{ openWith:'[email=[![Please type in the email address]!]]', closeWith:'[/email]', placeHolder:'Your text to link here...'}, icon:'gfx/markup/email_link.png', richAction:{ command:'createlink', value:'mailto:[![Please type in the email address]!]'}},
    {type:'separator' },
    {tooltip:'Liste', type:'button', tag:'list', plainAction:{ openWith:'[list=[![Please choose one of the item types "circle", "disc" and "square".:!:disc]!]]\n', closeWith:'\n[/list]'}, icon:'gfx/markup/list-bullet.png', richAction:{ command:'insertunorderedlist'}},
    {tooltip:'Geordnete Liste', type:'button', tag:'list', plainAction:{ openWith:'[list=[![Please choose one of the enum types "A", "a", "I", "i" and "1".]!]]\n', closeWith:'\n[/list]'}, icon:'gfx/markup/list-numeric.png', richAction:{ command:'insertorderedlist'}}, 
    {tooltip:'Listeneintrag', type:'button', tag:'\\*', plainAction:{ openWith:'[*] ', closeWith:'[/*]'}, icon:'gfx/markup/list-item.png'},
    {tooltip:'Einrücken', type:'button', icon:'gfx/markup/indent+.png', richAction:{ command:'indent'}}, 
    {tooltip:'Ausrücken', type:'button', icon:'gfx/markup/indent-.png', richAction:{ command:'outdent'}}, 
    {type:'separator' },
    {tooltip:'Schriftgröße', type:'button', key:'S', tag:['size', 'font'], className:'block', plainAction:{ openWith:'[size=[![Please type in the text size (1 = tiny, ..., 7 = huge):!:3]!]]', closeWith:'[/size]'}, icon:'gfx/markup/fonts.png', richAction:{ command:'fontsize', value:'[![Please type in the text size (1 = tiny, ..., 7 = huge):!:3]!]'}, dropMenu:[
      {text:'7 = Viel zu groß', type:'button', plainAction:{ openWith:'[size=7]', closeWith:'[/size]'}, richAction:{ command:'fontsize', value:'7'} },
      {text:'6 = Riesig', type:'button',  plainAction:{ openWith:'[size=6]', closeWith:'[/size]'}, richAction:{ command:'fontsize', value:'6'} },
      {text:'5 = Sehr groß', type:'button', plainAction:{ openWith:'[size=5]', closeWith:'[/size]'}, richAction:{ command:'fontsize', value:'5'} },
      {text:'4 = Groß', type:'button', plainAction:{ openWith:'[size=4]', closeWith:'[/size]'}, richAction:{ command:'fontsize', value:'4'} },
      {text:'3 = Normal', type:'button', plainAction:{ openWith:'[size=3]', closeWith:'[/size]'}, richAction:{ command:'fontsize', value:'3'} },
      {text:'2 = Klein', type:'button', plainAction:{ openWith:'[size=2]', closeWith:'[/size]'}, richAction:{ command:'fontsize', value:'2'} },
      {text:'1 = Winzig', type:'button', plainAction:{ openWith:'[size=1]', closeWith:'[/size]'}, richAction:{ command:'fontsize', value:'1'} }
    ]},
    {tooltip:'Schriftfarbe', type:'button', tag:['color', 'font'], className:'floating', plainAction:{ openWith:'[color=[![Choose a color\n(Standard names like "black", "white", "red", "green", "blue", ...\nor html color codes #rrggbb)]!]]', closeWith:'[/color]'}, icon:'gfx/markup/colors.png', richAction:{ command:'forecolor', value:'[![Choose a color\n(Standard names like "black", "white", "red", "green", "blue", ...\nor html color codes #rrggbb):!:red]!]'}, dropMenu:[
          {tooltip:'Magenta', type:'button', plainAction:{ openWith:'[color=magenta]',   closeWith:'[/color]'}, style:'background-color: magenta;', richAction:{ command:'forecolor', value:'magenta'} },
          {tooltip:'Dunkelrot', type:'button', plainAction:{ openWith:'[color=darkred]',   closeWith:'[/color]'}, style:'background-color: darkred;', richAction:{ command:'forecolor', value:'darkred'} },
          {tooltip:'Rot', type:'button', plainAction:{ openWith:'[color=red]',   closeWith:'[/color]'}, style:'background-color: red;', richAction:{ command:'forecolor', value:'red'} },
          {tooltip:'Tomatenrot', type:'button', plainAction:{ openWith:'[color=tomato]',   closeWith:'[/color]'}, style:'background-color: tomato;', richAction:{ command:'forecolor', value:'tomato'} },
          {tooltip:'Pink', type:'button', plainAction:{ openWith:'[color=pink]',   closeWith:'[/color]'}, style:'background-color: pink;', richAction:{ command:'forecolor', value:'pink'} },
            
          {tooltip:'Limettengrün', type:'button', plainAction:{ openWith:'[color=lime]',   closeWith:'[/color]'}, style:'background-color: lime;', richAction:{ command:'forecolor', value:'lime'} },
          {tooltip:'Lightgreen', type:'button', plainAction:{ openWith:'[color=lightgreen]',   closeWith:'[/color]'}, style:'background-color: lightgreen;', richAction:{ command:'forecolor', value:'lightgreen'} },
          {tooltip:'Grün', type:'button', plainAction:{ openWith:'[color=green]',   closeWith:'[/color]'}, style:'background-color: green;', richAction:{ command:'forecolor', value:'green'} },
          {tooltip:'Dunkelgrün', type:'button', plainAction:{ openWith:'[color=darkgreen]',   closeWith:'[/color]'}, style:'background-color: darkgreen;', richAction:{ command:'forecolor', value:'darkgreen'} },
          {tooltip:'Oliv', type:'button', plainAction:{ openWith:'[color=olive]',  closeWith:'[/color]'}, style:'background-color: olive;', richAction:{ command:'forecolor', value:'olive'} },
          
          {tooltip:'Lila', type:'button', plainAction:{ openWith:'[color=purple]',  closeWith:'[/color]'}, style:'background-color: purple;', richAction:{ command:'forecolor', value:'purple'} },
          {tooltip:'Dunkelblau', type:'button', plainAction:{ openWith:'[color=darkblue]',  closeWith:'[/color]'}, style:'background-color: darkblue;', richAction:{ command:'forecolor', value:'darkblue'} },
          {tooltip:'Blau', type:'button', plainAction:{ openWith:'[color=blue]',  closeWith:'[/color]'}, style:'background-color: blue;', richAction:{ command:'forecolor', value:'blue'} },
          {tooltip:'Hellblau', type:'button', plainAction:{ openWith:'[color=lightblue]',  closeWith:'[/color]'}, style:'background-color: lightblue;', richAction:{ command:'forecolor', value:'lightblue'} },
          {tooltip:'Türkis', type:'button', plainAction:{ openWith:'[color=cyan]',   closeWith:'[/color]'}, style:'background-color: cyan;', richAction:{ command:'forecolor', value:'cyan'} },
          
          {tooltip:'Braun', type:'button', plainAction:{ openWith:'[color=brown]',  closeWith:'[/color]'}, style:'background-color: brown;', richAction:{ command:'forecolor', value:'brown'} },
          {tooltip:'Beige', type:'button', plainAction:{ openWith:'[color=beige]',  closeWith:'[/color]'}, style:'background-color: beige;', richAction:{ command:'forecolor', value:'beige'} },  
          {tooltip:'Orange', type:'button', plainAction:{ openWith:'[color=orange]',  closeWith:'[/color]'}, style:'background-color: orange;', richAction:{ command:'forecolor', value:'orange'} },
          {tooltip:'Gelb', type:'button', plainAction:{ openWith:'[color=yellow]',  closeWith:'[/color]'}, style:'background-color: yellow;', richAction:{ command:'forecolor', value:'yellow'} }, 
          {tooltip:'Teal', type:'button', plainAction:{ openWith:'[color=teal]',  closeWith:'[/color]'}, style:'background-color: teal;', richAction:{ command:'forecolor', value:'teal'} },
          
          {tooltip:'Gold', type:'button', plainAction:{ openWith:'[color=gold]',   closeWith:'[/color]'}, style:'background-color: gold;', richAction:{ command:'forecolor', value:'gold'} },
          {tooltip:'Silber', type:'button', plainAction:{ openWith:'[color=silver]',   closeWith:'[/color]'}, style:'background-color: silver;', richAction:{ command:'forecolor', value:'silver'} },
          {tooltip:'Weiß', type:'button', plainAction:{ openWith:'[color=white]',   closeWith:'[/color]'}, style:'background-color: white;', richAction:{ command:'forecolor', value:'white'} },
          {tooltip:'Grau', type:'button', plainAction:{ openWith:'[color=gray]',  closeWith:'[/color]'}, style:'background-color: gray;', richAction:{ command:'forecolor', value:'gray'} },
          {tooltip:'Schwarz', type:'button', plainAction:{ openWith:'[color=black]',   closeWith:'[/color]'}, style:'background-color: black;', richAction:{ command:'forecolor', value:'black'} },
    ]},
    {type:'separator' },
    {tooltip:'Quotes', type:'button', tag:'quote', plainAction:{ openWith:'[quote]', closeWith:'[/quote]'}, icon:'gfx/markup/quotes.png'},
    {tooltip:'Code', type:'button', tag:'code', plainAction:{ openWith:'[code]', closeWith:'[/code]'}, icon:'gfx/markup/code.png'}, 
    {type:'separator' },
    {tooltip:'Formattierung entfernen', type:'button', className:'clean', plainAction:{ replaceWith:function(markup) { return markup.selection.replace(/\[(.*?)\]/g, '') }}, icon:'gfx/markup/clean.png', richAction:{ command:'removeformat'} },
    {type:'separator' }
    ]}
  ];
