Update to TinyMCE 3.5.4.1

pull/13/head
Aleksander Machniak 12 years ago
parent 2ca9f4ea59
commit d86aa138d0

@ -1,6 +1,7 @@
CHANGELOG Roundcube Webmail
===========================
- Update to TinyMCE 3.5.4.1
- Better icons with distinct shapes for priority columns (#1488377)
- Show dedicated icon for multipart/report messages (#1488524)
- Properly hide text of icon links/buttons (#1488534)

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -1 +1 @@
tinyMCE.addI18n('nl.advimage_dlg',{"image_list":"Lijst","align_right":"Rechts","align_left":"Links","align_textbottom":"Onderkant tekst","align_texttop":"Bovenkant tekst","align_bottom":"Onder","align_middle":"Midden","align_top":"Boven","align_baseline":"Basislijn",align:"Uitlijning",hspace:"Horizontale ruimte",vspace:"Verticale ruimte",dimensions:"Afmetingen",border:"Rand",list:"Lijst",alt:"Beschrijving",src:"Bestand/URL","dialog_title":"Afbeelding invoegen/bewerken","missing_alt":"Wilt u de afbeelding zonder beschrijving invoegen? De afbeelding wordt dan mogelijk niet opgemerkt door mensen met een visuele handicap, of welke zonder afbeeldingen browsen.","example_img":"Voorbeeldweergave",misc:"Diversen",mouseout:"Bij muis uit",mouseover:"Bij muis over","alt_image":"Alternatieve afbeeldingen","swap_image":"Afbeelding wisselen",map:"Afbeeldingsplattegrond",id:"Id",rtl:"Van rechts naar links",ltr:"Van links naar rechts",classes:"Klasses",style:"Stijl","long_desc":"Uitgebreide beschrijving",langcode:"Taalcode",langdir:"Taalrichting","constrain_proportions":"Verhouding behouden",preview:"Voorbeeld",title:"Titel",general:"Algemeen","tab_advanced":"Geavanceerd","tab_appearance":"Weergave","tab_general":"Algemeen",width:"Breedte",height:"Hoogte"});
tinyMCE.addI18n('nl.advimage_dlg',{"image_list":"Lijst","align_right":"Rechts","align_left":"Links","align_textbottom":"Onderkant tekst","align_texttop":"Bovenkant tekst","align_bottom":"Onder","align_middle":"Midden","align_top":"Boven","align_baseline":"Basislijn",align:"Uitlijning",hspace:"Horizontale ruimte",vspace:"Verticale ruimte",dimensions:"Afmetingen",border:"Rand",list:"Lijst",alt:"Beschrijving",src:"Bestand/URL","dialog_title":"Afbeelding invoegen/bewerken","missing_alt":"Wilt u de afbeelding zonder beschrijving invoegen? De afbeelding wordt dan mogelijk niet opgemerkt door mensen met een visuele handicap, of mensen die zonder afbeeldingen browsen.","example_img":"Voorbeeldweergave",misc:"Diversen",mouseout:"Bij muis uit",mouseover:"Bij muis over","alt_image":"Alternatieve afbeeldingen","swap_image":"Afbeelding wisselen",map:"Afbeeldingsplattegrond",id:"Id",rtl:"Van rechts naar links",ltr:"Van links naar rechts",classes:"Klasses",style:"Stijl","long_desc":"Uitgebreide beschrijving",langcode:"Taalcode",langdir:"Taalrichting","constrain_proportions":"Verhouding behouden",preview:"Voorbeeld",title:"Titel",general:"Algemeen","tab_advanced":"Geavanceerd","tab_appearance":"Weergave","tab_general":"Algemeen",width:"Breedte",height:"Hoogte"});

@ -1 +1 @@
tinyMCE.addI18n('uk.advimage_dlg',{"image_list":"\u0421\u043f\u0438\u0441\u043e\u043a \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u044c","align_right":"\u041f\u043e \u043f\u0440\u0430\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","align_left":"\u041f\u043e \u043b\u0456\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","align_textbottom":"\u041f\u043e \u043d\u0438\u0436\u043d\u044c\u043e\u043c\u0443 \u043a\u0440\u0430\u044e \u0442\u0435\u043a\u0441\u0442\u0443","align_texttop":"\u041f\u043e \u0432\u0435\u0440\u0445\u043d\u044c\u043e\u043c\u0443 \u043a\u0440\u0430\u044e \u0442\u0435\u043a\u0441\u0442\u0443","align_bottom":"\u041f\u043e \u043d\u0438\u0436\u043d\u044c\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","align_middle":"\u041f\u043e \u0446\u0435\u043d\u0442\u0440\u0443","align_top":"\u041f\u043e \u0432\u0435\u0440\u0445\u043d\u044c\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","align_baseline":"\u041f\u043e \u0431\u0430\u0437\u043e\u0432\u0456\u0439 \u043b\u0456\u043d\u0456\u0457",align:"\u0412\u0438\u0440\u0456\u0432\u043d\u044e\u0432\u0430\u043d\u043d\u044f",hspace:"\u0413\u043e\u0440\u0438\u0437. \u0432\u0456\u0434\u0441\u0442\u0443\u043f",vspace:"\u0412\u0435\u0440\u0442. \u0432\u0456\u0434\u0441\u0442\u0443\u043f",dimensions:"\u0420\u043e\u0437\u043c\u0456\u0440\u0438",border:"\u0420\u0430\u043c\u043a\u0430",list:"\u0421\u043f\u0438\u0441\u043e\u043a \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u044c",alt:"\u041e\u043f\u0438\u0441",src:"\u041f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f \u043d\u0430 \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f","dialog_title":"\u0414\u043e\u0434\u0430\u0442\u0438/\u0437\u043c\u0456\u043d\u0438\u0442\u0438 \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f","missing_alt":"\u0412\u0438 \u0432\u043f\u0435\u0432\u043d\u0435\u043d\u043d\u0456, \u0449\u043e \u0431\u0430\u0436\u0430\u0454\u0442\u0435 \u043f\u0440\u043e\u0434\u043e\u0432\u0436\u0438\u0442\u0438 \u0431\u0435\u0437 \u043e\u043f\u0438\u0441\u0443 \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f? \u0411\u0435\u0437 \u0446\u044c\u043e\u0433\u043e, \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f \u043d\u0435 \u0431\u0443\u0434\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0438\u043c \u0434\u0435\u044f\u043a\u0438\u043c \u043a\u043e\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u0447\u0430\u043c \u0437 \u0432\u0430\u0434\u0430\u043c\u0438, \u0430\u0431\u043e \u0442\u0438\u043c, \u0445\u0442\u043e \u043a\u043e\u0440\u0438\u0442\u0443\u0454\u0442\u044c\u0441\u044f \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u0438\u043c\u0438 \u043f\u0435\u0440\u0435\u0433\u043b\u044f\u0434\u0430\u0447\u0430\u043c\u0438, \u0430\u0431\u043e \u043f\u0440\u043e\u0433\u043b\u044f\u0434\u0430\u0454 \u0456\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u0441\u0442\u043e\u0440\u0456\u043d\u043a\u0438 \u0437 \u0432\u0438\u043c\u043a\u043d\u0435\u043d\u0438\u043c\u0438 \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f\u043c\u0438.","example_img":"\u0412\u0438\u0433\u043b\u044f\u0434 \u043f\u0435\u0440\u0435\u0433\u043b\u044f\u0434\u0443 \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f",misc:"\u0406\u043d\u0448\u0435",mouseout:"\u043f\u0440\u0438 \u0432\u0456\u0434\u0432\u0435\u0434\u0435\u043d\u043d\u0456",mouseover:"\u043f\u0440\u0438 \u043d\u0430\u0432\u0435\u0434\u0435\u043d\u043d\u0456","alt_image":"\u0410\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u0435 \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f","swap_image":"\u0417\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f \u0437\u0430\u043c\u0456\u043d\u043d\u0438\u043a",map:"\u041c\u0430\u043f\u0430 \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f",id:"\u0406\u0434\u0435\u043d\u0442\u0438\u0444\u0456\u043a\u0430\u0442\u043e\u0440",rtl:"\u0421\u043f\u0440\u0430\u0432\u0430 \u043b\u0456\u0432\u043e\u0440\u0443\u0447",ltr:"\u0417\u043b\u0456\u0432\u0430 \u043f\u0440\u0430\u0432\u043e\u0440\u0443\u0447",classes:"\u041a\u043b\u0430\u0441\u0438",style:"\u0421\u0442\u0438\u043b\u044c","long_desc":"\u041f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f \u043d\u0430 \u043f\u043e\u0432\u043d\u0438\u0439 \u043e\u043f\u0438\u0441",langcode:"\u041a\u043e\u0434 \u043c\u043e\u0432\u0438",langdir:"\u041d\u0430\u043f\u0440\u044f\u043c\u043e\u043a \u043c\u043e\u0432\u0438","constrain_proportions":"\u0417\u0431\u0435\u0440\u0456\u0433\u0430\u0442\u0438 \u043f\u0440\u043e\u043f\u043e\u0440\u0446\u0456\u0457",preview:"\u041f\u0435\u0440\u0435\u0433\u043b\u044f\u0434",title:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a",general:"\u0417\u0430\u0433\u0430\u043b\u044c\u043d\u0435","tab_advanced":"\u0414\u043e\u0434\u0430\u0442\u043a\u043e\u0432\u043e","tab_appearance":"\u0412\u0438\u0433\u043b\u044f\u0434","tab_general":"\u0417\u0430\u0433\u0430\u043b\u044c\u043d\u0435",width:"Width",height:"Height"});
tinyMCE.addI18n('uk.advimage_dlg',{"image_list":"\u0421\u043f\u0438\u0441\u043e\u043a \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u044c","align_right":"\u041f\u043e \u043f\u0440\u0430\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","align_left":"\u041f\u043e \u043b\u0456\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","align_textbottom":"\u041f\u043e \u043d\u0438\u0436\u043d\u044c\u043e\u043c\u0443 \u043a\u0440\u0430\u044e \u0442\u0435\u043a\u0441\u0442\u0443","align_texttop":"\u041f\u043e \u0432\u0435\u0440\u0445\u043d\u044c\u043e\u043c\u0443 \u043a\u0440\u0430\u044e \u0442\u0435\u043a\u0441\u0442\u0443","align_bottom":"\u041f\u043e \u043d\u0438\u0436\u043d\u044c\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","align_middle":"\u041f\u043e \u0446\u0435\u043d\u0442\u0440\u0443","align_top":"\u041f\u043e \u0432\u0435\u0440\u0445\u043d\u044c\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","align_baseline":"\u041f\u043e \u0431\u0430\u0437\u043e\u0432\u0456\u0439 \u043b\u0456\u043d\u0456\u0457",align:"\u0412\u0438\u0440\u0456\u0432\u043d\u044e\u0432\u0430\u043d\u043d\u044f",hspace:"\u0413\u043e\u0440\u0438\u0437. \u0432\u0456\u0434\u0441\u0442\u0443\u043f",vspace:"\u0412\u0435\u0440\u0442. \u0432\u0456\u0434\u0441\u0442\u0443\u043f",dimensions:"\u0420\u043e\u0437\u043c\u0456\u0440\u0438",border:"\u0420\u0430\u043c\u043a\u0430",list:"\u0421\u043f\u0438\u0441\u043e\u043a \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u044c",alt:"\u041e\u043f\u0438\u0441",src:"\u041f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f \u043d\u0430 \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f","dialog_title":"\u0414\u043e\u0434\u0430\u0442\u0438/\u0437\u043c\u0456\u043d\u0438\u0442\u0438 \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f","missing_alt":"\u0412\u0438 \u0432\u043f\u0435\u0432\u043d\u0435\u043d\u043d\u0456, \u0449\u043e \u0431\u0430\u0436\u0430\u0454\u0442\u0435 \u043f\u0440\u043e\u0434\u043e\u0432\u0436\u0438\u0442\u0438 \u0431\u0435\u0437 \u043e\u043f\u0438\u0441\u0443 \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f? \u0411\u0435\u0437 \u0446\u044c\u043e\u0433\u043e, \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f \u043d\u0435 \u0431\u0443\u0434\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0438\u043c \u0434\u0435\u044f\u043a\u0438\u043c \u043a\u043e\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u0447\u0430\u043c \u0437 \u0432\u0430\u0434\u0430\u043c\u0438, \u0430\u0431\u043e \u0442\u0438\u043c, \u0445\u0442\u043e \u043a\u043e\u0440\u0438\u0442\u0443\u0454\u0442\u044c\u0441\u044f \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u0438\u043c\u0438 \u043f\u0435\u0440\u0435\u0433\u043b\u044f\u0434\u0430\u0447\u0430\u043c\u0438, \u0430\u0431\u043e \u043f\u0440\u043e\u0433\u043b\u044f\u0434\u0430\u0454 \u0456\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u0441\u0442\u043e\u0440\u0456\u043d\u043a\u0438 \u0437 \u0432\u0438\u043c\u043a\u043d\u0435\u043d\u0438\u043c\u0438 \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f\u043c\u0438.","example_img":"\u0412\u0438\u0433\u043b\u044f\u0434 \u043f\u0435\u0440\u0435\u0433\u043b\u044f\u0434\u0443 \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f",misc:"\u0406\u043d\u0448\u0435",mouseout:"\u043f\u0440\u0438 \u0432\u0456\u0434\u0432\u0435\u0434\u0435\u043d\u043d\u0456",mouseover:"\u043f\u0440\u0438 \u043d\u0430\u0432\u0435\u0434\u0435\u043d\u043d\u0456","alt_image":"\u0410\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u0435 \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f","swap_image":"\u0417\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f \u0437\u0430\u043c\u0456\u043d\u043d\u0438\u043a",map:"\u041c\u0430\u043f\u0430 \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f",id:"\u0406\u0434\u0435\u043d\u0442\u0438\u0444\u0456\u043a\u0430\u0442\u043e\u0440",rtl:"\u0421\u043f\u0440\u0430\u0432\u0430 \u043b\u0456\u0432\u043e\u0440\u0443\u0447",ltr:"\u0417\u043b\u0456\u0432\u0430 \u043f\u0440\u0430\u0432\u043e\u0440\u0443\u0447",classes:"\u041a\u043b\u0430\u0441\u0438",style:"\u0421\u0442\u0438\u043b\u044c","long_desc":"\u041f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f \u043d\u0430 \u043f\u043e\u0432\u043d\u0438\u0439 \u043e\u043f\u0438\u0441",langcode:"\u041a\u043e\u0434 \u043c\u043e\u0432\u0438",langdir:"\u041d\u0430\u043f\u0440\u044f\u043c\u043e\u043a \u043c\u043e\u0432\u0438","constrain_proportions":"\u0417\u0431\u0435\u0440\u0456\u0433\u0430\u0442\u0438 \u043f\u0440\u043e\u043f\u043e\u0440\u0446\u0456\u0457",preview:"\u041f\u0435\u0440\u0435\u0433\u043b\u044f\u0434",title:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a",general:"\u0417\u0430\u0433\u0430\u043b\u044c\u043d\u0435","tab_advanced":"\u0414\u043e\u0434\u0430\u0442\u043a\u043e\u0432\u043e","tab_appearance":"\u0412\u0438\u0433\u043b\u044f\u0434","tab_general":"\u0417\u0430\u0433\u0430\u043b\u044c\u043d\u0435",width:"\u0428\u0438\u0440\u0438\u043d\u0430",height:"\u0412\u0438\u0441\u043e\u0442\u0430"});

@ -1 +1 @@
tinyMCE.addI18n('nl.advlink_dlg',{"target_name":"Doel",classes:"Klassen",style:"Stijl",id:"Id","popup_position":"Positie (X/Y)",langdir:"Taalrichting","popup_size":"Grootte","popup_dependent":"Afhankelijk (Alleen Mozilla/Firefox)","popup_resizable":"Aanpasbaar venster","popup_location":"Lokatiebalk weergeven","popup_menubar":"Menubalk weergeven","popup_toolbar":"Werkbalk weergeven","popup_statusbar":"Statusbalk weergeven","popup_scrollbars":"Scrollbalken weergeven","popup_return":"\'return false\' invoegen","popup_name":"Vensternaam","popup_url":"Popup URL",popup:"Javascript popup","target_blank":"In nieuw venster openen","target_top":"In bovenste frame openen (vervangt gehele pagina)","target_parent":"In bovenliggend venster / frame openen","target_same":"In dit venster / frame openen","anchor_names":"Ankers","popup_opts":"Opties","advanced_props":"Geavanceerde eigenschappen","event_props":"Gebeurtenissen","popup_props":"Popup eigenschappen","general_props":"Algemene eigenschappen","advanced_tab":"Geavanceerd","events_tab":"Gebeurtenissen","popup_tab":"Popup","general_tab":"Algemeen",list:"Lijst","is_external":"De ingevoerde URL lijkt op een externe link. Wilt u de vereiste http:// tekst voorvoegen?","is_email":"De ingevoerde URL lijkt op een e-mailadres. Wilt u de vereiste mailto: tekst voorvoegen?",titlefield:"Titel",target:"Doel",url:"URL",title:"Link invoegen/bewerken","link_list":"Lijst",rtl:"Van rechts naar links",ltr:"Van links naar rechts",accesskey:"Toegangstoets",tabindex:"Tabvolgorde",rev:"Relatie van doel tot pagina",rel:"Relatie van pagina tot doel",mime:"MIME type",encoding:"Taalcodering",langcode:"Taalcode","target_langcode":"Taal",width:"Breedte",height:"Hoogte"});
tinyMCE.addI18n('nl.advlink_dlg',{"target_name":"Doel",classes:"Klasses",style:"Stijl",id:"Id","popup_position":"Positie (X/Y)",langdir:"Taalrichting","popup_size":"Grootte","popup_dependent":"Afhankelijk (Alleen Mozilla/Firefox)","popup_resizable":"Aanpasbaar venster","popup_location":"Lokatiebalk weergeven","popup_menubar":"Menubalk weergeven","popup_toolbar":"Werkbalk weergeven","popup_statusbar":"Statusbalk weergeven","popup_scrollbars":"Scrollbalken weergeven","popup_return":"\'return false\' invoegen","popup_name":"Vensternaam","popup_url":"Popup URL",popup:"Javascript popup","target_blank":"In nieuw venster openen","target_top":"In bovenste frame openen (vervangt gehele pagina)","target_parent":"In bovenliggend venster / frame openen","target_same":"In dit venster / frame openen","anchor_names":"Ankers","popup_opts":"Opties","advanced_props":"Geavanceerde eigenschappen","event_props":"Gebeurtenissen","popup_props":"Popup eigenschappen","general_props":"Algemene eigenschappen","advanced_tab":"Geavanceerd","events_tab":"Gebeurtenissen","popup_tab":"Popup","general_tab":"Algemeen",list:"Lijst","is_external":"De ingevoerde URL lijkt op een externe link. Wilt u de vereiste http:// tekst voorvoegen?","is_email":"De ingevoerde URL lijkt op een e-mailadres. Wilt u de vereiste mailto: tekst voorvoegen?",titlefield:"Titel",target:"Doel",url:"URL",title:"Link invoegen/bewerken","link_list":"Lijst",rtl:"Van rechts naar links",ltr:"Van links naar rechts",accesskey:"Toegangstoets",tabindex:"Tabvolgorde",rev:"Relatie van doel tot pagina",rel:"Relatie van pagina tot doel",mime:"MIME type",encoding:"Taalcodering",langcode:"Taalcode","target_langcode":"Taal",width:"Breedte",height:"Hoogte"});

File diff suppressed because one or more lines are too long

@ -1,181 +1,181 @@
/**
* editor_plugin_src.js
*
* Copyright 2011, Moxiecode Systems AB
* Released under LGPL License.
*
* License: http://tinymce.moxiecode.com/license
* Contributing: http://tinymce.moxiecode.com/contributing
*/
(function() {
tinymce.create('tinymce.plugins.AutolinkPlugin', {
/**
* Initializes the plugin, this will be executed after the plugin has been created.
* This call is done before the editor instance has finished it's initialization so use the onInit event
* of the editor instance to intercept that event.
*
* @param {tinymce.Editor} ed Editor instance that the plugin is initialized in.
* @param {string} url Absolute URL to where the plugin is located.
*/
init : function(ed, url) {
var t = this;
// Add a key down handler
ed.onKeyDown.addToTop(function(ed, e) {
if (e.keyCode == 13)
return t.handleEnter(ed);
});
// Internet Explorer has built-in automatic linking for most cases
if (tinyMCE.isIE)
return;
ed.onKeyPress.add(function(ed, e) {
if (e.which == 41)
return t.handleEclipse(ed);
});
// Add a key up handler
ed.onKeyUp.add(function(ed, e) {
if (e.keyCode == 32)
return t.handleSpacebar(ed);
});
},
handleEclipse : function(ed) {
this.parseCurrentLine(ed, -1, '(', true);
},
handleSpacebar : function(ed) {
this.parseCurrentLine(ed, 0, '', true);
},
handleEnter : function(ed) {
this.parseCurrentLine(ed, -1, '', false);
},
parseCurrentLine : function(ed, end_offset, delimiter, goback) {
var r, end, start, endContainer, bookmark, text, matches, prev, len;
// We need at least five characters to form a URL,
// hence, at minimum, five characters from the beginning of the line.
r = ed.selection.getRng(true).cloneRange();
if (r.startOffset < 5) {
// During testing, the caret is placed inbetween two text nodes.
// The previous text node contains the URL.
prev = r.endContainer.previousSibling;
if (prev == null) {
if (r.endContainer.firstChild == null || r.endContainer.firstChild.nextSibling == null)
return;
prev = r.endContainer.firstChild.nextSibling;
}
len = prev.length;
r.setStart(prev, len);
r.setEnd(prev, len);
if (r.endOffset < 5)
return;
end = r.endOffset;
endContainer = prev;
} else {
endContainer = r.endContainer;
// Get a text node
if (endContainer.nodeType != 3 && endContainer.firstChild) {
while (endContainer.nodeType != 3 && endContainer.firstChild)
endContainer = endContainer.firstChild;
r.setStart(endContainer, 0);
r.setEnd(endContainer, endContainer.nodeValue.length);
}
if (r.endOffset == 1)
end = 2;
else
end = r.endOffset - 1 - end_offset;
}
start = end;
do
{
// Move the selection one character backwards.
r.setStart(endContainer, end - 2);
r.setEnd(endContainer, end - 1);
end -= 1;
// Loop until one of the following is found: a blank space, &nbsp;, delimeter, (end-2) >= 0
} while (r.toString() != ' ' && r.toString() != '' && r.toString().charCodeAt(0) != 160 && (end -2) >= 0 && r.toString() != delimiter);
if (r.toString() == delimiter || r.toString().charCodeAt(0) == 160) {
r.setStart(endContainer, end);
r.setEnd(endContainer, start);
end += 1;
} else if (r.startOffset == 0) {
r.setStart(endContainer, 0);
r.setEnd(endContainer, start);
}
else {
r.setStart(endContainer, end);
r.setEnd(endContainer, start);
}
// Exclude last . from word like "www.site.com."
var text = r.toString();
if (text.charAt(text.length - 1) == '.') {
r.setEnd(endContainer, start - 1);
}
text = r.toString();
matches = text.match(/^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|(?:mailto:)?[A-Z0-9._%+-]+@)(.+)$/i);
if (matches) {
if (matches[1] == 'www.') {
matches[1] = 'http://www.';
} else if (/@$/.test(matches[1]) && !/^mailto:/.test(matches[1])) {
matches[1] = 'mailto:' + matches[1];
}
bookmark = ed.selection.getBookmark();
ed.selection.setRng(r);
tinyMCE.execCommand('createlink',false, matches[1] + matches[2]);
ed.selection.moveToBookmark(bookmark);
ed.nodeChanged();
// TODO: Determine if this is still needed.
if (tinyMCE.isWebKit) {
// move the caret to its original position
ed.selection.collapse(false);
var max = Math.min(endContainer.length, start + 1);
r.setStart(endContainer, max);
r.setEnd(endContainer, max);
ed.selection.setRng(r);
}
}
},
/**
* Returns information about the plugin as a name/value array.
* The current keys are longname, author, authorurl, infourl and version.
*
* @return {Object} Name/value array containing information about the plugin.
*/
getInfo : function() {
return {
longname : 'Autolink',
author : 'Moxiecode Systems AB',
authorurl : 'http://tinymce.moxiecode.com',
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autolink',
version : tinymce.majorVersion + "." + tinymce.minorVersion
};
}
});
// Register plugin
tinymce.PluginManager.add('autolink', tinymce.plugins.AutolinkPlugin);
})();
/**
* editor_plugin_src.js
*
* Copyright 2011, Moxiecode Systems AB
* Released under LGPL License.
*
* License: http://tinymce.moxiecode.com/license
* Contributing: http://tinymce.moxiecode.com/contributing
*/
(function() {
tinymce.create('tinymce.plugins.AutolinkPlugin', {
/**
* Initializes the plugin, this will be executed after the plugin has been created.
* This call is done before the editor instance has finished it's initialization so use the onInit event
* of the editor instance to intercept that event.
*
* @param {tinymce.Editor} ed Editor instance that the plugin is initialized in.
* @param {string} url Absolute URL to where the plugin is located.
*/
init : function(ed, url) {
var t = this;
// Add a key down handler
ed.onKeyDown.addToTop(function(ed, e) {
if (e.keyCode == 13)
return t.handleEnter(ed);
});
// Internet Explorer has built-in automatic linking for most cases
if (tinyMCE.isIE)
return;
ed.onKeyPress.add(function(ed, e) {
if (e.which == 41)
return t.handleEclipse(ed);
});
// Add a key up handler
ed.onKeyUp.add(function(ed, e) {
if (e.keyCode == 32)
return t.handleSpacebar(ed);
});
},
handleEclipse : function(ed) {
this.parseCurrentLine(ed, -1, '(', true);
},
handleSpacebar : function(ed) {
this.parseCurrentLine(ed, 0, '', true);
},
handleEnter : function(ed) {
this.parseCurrentLine(ed, -1, '', false);
},
parseCurrentLine : function(ed, end_offset, delimiter, goback) {
var r, end, start, endContainer, bookmark, text, matches, prev, len;
// We need at least five characters to form a URL,
// hence, at minimum, five characters from the beginning of the line.
r = ed.selection.getRng(true).cloneRange();
if (r.startOffset < 5) {
// During testing, the caret is placed inbetween two text nodes.
// The previous text node contains the URL.
prev = r.endContainer.previousSibling;
if (prev == null) {
if (r.endContainer.firstChild == null || r.endContainer.firstChild.nextSibling == null)
return;
prev = r.endContainer.firstChild.nextSibling;
}
len = prev.length;
r.setStart(prev, len);
r.setEnd(prev, len);
if (r.endOffset < 5)
return;
end = r.endOffset;
endContainer = prev;
} else {
endContainer = r.endContainer;
// Get a text node
if (endContainer.nodeType != 3 && endContainer.firstChild) {
while (endContainer.nodeType != 3 && endContainer.firstChild)
endContainer = endContainer.firstChild;
r.setStart(endContainer, 0);
r.setEnd(endContainer, endContainer.nodeValue.length);
}
if (r.endOffset == 1)
end = 2;
else
end = r.endOffset - 1 - end_offset;
}
start = end;
do
{
// Move the selection one character backwards.
r.setStart(endContainer, end - 2);
r.setEnd(endContainer, end - 1);
end -= 1;
// Loop until one of the following is found: a blank space, &nbsp;, delimeter, (end-2) >= 0
} while (r.toString() != ' ' && r.toString() != '' && r.toString().charCodeAt(0) != 160 && (end -2) >= 0 && r.toString() != delimiter);
if (r.toString() == delimiter || r.toString().charCodeAt(0) == 160) {
r.setStart(endContainer, end);
r.setEnd(endContainer, start);
end += 1;
} else if (r.startOffset == 0) {
r.setStart(endContainer, 0);
r.setEnd(endContainer, start);
}
else {
r.setStart(endContainer, end);
r.setEnd(endContainer, start);
}
// Exclude last . from word like "www.site.com."
var text = r.toString();
if (text.charAt(text.length - 1) == '.') {
r.setEnd(endContainer, start - 1);
}
text = r.toString();
matches = text.match(/^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|(?:mailto:)?[A-Z0-9._%+-]+@)(.+)$/i);
if (matches) {
if (matches[1] == 'www.') {
matches[1] = 'http://www.';
} else if (/@$/.test(matches[1]) && !/^mailto:/.test(matches[1])) {
matches[1] = 'mailto:' + matches[1];
}
bookmark = ed.selection.getBookmark();
ed.selection.setRng(r);
tinyMCE.execCommand('createlink',false, matches[1] + matches[2]);
ed.selection.moveToBookmark(bookmark);
ed.nodeChanged();
// TODO: Determine if this is still needed.
if (tinyMCE.isWebKit) {
// move the caret to its original position
ed.selection.collapse(false);
var max = Math.min(endContainer.length, start + 1);
r.setStart(endContainer, max);
r.setEnd(endContainer, max);
ed.selection.setRng(r);
}
}
},
/**
* Returns information about the plugin as a name/value array.
* The current keys are longname, author, authorurl, infourl and version.
*
* @return {Object} Name/value array containing information about the plugin.
*/
getInfo : function() {
return {
longname : 'Autolink',
author : 'Moxiecode Systems AB',
authorurl : 'http://tinymce.moxiecode.com',
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autolink',
version : tinymce.majorVersion + "." + tinymce.minorVersion
};
}
});
// Register plugin
tinymce.PluginManager.add('autolink', tinymce.plugins.AutolinkPlugin);
})();

@ -1,119 +1,119 @@
/**
* editor_plugin_src.js
*
* Copyright 2009, Moxiecode Systems AB
* Released under LGPL License.
*
* License: http://tinymce.moxiecode.com/license
* Contributing: http://tinymce.moxiecode.com/contributing
*/
(function() {
/**
* Auto Resize
*
* This plugin automatically resizes the content area to fit its content height.
* It will retain a minimum height, which is the height of the content area when
* it's initialized.
*/
tinymce.create('tinymce.plugins.AutoResizePlugin', {
/**
* Initializes the plugin, this will be executed after the plugin has been created.
* This call is done before the editor instance has finished it's initialization so use the onInit event
* of the editor instance to intercept that event.
*
* @param {tinymce.Editor} ed Editor instance that the plugin is initialized in.
* @param {string} url Absolute URL to where the plugin is located.
*/
init : function(ed, url) {
var t = this, oldSize = 0;
if (ed.getParam('fullscreen_is_enabled'))
return;
/**
* This method gets executed each time the editor needs to resize.
*/
function resize() {
var deltaSize, d = ed.getDoc(), body = d.body, de = d.documentElement, DOM = tinymce.DOM, resizeHeight = t.autoresize_min_height, myHeight;
// Get height differently depending on the browser used
myHeight = tinymce.isIE ? body.scrollHeight : (tinymce.isWebKit && body.clientHeight == 0 ? 0 : body.offsetHeight);
// Don't make it smaller than the minimum height
if (myHeight > t.autoresize_min_height)
resizeHeight = myHeight;
// If a maximum height has been defined don't exceed this height
if (t.autoresize_max_height && myHeight > t.autoresize_max_height) {
resizeHeight = t.autoresize_max_height;
body.style.overflowY = "auto";
de.style.overflowY = "auto"; // Old IE
} else {
body.style.overflowY = "hidden";
de.style.overflowY = "hidden"; // Old IE
body.scrollTop = 0;
}
// Resize content element
if (resizeHeight !== oldSize) {
deltaSize = resizeHeight - oldSize;
DOM.setStyle(DOM.get(ed.id + '_ifr'), 'height', resizeHeight + 'px');
oldSize = resizeHeight;
// WebKit doesn't decrease the size of the body element until the iframe gets resized
// So we need to continue to resize the iframe down until the size gets fixed
if (tinymce.isWebKit && deltaSize < 0)
resize();
}
};
t.editor = ed;
// Define minimum height
t.autoresize_min_height = parseInt(ed.getParam('autoresize_min_height', ed.getElement().offsetHeight));
// Define maximum height
t.autoresize_max_height = parseInt(ed.getParam('autoresize_max_height', 0));
// Add padding at the bottom for better UX
ed.onInit.add(function(ed){
ed.dom.setStyle(ed.getBody(), 'paddingBottom', ed.getParam('autoresize_bottom_margin', 50) + 'px');
});
// Add appropriate listeners for resizing content area
ed.onChange.add(resize);
ed.onSetContent.add(resize);
ed.onPaste.add(resize);
ed.onKeyUp.add(resize);
ed.onPostRender.add(resize);
if (ed.getParam('autoresize_on_init', true)) {
ed.onLoad.add(resize);
ed.onLoadContent.add(resize);
}
// Register the command so that it can be invoked by using tinyMCE.activeEditor.execCommand('mceExample');
ed.addCommand('mceAutoResize', resize);
},
/**
* Returns information about the plugin as a name/value array.
* The current keys are longname, author, authorurl, infourl and version.
*
* @return {Object} Name/value array containing information about the plugin.
*/
getInfo : function() {
return {
longname : 'Auto Resize',
author : 'Moxiecode Systems AB',
authorurl : 'http://tinymce.moxiecode.com',
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autoresize',
version : tinymce.majorVersion + "." + tinymce.minorVersion
};
}
});
// Register plugin
tinymce.PluginManager.add('autoresize', tinymce.plugins.AutoResizePlugin);
})();
/**
* editor_plugin_src.js
*
* Copyright 2009, Moxiecode Systems AB
* Released under LGPL License.
*
* License: http://tinymce.moxiecode.com/license
* Contributing: http://tinymce.moxiecode.com/contributing
*/
(function() {
/**
* Auto Resize
*
* This plugin automatically resizes the content area to fit its content height.
* It will retain a minimum height, which is the height of the content area when
* it's initialized.
*/
tinymce.create('tinymce.plugins.AutoResizePlugin', {
/**
* Initializes the plugin, this will be executed after the plugin has been created.
* This call is done before the editor instance has finished it's initialization so use the onInit event
* of the editor instance to intercept that event.
*
* @param {tinymce.Editor} ed Editor instance that the plugin is initialized in.
* @param {string} url Absolute URL to where the plugin is located.
*/
init : function(ed, url) {
var t = this, oldSize = 0;
if (ed.getParam('fullscreen_is_enabled'))
return;
/**
* This method gets executed each time the editor needs to resize.
*/
function resize() {
var deltaSize, d = ed.getDoc(), body = d.body, de = d.documentElement, DOM = tinymce.DOM, resizeHeight = t.autoresize_min_height, myHeight;
// Get height differently depending on the browser used
myHeight = tinymce.isIE ? body.scrollHeight : (tinymce.isWebKit && body.clientHeight == 0 ? 0 : body.offsetHeight);
// Don't make it smaller than the minimum height
if (myHeight > t.autoresize_min_height)
resizeHeight = myHeight;
// If a maximum height has been defined don't exceed this height
if (t.autoresize_max_height && myHeight > t.autoresize_max_height) {
resizeHeight = t.autoresize_max_height;
body.style.overflowY = "auto";
de.style.overflowY = "auto"; // Old IE
} else {
body.style.overflowY = "hidden";
de.style.overflowY = "hidden"; // Old IE
body.scrollTop = 0;
}
// Resize content element
if (resizeHeight !== oldSize) {
deltaSize = resizeHeight - oldSize;
DOM.setStyle(DOM.get(ed.id + '_ifr'), 'height', resizeHeight + 'px');
oldSize = resizeHeight;
// WebKit doesn't decrease the size of the body element until the iframe gets resized
// So we need to continue to resize the iframe down until the size gets fixed
if (tinymce.isWebKit && deltaSize < 0)
resize();
}
};
t.editor = ed;
// Define minimum height
t.autoresize_min_height = parseInt(ed.getParam('autoresize_min_height', ed.getElement().offsetHeight));
// Define maximum height
t.autoresize_max_height = parseInt(ed.getParam('autoresize_max_height', 0));
// Add padding at the bottom for better UX
ed.onInit.add(function(ed){
ed.dom.setStyle(ed.getBody(), 'paddingBottom', ed.getParam('autoresize_bottom_margin', 50) + 'px');
});
// Add appropriate listeners for resizing content area
ed.onChange.add(resize);
ed.onSetContent.add(resize);
ed.onPaste.add(resize);
ed.onKeyUp.add(resize);
ed.onPostRender.add(resize);
if (ed.getParam('autoresize_on_init', true)) {
ed.onLoad.add(resize);
ed.onLoadContent.add(resize);
}
// Register the command so that it can be invoked by using tinyMCE.activeEditor.execCommand('mceExample');
ed.addCommand('mceAutoResize', resize);
},
/**
* Returns information about the plugin as a name/value array.
* The current keys are longname, author, authorurl, infourl and version.
*
* @return {Object} Name/value array containing information about the plugin.
*/
getInfo : function() {
return {
longname : 'Auto Resize',
author : 'Moxiecode Systems AB',
authorurl : 'http://tinymce.moxiecode.com',
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autoresize',
version : tinymce.majorVersion + "." + tinymce.minorVersion
};
}
});
// Register plugin
tinymce.PluginManager.add('autoresize', tinymce.plugins.AutoResizePlugin);
})();

@ -1 +1 @@
(function(e){var c="autosave",g="restoredraft",b=true,f,d,a=e.util.Dispatcher;e.create("tinymce.plugins.AutoSave",{init:function(i,j){var h=this,l=i.settings;h.editor=i;function k(n){var m={s:1000,m:60000};n=/^(\d+)([ms]?)$/.exec(""+n);return(n[2]?m[n[2]]:1)*parseInt(n)}e.each({ask_before_unload:b,interval:"30s",retention:"20m",minlength:50},function(n,m){m=c+"_"+m;if(l[m]===f){l[m]=n}});l.autosave_interval=k(l.autosave_interval);l.autosave_retention=k(l.autosave_retention);i.addButton(g,{title:c+".restore_content",onclick:function(){if(i.getContent({draft:true}).replace(/\s|&nbsp;|<\/?p[^>]*>|<br[^>]*>/gi,"").length>0){i.windowManager.confirm(c+".warning_message",function(m){if(m){h.restoreDraft()}})}else{h.restoreDraft()}}});i.onNodeChange.add(function(){var m=i.controlManager;if(m.get(g)){m.setDisabled(g,!h.hasDraft())}});i.onInit.add(function(){if(i.controlManager.get(g)){h.setupStorage(i);setInterval(function(){h.storeDraft();i.nodeChanged()},l.autosave_interval)}});h.onStoreDraft=new a(h);h.onRestoreDraft=new a(h);h.onRemoveDraft=new a(h);if(!d){window.onbeforeunload=e.plugins.AutoSave._beforeUnloadHandler;d=b}},getInfo:function(){return{longname:"Auto save",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autosave",version:e.majorVersion+"."+e.minorVersion}},getExpDate:function(){return new Date(new Date().getTime()+this.editor.settings.autosave_retention).toUTCString()},setupStorage:function(i){var h=this,k=c+"_test",j="OK";h.key=c+i.id;e.each([function(){if(localStorage){localStorage.setItem(k,j);if(localStorage.getItem(k)===j){localStorage.removeItem(k);return localStorage}}},function(){if(sessionStorage){sessionStorage.setItem(k,j);if(sessionStorage.getItem(k)===j){sessionStorage.removeItem(k);return sessionStorage}}},function(){if(e.isIE){i.getElement().style.behavior="url('#default#userData')";return{autoExpires:b,setItem:function(l,n){var m=i.getElement();m.setAttribute(l,n);m.expires=h.getExpDate();try{m.save("TinyMCE")}catch(o){}},getItem:function(l){var m=i.getElement();try{m.load("TinyMCE");return m.getAttribute(l)}catch(n){return null}},removeItem:function(l){i.getElement().removeAttribute(l)}}}},],function(l){try{h.storage=l();if(h.storage){return false}}catch(m){}})},storeDraft:function(){var i=this,l=i.storage,j=i.editor,h,k;if(l){if(!l.getItem(i.key)&&!j.isDirty()){return}k=j.getContent({draft:true});if(k.length>j.settings.autosave_minlength){h=i.getExpDate();if(!i.storage.autoExpires){i.storage.setItem(i.key+"_expires",h)}i.storage.setItem(i.key,k);i.onStoreDraft.dispatch(i,{expires:h,content:k})}}},restoreDraft:function(){var h=this,j=h.storage,i;if(j){i=j.getItem(h.key);if(i){h.editor.setContent(i);h.onRestoreDraft.dispatch(h,{content:i})}}},hasDraft:function(){var h=this,k=h.storage,i,j;if(k){j=!!k.getItem(h.key);if(j){if(!h.storage.autoExpires){i=new Date(k.getItem(h.key+"_expires"));if(new Date().getTime()<i.getTime()){return b}h.removeDraft()}else{return b}}}return false},removeDraft:function(){var h=this,k=h.storage,i=h.key,j;if(k){j=k.getItem(i);k.removeItem(i);k.removeItem(i+"_expires");if(j){h.onRemoveDraft.dispatch(h,{content:j})}}},"static":{_beforeUnloadHandler:function(h){var i;e.each(tinyMCE.editors,function(j){if(j.plugins.autosave){j.plugins.autosave.storeDraft()}if(j.getParam("fullscreen_is_enabled")){return}if(!i&&j.isDirty()&&j.getParam("autosave_ask_before_unload")){i=j.getLang("autosave.unload_msg")}});return i}}});e.PluginManager.add("autosave",e.plugins.AutoSave)})(tinymce);
(function(e){var c="autosave",g="restoredraft",b=true,f,d,a=e.util.Dispatcher;e.create("tinymce.plugins.AutoSave",{init:function(i,j){var h=this,l=i.settings;h.editor=i;function k(n){var m={s:1000,m:60000};n=/^(\d+)([ms]?)$/.exec(""+n);return(n[2]?m[n[2]]:1)*parseInt(n)}e.each({ask_before_unload:b,interval:"30s",retention:"20m",minlength:50},function(n,m){m=c+"_"+m;if(l[m]===f){l[m]=n}});l.autosave_interval=k(l.autosave_interval);l.autosave_retention=k(l.autosave_retention);i.addButton(g,{title:c+".restore_content",onclick:function(){if(i.getContent({draft:true}).replace(/\s|&nbsp;|<\/?p[^>]*>|<br[^>]*>/gi,"").length>0){i.windowManager.confirm(c+".warning_message",function(m){if(m){h.restoreDraft()}})}else{h.restoreDraft()}}});i.onNodeChange.add(function(){var m=i.controlManager;if(m.get(g)){m.setDisabled(g,!h.hasDraft())}});i.onInit.add(function(){if(i.controlManager.get(g)){h.setupStorage(i);setInterval(function(){if(!i.removed){h.storeDraft();i.nodeChanged()}},l.autosave_interval)}});h.onStoreDraft=new a(h);h.onRestoreDraft=new a(h);h.onRemoveDraft=new a(h);if(!d){window.onbeforeunload=e.plugins.AutoSave._beforeUnloadHandler;d=b}},getInfo:function(){return{longname:"Auto save",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autosave",version:e.majorVersion+"."+e.minorVersion}},getExpDate:function(){return new Date(new Date().getTime()+this.editor.settings.autosave_retention).toUTCString()},setupStorage:function(i){var h=this,k=c+"_test",j="OK";h.key=c+i.id;e.each([function(){if(localStorage){localStorage.setItem(k,j);if(localStorage.getItem(k)===j){localStorage.removeItem(k);return localStorage}}},function(){if(sessionStorage){sessionStorage.setItem(k,j);if(sessionStorage.getItem(k)===j){sessionStorage.removeItem(k);return sessionStorage}}},function(){if(e.isIE){i.getElement().style.behavior="url('#default#userData')";return{autoExpires:b,setItem:function(l,n){var m=i.getElement();m.setAttribute(l,n);m.expires=h.getExpDate();try{m.save("TinyMCE")}catch(o){}},getItem:function(l){var m=i.getElement();try{m.load("TinyMCE");return m.getAttribute(l)}catch(n){return null}},removeItem:function(l){i.getElement().removeAttribute(l)}}}},],function(l){try{h.storage=l();if(h.storage){return false}}catch(m){}})},storeDraft:function(){var i=this,l=i.storage,j=i.editor,h,k;if(l){if(!l.getItem(i.key)&&!j.isDirty()){return}k=j.getContent({draft:true});if(k.length>j.settings.autosave_minlength){h=i.getExpDate();if(!i.storage.autoExpires){i.storage.setItem(i.key+"_expires",h)}i.storage.setItem(i.key,k);i.onStoreDraft.dispatch(i,{expires:h,content:k})}}},restoreDraft:function(){var h=this,j=h.storage,i;if(j){i=j.getItem(h.key);if(i){h.editor.setContent(i);h.onRestoreDraft.dispatch(h,{content:i})}}},hasDraft:function(){var h=this,k=h.storage,i,j;if(k){j=!!k.getItem(h.key);if(j){if(!h.storage.autoExpires){i=new Date(k.getItem(h.key+"_expires"));if(new Date().getTime()<i.getTime()){return b}h.removeDraft()}else{return b}}}return false},removeDraft:function(){var h=this,k=h.storage,i=h.key,j;if(k){j=k.getItem(i);k.removeItem(i);k.removeItem(i+"_expires");if(j){h.onRemoveDraft.dispatch(h,{content:j})}}},"static":{_beforeUnloadHandler:function(h){var i;e.each(tinyMCE.editors,function(j){if(j.plugins.autosave){j.plugins.autosave.storeDraft()}if(j.getParam("fullscreen_is_enabled")){return}if(!i&&j.isDirty()&&j.getParam("autosave_ask_before_unload")){i=j.getLang("autosave.unload_msg")}});return i}}});e.PluginManager.add("autosave",e.plugins.AutoSave)})(tinymce);

@ -136,8 +136,10 @@
// Auto save contents each interval time
setInterval(function() {
self.storeDraft();
ed.nodeChanged();
if (!ed.removed) {
self.storeDraft();
ed.nodeChanged();
}
}, settings.autosave_interval);
}
});

@ -1 +1 @@
(function(){var a=tinymce.dom.Event,c=tinymce.each,b=tinymce.DOM;tinymce.create("tinymce.plugins.ContextMenu",{init:function(e){var h=this,f,d,i;h.editor=e;d=e.settings.contextmenu_never_use_native;h.onContextMenu=new tinymce.util.Dispatcher(this);f=e.onContextMenu.add(function(j,k){if((i!==0?i:k.ctrlKey)&&!d){return}a.cancel(k);if(k.target.nodeName=="IMG"){j.selection.select(k.target)}h._getMenu(j).showMenu(k.clientX||k.pageX,k.clientY||k.pageY);a.add(j.getDoc(),"click",function(l){g(j,l)});j.nodeChanged()});e.onRemove.add(function(){if(h._menu){h._menu.removeAll()}});function g(j,k){i=0;if(k&&k.button==2){i=k.ctrlKey;return}if(h._menu){h._menu.removeAll();h._menu.destroy();a.remove(j.getDoc(),"click",g);h._menu=null}}e.onMouseDown.add(g);e.onKeyDown.add(g);e.onKeyDown.add(function(j,k){if(k.shiftKey&&!k.ctrlKey&&!k.altKey&&k.keyCode===121){a.cancel(k);f(j,k)}})},getInfo:function(){return{longname:"Contextmenu",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/contextmenu",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_getMenu:function(e){var g=this,d=g._menu,j=e.selection,f=j.isCollapsed(),h=j.getNode()||e.getBody(),i,k;if(d){d.removeAll();d.destroy()}k=b.getPos(e.getContentAreaContainer());d=e.controlManager.createDropMenu("contextmenu",{offset_x:k.x+e.getParam("contextmenu_offset_x",0),offset_y:k.y+e.getParam("contextmenu_offset_y",0),constrain:1,keyboard_focus:true});g._menu=d;d.add({title:"advanced.cut_desc",icon:"cut",cmd:"Cut"}).setDisabled(f);d.add({title:"advanced.copy_desc",icon:"copy",cmd:"Copy"}).setDisabled(f);d.add({title:"advanced.paste_desc",icon:"paste",cmd:"Paste"});if((h.nodeName=="A"&&!e.dom.getAttrib(h,"name"))||!f){d.addSeparator();d.add({title:"advanced.link_desc",icon:"link",cmd:e.plugins.advlink?"mceAdvLink":"mceLink",ui:true});d.add({title:"advanced.unlink_desc",icon:"unlink",cmd:"UnLink"})}d.addSeparator();d.add({title:"advanced.image_desc",icon:"image",cmd:e.plugins.advimage?"mceAdvImage":"mceImage",ui:true});d.addSeparator();i=d.addMenu({title:"contextmenu.align"});i.add({title:"contextmenu.left",icon:"justifyleft",cmd:"JustifyLeft"});i.add({title:"contextmenu.center",icon:"justifycenter",cmd:"JustifyCenter"});i.add({title:"contextmenu.right",icon:"justifyright",cmd:"JustifyRight"});i.add({title:"contextmenu.full",icon:"justifyfull",cmd:"JustifyFull"});g.onContextMenu.dispatch(g,d,h,f);return d}});tinymce.PluginManager.add("contextmenu",tinymce.plugins.ContextMenu)})();
(function(){var a=tinymce.dom.Event,c=tinymce.each,b=tinymce.DOM;tinymce.create("tinymce.plugins.ContextMenu",{init:function(f){var i=this,g,d,j,e;i.editor=f;d=f.settings.contextmenu_never_use_native;i.onContextMenu=new tinymce.util.Dispatcher(this);e=function(k){h(f,k)};g=f.onContextMenu.add(function(k,l){if((j!==0?j:l.ctrlKey)&&!d){return}a.cancel(l);if(l.target.nodeName=="IMG"){k.selection.select(l.target)}i._getMenu(k).showMenu(l.clientX||l.pageX,l.clientY||l.pageY);a.add(k.getDoc(),"click",e);k.nodeChanged()});f.onRemove.add(function(){if(i._menu){i._menu.removeAll()}});function h(k,l){j=0;if(l&&l.button==2){j=l.ctrlKey;return}if(i._menu){i._menu.removeAll();i._menu.destroy();a.remove(k.getDoc(),"click",e);i._menu=null}}f.onMouseDown.add(h);f.onKeyDown.add(h);f.onKeyDown.add(function(k,l){if(l.shiftKey&&!l.ctrlKey&&!l.altKey&&l.keyCode===121){a.cancel(l);g(k,l)}})},getInfo:function(){return{longname:"Contextmenu",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/contextmenu",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_getMenu:function(e){var g=this,d=g._menu,j=e.selection,f=j.isCollapsed(),h=j.getNode()||e.getBody(),i,k;if(d){d.removeAll();d.destroy()}k=b.getPos(e.getContentAreaContainer());d=e.controlManager.createDropMenu("contextmenu",{offset_x:k.x+e.getParam("contextmenu_offset_x",0),offset_y:k.y+e.getParam("contextmenu_offset_y",0),constrain:1,keyboard_focus:true});g._menu=d;d.add({title:"advanced.cut_desc",icon:"cut",cmd:"Cut"}).setDisabled(f);d.add({title:"advanced.copy_desc",icon:"copy",cmd:"Copy"}).setDisabled(f);d.add({title:"advanced.paste_desc",icon:"paste",cmd:"Paste"});if((h.nodeName=="A"&&!e.dom.getAttrib(h,"name"))||!f){d.addSeparator();d.add({title:"advanced.link_desc",icon:"link",cmd:e.plugins.advlink?"mceAdvLink":"mceLink",ui:true});d.add({title:"advanced.unlink_desc",icon:"unlink",cmd:"UnLink"})}d.addSeparator();d.add({title:"advanced.image_desc",icon:"image",cmd:e.plugins.advimage?"mceAdvImage":"mceImage",ui:true});d.addSeparator();i=d.addMenu({title:"contextmenu.align"});i.add({title:"contextmenu.left",icon:"justifyleft",cmd:"JustifyLeft"});i.add({title:"contextmenu.center",icon:"justifycenter",cmd:"JustifyCenter"});i.add({title:"contextmenu.right",icon:"justifyright",cmd:"JustifyRight"});i.add({title:"contextmenu.full",icon:"justifyfull",cmd:"JustifyFull"});g.onContextMenu.dispatch(g,d,h,f);return d}});tinymce.PluginManager.add("contextmenu",tinymce.plugins.ContextMenu)})();

@ -27,7 +27,7 @@
* @param {string} url Absolute URL to where the plugin is located.
*/
init : function(ed) {
var t = this, showMenu, contextmenuNeverUseNative, realCtrlKey;
var t = this, showMenu, contextmenuNeverUseNative, realCtrlKey, hideMenu;
t.editor = ed;
@ -42,6 +42,10 @@
*/
t.onContextMenu = new tinymce.util.Dispatcher(this);
hideMenu = function(e) {
hide(ed, e);
};
showMenu = ed.onContextMenu.add(function(ed, e) {
// Block TinyMCE menu on ctrlKey and work around Safari issue
if ((realCtrlKey !== 0 ? realCtrlKey : e.ctrlKey) && !contextmenuNeverUseNative)
@ -54,13 +58,11 @@
ed.selection.select(e.target);
t._getMenu(ed).showMenu(e.clientX || e.pageX, e.clientY || e.pageY);
Event.add(ed.getDoc(), 'click', function(e) {
hide(ed, e);
});
Event.add(ed.getDoc(), 'click', hideMenu);
ed.nodeChanged();
});
ed.onRemove.add(function() {
if (t._menu)
t._menu.removeAll();
@ -78,8 +80,8 @@
if (t._menu) {
t._menu.removeAll();
t._menu.destroy();
Event.remove(ed.getDoc(), 'click', hide);
t._menu.destroy();
Event.remove(ed.getDoc(), 'click', hideMenu);
t._menu = null;
}
};

@ -1 +1 @@
tinyMCE.addI18n('uk.emotions_dlg',{cry:"\u041f\u043b\u0430\u0447",cool:"Cool",desc:"\u041f\u043e\u0441\u043c\u0456\u0448\u043a\u0438",title:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \u043f\u043e\u0441\u043c\u0456\u0448\u043a\u0443",yell:"\u0417\u043e\u0439\u043a",wink:"\u041f\u0456\u0434\u043c\u043e\u0440\u0433\u0443\u0454",undecided:"\u041d\u0435\u0440\u0456\u0448\u0443\u0447\u0456\u0441\u0442\u044c","tongue_out":"\u041f\u043e\u043a\u0430\u0437\u0443\u0454 \u044f\u0437\u0438\u043a\u0430",surprised:"\u0417\u0434\u0438\u0432\u043e\u0432\u0430\u043d\u0456\u0441\u0442\u044c",smile:"\u041f\u043e\u0441\u043c\u0456\u0448\u043a\u0430",sealed:"Sealed","money_mouth":"\u0413\u0440\u043e\u0449\u0456 \u0432 \u0440\u043e\u0442\u0456",laughing:"\u0421\u043c\u0456\u0445",kiss:"\u041f\u043e\u0446\u0456\u043b\u0443\u043d\u043e\u043a",innocent:"\u041d\u0435\u0432\u0438\u043d\u043d\u0456\u0441\u0442\u044c",frown:"\u041d\u0430\u0441\u0443\u043f\u043b\u0435\u043d\u043d\u0456\u0441\u0442\u044c","foot_in_mouth":"\u041d\u043e\u0433\u0430 \u0432 \u0440\u043e\u0442\u0456",embarassed:"\u0417\u0431\u0435\u043d\u0442\u0435\u0436\u0435\u043d\u043d\u044f",usage:"Use left and right arrows to navigate."});
tinyMCE.addI18n('uk.emotions_dlg',{cry:"\u041f\u043b\u0430\u0447",cool:"Cool",desc:"\u041f\u043e\u0441\u043c\u0456\u0448\u043a\u0438",title:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \u043f\u043e\u0441\u043c\u0456\u0448\u043a\u0443",yell:"\u0417\u043e\u0439\u043a",wink:"\u041f\u0456\u0434\u043c\u043e\u0440\u0433\u0443\u0454",undecided:"\u041d\u0435\u0440\u0456\u0448\u0443\u0447\u0456\u0441\u0442\u044c","tongue_out":"\u041f\u043e\u043a\u0430\u0437\u0443\u0454 \u044f\u0437\u0438\u043a\u0430",surprised:"\u0417\u0434\u0438\u0432\u043e\u0432\u0430\u043d\u0456\u0441\u0442\u044c",smile:"\u041f\u043e\u0441\u043c\u0456\u0448\u043a\u0430",sealed:"Sealed","money_mouth":"\u0413\u0440\u043e\u0449\u0456 \u0432 \u0440\u043e\u0442\u0456",laughing:"\u0421\u043c\u0456\u0445",kiss:"\u041f\u043e\u0446\u0456\u043b\u0443\u043d\u043e\u043a",innocent:"\u041d\u0435\u0432\u0438\u043d\u043d\u0456\u0441\u0442\u044c",frown:"\u041d\u0430\u0441\u0443\u043f\u043b\u0435\u043d\u043d\u0456\u0441\u0442\u044c","foot_in_mouth":"\u041d\u043e\u0433\u0430 \u0432 \u0440\u043e\u0442\u0456",embarassed:"\u0417\u0431\u0435\u043d\u0442\u0435\u0436\u0435\u043d\u043d\u044f",usage:"\u0412\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0439\u0442\u0435 \u0441\u0442\u0440\u0456\u043b\u043a\u0438 \u0432\u043b\u0456\u0432\u043e \u0442\u0430 \u0432\u043f\u0440\u0430\u0432\u043e \u0434\u043b\u044f \u043d\u0430\u0432\u0456\u0433\u0430\u0446\u0456\u0457"});

@ -1,50 +1,50 @@
/**
* editor_plugin_src.js
*
* Copyright 2009, Moxiecode Systems AB
* Released under LGPL License.
*
* License: http://tinymce.moxiecode.com/license
* Contributing: http://tinymce.moxiecode.com/contributing
*/
(function() {
tinymce.create('tinymce.plugins.ExampleDependencyPlugin', {
/**
* Initializes the plugin, this will be executed after the plugin has been created.
* This call is done before the editor instance has finished it's initialization so use the onInit event
* of the editor instance to intercept that event.
*
* @param {tinymce.Editor} ed Editor instance that the plugin is initialized in.
* @param {string} url Absolute URL to where the plugin is located.
*/
init : function(ed, url) {
},
/**
* Returns information about the plugin as a name/value array.
* The current keys are longname, author, authorurl, infourl and version.
*
* @return {Object} Name/value array containing information about the plugin.
*/
getInfo : function() {
return {
longname : 'Example Dependency plugin',
author : 'Some author',
authorurl : 'http://tinymce.moxiecode.com',
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/example_dependency',
version : "1.0"
};
}
});
/**
* Register the plugin, specifying the list of the plugins that this plugin depends on. They are specified in a list, with the list loaded in order.
* plugins in this list will be initialised when this plugin is initialized. (before the init method is called).
* plugins in a depends list should typically be specified using the short name). If neccesary this can be done
* with an object which has the url to the plugin and the shortname.
*/
tinymce.PluginManager.add('example_dependency', tinymce.plugins.ExampleDependencyPlugin, ['example']);
})();
/**
* editor_plugin_src.js
*
* Copyright 2009, Moxiecode Systems AB
* Released under LGPL License.
*
* License: http://tinymce.moxiecode.com/license
* Contributing: http://tinymce.moxiecode.com/contributing
*/
(function() {
tinymce.create('tinymce.plugins.ExampleDependencyPlugin', {
/**
* Initializes the plugin, this will be executed after the plugin has been created.
* This call is done before the editor instance has finished it's initialization so use the onInit event
* of the editor instance to intercept that event.
*
* @param {tinymce.Editor} ed Editor instance that the plugin is initialized in.
* @param {string} url Absolute URL to where the plugin is located.
*/
init : function(ed, url) {
},
/**
* Returns information about the plugin as a name/value array.
* The current keys are longname, author, authorurl, infourl and version.
*
* @return {Object} Name/value array containing information about the plugin.
*/
getInfo : function() {
return {
longname : 'Example Dependency plugin',
author : 'Some author',
authorurl : 'http://tinymce.moxiecode.com',
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/example_dependency',
version : "1.0"
};
}
});
/**
* Register the plugin, specifying the list of the plugins that this plugin depends on. They are specified in a list, with the list loaded in order.
* plugins in this list will be initialised when this plugin is initialized. (before the init method is called).
* plugins in a depends list should typically be specified using the short name). If neccesary this can be done
* with an object which has the url to the plugin and the shortname.
*/
tinymce.PluginManager.add('example_dependency', tinymce.plugins.ExampleDependencyPlugin, ['example']);
})();

@ -1 +1 @@
tinyMCE.addI18n('nl.fullpage_dlg',{title:"Documenteigenschappen","meta_tab":"Algemeen","appearance_tab":"Weergave","advanced_tab":"Geavanceerd","meta_props":"Meta informatie",langprops:"Taal en codering","meta_title":"Titel","meta_keywords":"Sleutelwoorden","meta_description":"Beschrijving","meta_robots":"Robots",doctypes:"Doctype",langcode:"Taalcode",langdir:"Taalrichting",ltr:"Van links naar rechts",rtl:"Van rechts naar links","xml_pi":"XML toewijzing",encoding:"Karaktercodering","appearance_bgprops":"Achtergrondeigenschappen","appearance_marginprops":"Bodymarge","appearance_linkprops":"Linkkleuren","appearance_textprops":"Teksteigenschappen",bgcolor:"Achtergrondkleur",bgimage:"Achtergrondafbeelding","left_margin":"Linkermarge","right_margin":"Rechtermarge","top_margin":"Bovenmarge","bottom_margin":"Ondermarge","text_color":"Tekstkleur","font_size":"Tekengrootte","font_face":"Lettertype","link_color":"Linkkleur","hover_color":"Hoverkleur","visited_color":"Bezocht kleur","active_color":"Actieve kleur",textcolor:"Kleur",fontsize:"Tekengrootte",fontface:"Lettertype","meta_index_follow":"Links indexeren en volgen","meta_index_nofollow":"Links indexeren maar niet volgen","meta_noindex_follow":"Links volgen maar niet indexeren","meta_noindex_nofollow":"Links niet indexeren en niet volgen","appearance_style":"Stijlblad en stijleigenschappen",stylesheet:"Stijlblad",style:"Stijl",author:"Auteur",copyright:"Copyright",add:"Nieuw element toevoegen",remove:"Geselecteerde elementen verwijderen",moveup:"Geselecteerde elementen omhoog verplaatsen",movedown:"Geselecteerde elementen omlaag verplaatsen","head_elements":"Kopelementen",info:"Informatie","add_title":"Titelelement","add_meta":"Meta-element","add_script":"Scriptelement","add_style":"Stijlelement","add_link":"Linkelement","add_base":"Basiselement","add_comment":"Opmerkingknooppunt","title_element":"Titelelement","script_element":"Scriptelement","style_element":"Stijlelement","base_element":"Basiselement","link_element":"Linkelement","meta_element":"Meta-element","comment_element":"Opmerking",src:"Bron",language:"Taal",href:"Href",target:"Doel",type:"Type",charset:"Karakterset",defer:"Uitstellen",media:"Media",properties:"Eigenschappen",name:"Naam",value:"Waarde",content:"Inhoud",rel:"Rel",rev:"Rev",hreflang:"Href taal","general_props":"Algemeen","advanced_props":"Geavanceerd"});
tinyMCE.addI18n('nl.fullpage_dlg',{title:"Documenteigenschappen","meta_tab":"Algemeen","appearance_tab":"Weergave","advanced_tab":"Geavanceerd","meta_props":"Meta informatie",langprops:"Taal en codering","meta_title":"Titel","meta_keywords":"Sleutelwoorden","meta_description":"Beschrijving","meta_robots":"Robots",doctypes:"Doctype",langcode:"Taalcode",langdir:"Taalrichting",ltr:"Van links naar rechts",rtl:"Van rechts naar links","xml_pi":"XML toewijzing",encoding:"Karaktercodering","appearance_bgprops":"Achtergrondeigenschappen","appearance_marginprops":"Bodymarge","appearance_linkprops":"Linkkleuren","appearance_textprops":"Teksteigenschappen",bgcolor:"Achtergrondkleur",bgimage:"Achtergrondafbeelding","left_margin":"Linkermarge","right_margin":"Rechtermarge","top_margin":"Bovenmarge","bottom_margin":"Ondermarge","text_color":"Tekstkleur","font_size":"Tekengrootte","font_face":"Lettertype","link_color":"Linkkleur","hover_color":"Hoverkleur","visited_color":"Bezocht kleur","active_color":"Actieve kleur",textcolor:"Kleur",fontsize:"Tekengrootte",fontface:"Lettertype","meta_index_follow":"Links indexeren en volgen","meta_index_nofollow":"Links indexeren maar niet volgen","meta_noindex_follow":"Links volgen maar niet indexeren","meta_noindex_nofollow":"Links niet indexeren en niet volgen","appearance_style":"Stijlblad en stijleigenschappen",stylesheet:"Stijlblad",style:"Stijl",author:"Auteur",copyright:"Copyright",add:"Nieuw element toevoegen",remove:"Geselecteerde elementen verwijderen",moveup:"Geselecteerde elementen omhoog verplaatsen",movedown:"Geselecteerde elementen omlaag verplaatsen","head_elements":"Kopelementen",info:"Informatie","add_title":"Titelelement","add_meta":"Meta-element","add_script":"Scriptelement","add_style":"Stijlelement","add_link":"Linkelement","add_base":"Basiselement","add_comment":"Opmerkingknooppunt","title_element":"Titelelement","script_element":"Scriptelement","style_element":"Stijlelement","base_element":"Basiselement","link_element":"Linkelement","meta_element":"Meta-element","comment_element":"Opmerking",src:"Bron",language:"Taal",href:"HREF",target:"Doel",type:"Type",charset:"Karakterset",defer:"Uitstellen",media:"Media",properties:"Eigenschappen",name:"Naam",value:"Waarde",content:"Inhoud",rel:"Rel",rev:"Rev",hreflang:"HREF taal","general_props":"Algemeen","advanced_props":"Geavanceerd"});

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

@ -28,6 +28,10 @@
["Audio"]
];
function normalizeSize(size) {
return typeof(size) == "string" ? size.replace(/[^0-9%]/g, '') : size;
}
function toArray(obj) {
var undef, out, i;
@ -258,8 +262,8 @@
'data-mce-json' : JSON.serialize(data, "'")
});
img.width = data.width || (data.type == 'audio' ? "300" : "320");
img.height = data.height || (data.type == 'audio' ? "32" : "240");
img.width = data.width = normalizeSize(data.width || (data.type == 'audio' ? "300" : "320"));
img.height = data.height = normalizeSize(data.height || (data.type == 'audio' ? "32" : "240"));
return img;
},
@ -386,6 +390,10 @@
style = editor.dom.serializeStyle(editor.dom.parseStyle(style, 'img'));
}
// Use node width/height to override the data width/height when the placeholder is resized
data.width = node.attr('width') || data.width;
data.height = node.attr('height') || data.height;
// Handle iframe
if (typeItem.name === 'Iframe') {
replacement = new Node('iframe', 1);
@ -434,8 +442,8 @@
// Create new object element
video = new Node('video', 1).attr(tinymce.extend({
id : node.attr('id'),
width: node.attr('width'),
height: node.attr('height'),
width: normalizeSize(node.attr('width')),
height: normalizeSize(node.attr('height')),
style : style
}, data.video.attrs));
@ -473,8 +481,8 @@
// Create new object element
audio = new Node('audio', 1).attr(tinymce.extend({
id : node.attr('id'),
width: node.attr('width'),
height: node.attr('height'),
width: normalizeSize(node.attr('width')),
height: normalizeSize(node.attr('height')),
style : style
}, data.video.attrs));
@ -502,8 +510,8 @@
embed.shortEnded = true;
embed.attr({
id: node.attr('id'),
width: node.attr('width'),
height: node.attr('height'),
width: normalizeSize(node.attr('width')),
height: normalizeSize(node.attr('height')),
style : style,
type: node.attr('type')
});
@ -531,8 +539,8 @@
// Create new object element
object = new Node('object', 1).attr({
id : node.attr('id'),
width: node.attr('width'),
height: node.attr('height'),
width: normalizeSize(node.attr('width')),
height: normalizeSize(node.attr('height')),
style : style
});
@ -576,8 +584,8 @@
embed.shortEnded = true;
embed.attr({
id: node.attr('id'),
width: node.attr('width'),
height: node.attr('height'),
width: normalizeSize(node.attr('width')),
height: normalizeSize(node.attr('height')),
style : style,
type: typeItem.mimes[0]
});
@ -793,8 +801,8 @@
if (iframe) {
// Get width/height
width = iframe.attr('width');
height = iframe.attr('height');
width = normalizeSize(iframe.attr('width'));
height = normalizeSize(iframe.attr('height'));
style = style || iframe.attr('style');
id = iframe.attr('id');
hspace = iframe.attr('hspace');

@ -1 +1 @@
tinyMCE.addI18n('en.media_dlg',{list:"List",file:"File/URL",advanced:"Advanced",general:"General",title:"Insert/Edit Embedded Media","align_top_left":"Top Left","align_center":"Center","align_left":"Left","align_bottom":"Bottom","align_right":"Right","align_top":"Top","qt_stream_warn":"Streamed RTSP resources should be added to the QT Source field under the Advanced tab.\nYou should also add a non-streamed version to the Source field.",qtsrc:"QT Source",progress:"Progress",sound:"Sound",swstretchvalign:"Stretch V-Align",swstretchhalign:"Stretch H-Align",swstretchstyle:"Stretch Style",scriptcallbacks:"Script Callbacks","align_top_right":"Top Right",uimode:"UI Mode",rate:"Rate",playcount:"Play Count",defaultframe:"Default Frame",currentposition:"Current Position",currentmarker:"Current Marker",captioningid:"Captioning ID",baseurl:"Base URL",balance:"Balance",windowlessvideo:"Windowless Video",stretchtofit:"Stretch to Fit",mute:"Mute",invokeurls:"Invoke URLs",fullscreen:"Full Screen",enabled:"Enabled",autostart:"Auto Start",volume:"Volume",target:"Target",qtsrcchokespeed:"Choke Speed",href:"HREF",endtime:"End Time",starttime:"Start Time",enablejavascript:"Enable JavaScript",correction:"No Correction",targetcache:"Target Cache",playeveryframe:"Play Every Frame",kioskmode:"Kiosk Mode",controller:"Controller",menu:"Show Menu",loop:"Loop",play:"Auto Play",hspace:"H-Space",vspace:"V-Space","class_name":"Class",name:"Name",id:"ID",type:"Type",size:"Dimensions",preview:"Preview","constrain_proportions":"Constrain Proportions",controls:"Controls",numloop:"Num Loops",console:"Console",cache:"Cache",autohref:"Auto HREF",liveconnect:"SWLiveConnect",flashvars:"Flash Vars",base:"Base",bgcolor:"Background",wmode:"WMode",salign:"SAlign",align:"Align",scale:"Scale",quality:"Quality",shuffle:"Shuffle",prefetch:"Prefetch",nojava:"No Java",maintainaspect:"Maintain Aspect",imagestatus:"Image Status",center:"Center",autogotourl:"Auto Goto URL","shockwave_options":"Shockwave Options","rmp_options":"Real Media Player Options","wmp_options":"Windows Media Player Options","qt_options":"QuickTime Options","flash_options":"Flash Options",hidden:"Hidden","align_bottom_left":"Bottom Left","align_bottom_right":"Bottom Right","embedded_audio_options":"Embedded Audio Options","html5_video_options":"HTML5 Video Options",altsource1:"Alternative source 1",altsource2:"Alternative source 2",preload:"Preload",poster:"Poster",source:"Source","html5_audio_options":"Audio Options","preload_none":"Don\'t Preload","preload_metadata":"Preload video metadata","preload_auto":"Let user\'s browser decide",flash:"",quicktime:"",windowsmedia:"",realmedia:"",shockwave:"",audio:"",video:"",iframe:"",embeddedaudio:""});
tinyMCE.addI18n('en.media_dlg',{list:"List",file:"File/URL",advanced:"Advanced",general:"General",title:"Insert/Edit Embedded Media","align_top_left":"Top Left","align_center":"Center","align_left":"Left","align_bottom":"Bottom","align_right":"Right","align_top":"Top","qt_stream_warn":"Streamed RTSP resources should be added to the QT Source field under the Advanced tab.\nYou should also add a non-streamed version to the Source field.",qtsrc:"QT Source",progress:"Progress",sound:"Sound",swstretchvalign:"Stretch V-Align",swstretchhalign:"Stretch H-Align",swstretchstyle:"Stretch Style",scriptcallbacks:"Script Callbacks","align_top_right":"Top Right",uimode:"UI Mode",rate:"Rate",playcount:"Play Count",defaultframe:"Default Frame",currentposition:"Current Position",currentmarker:"Current Marker",captioningid:"Captioning ID",baseurl:"Base URL",balance:"Balance",windowlessvideo:"Windowless Video",stretchtofit:"Stretch to Fit",mute:"Mute",invokeurls:"Invoke URLs",fullscreen:"Full Screen",enabled:"Enabled",autostart:"Auto Start",volume:"Volume",target:"Target",qtsrcchokespeed:"Choke Speed",href:"HREF",endtime:"End Time",starttime:"Start Time",enablejavascript:"Enable JavaScript",correction:"No Correction",targetcache:"Target Cache",playeveryframe:"Play Every Frame",kioskmode:"Kiosk Mode",controller:"Controller",menu:"Show Menu",loop:"Loop",play:"Auto Play",hspace:"H-Space",vspace:"V-Space","class_name":"Class",name:"Name",id:"ID",type:"Type",size:"Dimensions",preview:"Preview","constrain_proportions":"Constrain Proportions",controls:"Controls",numloop:"Num Loops",console:"Console",cache:"Cache",autohref:"Auto HREF",liveconnect:"SWLiveConnect",flashvars:"Flash Vars",base:"Base",bgcolor:"Background",wmode:"WMode",salign:"SAlign",align:"Align",scale:"Scale",quality:"Quality",shuffle:"Shuffle",prefetch:"Prefetch",nojava:"No Java",maintainaspect:"Maintain Aspect",imagestatus:"Image Status",center:"Center",autogotourl:"Auto Goto URL","shockwave_options":"Shockwave Options","rmp_options":"Real Media Player Options","wmp_options":"Windows Media Player Options","qt_options":"QuickTime Options","flash_options":"Flash Options",hidden:"Hidden","align_bottom_left":"Bottom Left","align_bottom_right":"Bottom Right",flash:"",quicktime:"","embedded_audio_options":"Embedded Audio Options",windowsmedia:"",realmedia:"",shockwave:"",audio:"",video:"","html5_video_options":"HTML5 Video Options",altsource1:"Alternative source 1",altsource2:"Alternative source 2",preload:"Preload",poster:"Poster",source:"Source","html5_audio_options":"Audio Options","preload_none":"Don\'t Preload","preload_metadata":"Preload video metadata","preload_auto":"Let user\'s browser decide",iframe:"",embeddedaudio:""});

File diff suppressed because one or more lines are too long

@ -1 +1 @@
tinyMCE.addI18n('uk.style_dlg',{"text_lineheight":"\u0412\u0438\u0441\u043e\u0442\u0430 \u0440\u044f\u0434\u043a\u0443","text_variant":"\u0412\u0430\u0440\u0456\u0430\u043d\u0442","text_style":"\u0421\u0442\u0438\u043b\u044c","text_weight":"\u0422\u043e\u0432\u0449\u0438\u043d\u0430","text_size":"\u0420\u043e\u0437\u043c\u0456\u0440","text_font":"\u0428\u0440\u0438\u0444\u0442","text_props":"\u0422\u0435\u043a\u0441\u0442","positioning_tab":"\u041f\u043e\u0437\u0438\u0446\u0456\u043e\u043d\u0443\u0432\u0430\u043d\u043d\u044f","list_tab":"\u0421\u043f\u0438\u0441\u043e\u043a","border_tab":"\u0420\u0430\u043c\u043a\u0430","box_tab":"\u042f\u0449\u0438\u043a(box)","block_tab":"\u0411\u043b\u043e\u043a","background_tab":"\u0424\u043e\u043d","text_tab":"\u0422\u0435\u043a\u0441\u0442",apply:"\u0417\u0430\u0441\u0442\u043e\u0441\u0443\u0432\u0430\u0442\u0438",title:"\u0420\u0435\u0434\u0430\u0433\u0443\u0432\u0430\u043d\u043d\u044f CSS \u0441\u0442\u0438\u043b\u044e",clip:"\u0421\u043a\u0440\u0456\u043f\u043b\u0435\u043d\u043d\u044f",placement:"\u0420\u043e\u0437\u043c\u0456\u0449\u0435\u043d\u043d\u044f",overflow:"\u041f\u0435\u0440\u0435\u043f\u043e\u0432\u043d\u0435\u043d\u043d\u044f",zindex:"Z-\u0456\u043d\u0434\u0435\u043a\u0441",visibility:"\u0412\u0438\u0434\u0438\u043c\u0456\u0441\u0442\u044c","positioning_type":"\u0422\u0438\u043f",position:"\u041f\u043e\u0437\u0438\u0446\u0456\u044f","bullet_image":"\u0417\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f \u0437\u043d\u0430\u0447\u043a\u0430 \u0432 \u0441\u043f\u0438\u0441\u043a\u0443","list_type":"\u0422\u0438\u043f",color:"\u041a\u043e\u043b\u0456\u0440",height:"\u0412\u0438\u0441\u043e\u0442\u0430",width:"\u0428\u0438\u0440\u0438\u043d\u0430",style:"\u0421\u0442\u0438\u043b\u044c",margin:"Margin",left:"\u041b\u0456\u0432\u043e\u0440\u0443\u0447",bottom:"\u0417\u043d\u0438\u0437\u0443",right:"\u041f\u0440\u0430\u0432\u043e\u0440\u0443\u0447",top:"\u0412\u0433\u043e\u0440\u0443",same:"\u041e\u0434\u043d\u0430\u043a\u043e\u0435 \u0434\u043b\u044f \u0432\u0441\u0456\u0445",padding:"\u0412\u043d\u0443\u0442\u0440\u0456\u0448\u043d\u0456\u0439 \u0432\u0456\u0434\u0441\u0442\u0443\u043f","box_clear":"\u041e\u0447\u0438\u0441\u0442\u043a\u0430","box_float":"\u041f\u043b\u0430\u0432\u0430\u043d\u043d\u044f","box_height":"\u0412\u0438\u0441\u043e\u0442\u0430","box_width":"\u0428\u0438\u0440\u0438\u043d\u0430","block_display":"\u0412\u0456\u0434\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u0438","block_whitespace":"\u041f\u0440\u043e\u0431\u0456\u043b","block_text_indent":"\u0412\u0456\u0434\u0441\u0442\u0443\u043f","block_text_align":"\u0412\u0438\u0440\u0456\u0432\u043d\u044e\u0432\u0430\u043d\u043d\u044f \u0442\u0435\u043a\u0441\u0442\u0443","block_vertical_alignment":"\u0412\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u0435 \u0432\u0438\u0440\u0456\u0432\u043d\u044e\u0432\u0430\u043d\u043d\u044f","block_letterspacing":"\u0412\u0456\u0434\u0441\u0442\u0443\u043f\u0438 \u043c\u0456\u0436 \u043b\u0456\u0442\u0435\u0440\u0430\u043c\u0438","block_wordspacing":"\u0412\u0456\u0434\u0441\u0442\u0443\u043f\u0438 \u043c\u0456\u0436 \u0441\u043b\u043e\u0432\u0430\u043c\u0438","background_vpos":"\u0412\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u0430 \u043f\u043e\u0437\u0438\u0446\u0456\u044f","background_hpos":"\u0413\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u0430 \u043f\u043e\u0437\u0438\u0446\u0456\u044f","background_attachment":"\u0412\u043a\u043b\u0430\u0434\u0435\u043d\u043d\u044f","background_repeat":"\u041f\u043e\u0432\u0442\u043e\u0440","background_image":"\u0424\u043e\u043d\u043e\u0432\u0435 \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f","background_color":"\u041a\u043e\u043b\u0456\u0440 \u0444\u043e\u043d\u0443","text_none":"\u041d\u0456\u0447\u043e\u0433\u043e","text_blink":"\u041c\u0435\u0440\u0435\u0445\u0442\u0456\u043d\u043d\u044f","text_case":"\u0420\u0435\u0433\u0456\u0441\u0442\u0440","text_striketrough":"\u0417\u0430\u043a\u0440\u0435\u0441\u043b\u0435\u043d\u0438\u0439","text_underline":"\u041f\u0456\u0434\u043a\u0440\u0435\u0441\u043b\u0435\u043d\u0438\u0439","text_overline":"\u041d\u0430\u0434\u043a\u0440\u0435\u0441\u043b\u0435\u043d\u0438\u0439","text_decoration":"\u041e\u0444\u043e\u0440\u043c\u043b\u0435\u043d\u043d\u044f","text_color":"\u041a\u043e\u043b\u0456\u0440",text:"\u0422\u0435\u043a\u0441\u0442",background:"Background",block:"Block",box:"Box",border:"Border",list:"List"});
tinyMCE.addI18n('uk.style_dlg',{"text_lineheight":"\u0412\u0438\u0441\u043e\u0442\u0430 \u0440\u044f\u0434\u043a\u0443","text_variant":"\u0412\u0430\u0440\u0456\u0430\u043d\u0442","text_style":"\u0421\u0442\u0438\u043b\u044c","text_weight":"\u0422\u043e\u0432\u0449\u0438\u043d\u0430","text_size":"\u0420\u043e\u0437\u043c\u0456\u0440","text_font":"\u0428\u0440\u0438\u0444\u0442","text_props":"\u0422\u0435\u043a\u0441\u0442","positioning_tab":"\u041f\u043e\u0437\u0438\u0446\u0456\u043e\u043d\u0443\u0432\u0430\u043d\u043d\u044f","list_tab":"\u0421\u043f\u0438\u0441\u043e\u043a","border_tab":"\u0420\u0430\u043c\u043a\u0430","box_tab":"\u042f\u0449\u0438\u043a(box)","block_tab":"\u0411\u043b\u043e\u043a","background_tab":"\u0424\u043e\u043d","text_tab":"\u0422\u0435\u043a\u0441\u0442",apply:"\u0417\u0430\u0441\u0442\u043e\u0441\u0443\u0432\u0430\u0442\u0438",title:"\u0420\u0435\u0434\u0430\u0433\u0443\u0432\u0430\u043d\u043d\u044f CSS \u0441\u0442\u0438\u043b\u044e",clip:"\u0421\u043a\u0440\u0456\u043f\u043b\u0435\u043d\u043d\u044f",placement:"\u0420\u043e\u0437\u043c\u0456\u0449\u0435\u043d\u043d\u044f",overflow:"\u041f\u0435\u0440\u0435\u043f\u043e\u0432\u043d\u0435\u043d\u043d\u044f",zindex:"Z-\u0456\u043d\u0434\u0435\u043a\u0441",visibility:"\u0412\u0438\u0434\u0438\u043c\u0456\u0441\u0442\u044c","positioning_type":"\u0422\u0438\u043f",position:"\u041f\u043e\u0437\u0438\u0446\u0456\u044f","bullet_image":"\u0417\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f \u0437\u043d\u0430\u0447\u043a\u0430 \u0432 \u0441\u043f\u0438\u0441\u043a\u0443","list_type":"\u0422\u0438\u043f",color:"\u041a\u043e\u043b\u0456\u0440",height:"\u0412\u0438\u0441\u043e\u0442\u0430",width:"\u0428\u0438\u0440\u0438\u043d\u0430",style:"\u0421\u0442\u0438\u043b\u044c",margin:"Margin",left:"\u041b\u0456\u0432\u043e\u0440\u0443\u0447",bottom:"\u0417\u043d\u0438\u0437\u0443",right:"\u041f\u0440\u0430\u0432\u043e\u0440\u0443\u0447",top:"\u0412\u0433\u043e\u0440\u0443",same:"\u041e\u0434\u043d\u0430\u043a\u043e\u0435 \u0434\u043b\u044f \u0432\u0441\u0456\u0445",padding:"\u0412\u043d\u0443\u0442\u0440\u0456\u0448\u043d\u0456\u0439 \u0432\u0456\u0434\u0441\u0442\u0443\u043f","box_clear":"\u041e\u0447\u0438\u0441\u0442\u043a\u0430","box_float":"\u041f\u043b\u0430\u0432\u0430\u043d\u043d\u044f","box_height":"\u0412\u0438\u0441\u043e\u0442\u0430","box_width":"\u0428\u0438\u0440\u0438\u043d\u0430","block_display":"\u0412\u0456\u0434\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u0438","block_whitespace":"\u041f\u0440\u043e\u0431\u0456\u043b","block_text_indent":"\u0412\u0456\u0434\u0441\u0442\u0443\u043f","block_text_align":"\u0412\u0438\u0440\u0456\u0432\u043d\u044e\u0432\u0430\u043d\u043d\u044f \u0442\u0435\u043a\u0441\u0442\u0443","block_vertical_alignment":"\u0412\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u0435 \u0432\u0438\u0440\u0456\u0432\u043d\u044e\u0432\u0430\u043d\u043d\u044f","block_letterspacing":"\u0412\u0456\u0434\u0441\u0442\u0443\u043f\u0438 \u043c\u0456\u0436 \u043b\u0456\u0442\u0435\u0440\u0430\u043c\u0438","block_wordspacing":"\u0412\u0456\u0434\u0441\u0442\u0443\u043f\u0438 \u043c\u0456\u0436 \u0441\u043b\u043e\u0432\u0430\u043c\u0438","background_vpos":"\u0412\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u0430 \u043f\u043e\u0437\u0438\u0446\u0456\u044f","background_hpos":"\u0413\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u0430 \u043f\u043e\u0437\u0438\u0446\u0456\u044f","background_attachment":"\u0412\u043a\u043b\u0430\u0434\u0435\u043d\u043d\u044f","background_repeat":"\u041f\u043e\u0432\u0442\u043e\u0440","background_image":"\u0424\u043e\u043d\u043e\u0432\u0435 \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f","background_color":"\u041a\u043e\u043b\u0456\u0440 \u0444\u043e\u043d\u0443","text_none":"\u041d\u0456\u0447\u043e\u0433\u043e","text_blink":"\u041c\u0435\u0440\u0435\u0445\u0442\u0456\u043d\u043d\u044f","text_case":"\u0420\u0435\u0433\u0456\u0441\u0442\u0440","text_striketrough":"\u0417\u0430\u043a\u0440\u0435\u0441\u043b\u0435\u043d\u0438\u0439","text_underline":"\u041f\u0456\u0434\u043a\u0440\u0435\u0441\u043b\u0435\u043d\u0438\u0439","text_overline":"\u041d\u0430\u0434\u043a\u0440\u0435\u0441\u043b\u0435\u043d\u0438\u0439","text_decoration":"\u041e\u0444\u043e\u0440\u043c\u043b\u0435\u043d\u043d\u044f","text_color":"\u041a\u043e\u043b\u0456\u0440",text:"\u0422\u0435\u043a\u0441\u0442",background:"\u0424\u043e\u043d",block:"\u0411\u043b\u043e\u043a",box:"\u041a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440",border:"\u0413\u0440\u0430\u043d\u0438\u0446\u0456",list:"\u0421\u043f\u0438\u0441\u043e\u043a"});

File diff suppressed because it is too large Load Diff

@ -1,19 +1,19 @@
Edit CSS Style plug-in notes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Unlike WYSIWYG editor functionality that operates only on the selected text,
typically by inserting new HTML elements with the specified styles.
This plug-in operates on the HTML blocks surrounding the selected text.
No new HTML elements are created.
This plug-in only operates on the surrounding blocks and not the nearest
parent node. This means that if a block encapsulates a node,
e.g <p><span>text</span></p>, then only the styles in the block are
recognized, not those in the span.
When selecting text that includes multiple blocks at the same level (peers),
this plug-in accumulates the specified styles in all of the surrounding blocks
and populates the dialogue checkboxes accordingly. There is no differentiation
between styles set in all the blocks versus styles set in some of the blocks.
When the [Update] or [Apply] buttons are pressed, the styles selected in the
checkboxes are applied to all blocks that surround the selected text.
Edit CSS Style plug-in notes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Unlike WYSIWYG editor functionality that operates only on the selected text,
typically by inserting new HTML elements with the specified styles.
This plug-in operates on the HTML blocks surrounding the selected text.
No new HTML elements are created.
This plug-in only operates on the surrounding blocks and not the nearest
parent node. This means that if a block encapsulates a node,
e.g <p><span>text</span></p>, then only the styles in the block are
recognized, not those in the span.
When selecting text that includes multiple blocks at the same level (peers),
this plug-in accumulates the specified styles in all of the surrounding blocks
and populates the dialogue checkboxes accordingly. There is no differentiation
between styles set in all the blocks versus styles set in some of the blocks.
When the [Update] or [Apply] buttons are pressed, the styles selected in the
checkboxes are applied to all blocks that surround the selected text.

@ -1,122 +1,122 @@
/**
* editor_plugin_src.js
*
* Copyright 2009, Moxiecode Systems AB
* Released under LGPL License.
*
* License: http://tinymce.moxiecode.com/license
* Contributing: http://tinymce.moxiecode.com/contributing
*/
(function() {
var DOM = tinymce.DOM, Event = tinymce.dom.Event, each = tinymce.each, explode = tinymce.explode;
tinymce.create('tinymce.plugins.TabFocusPlugin', {
init : function(ed, url) {
function tabCancel(ed, e) {
if (e.keyCode === 9)
return Event.cancel(e);
}
function tabHandler(ed, e) {
var x, i, f, el, v;
function find(d) {
el = DOM.select(':input:enabled,*[tabindex]:not(iframe)');
function canSelectRecursive(e) {
return e.nodeName==="BODY" || (e.type != 'hidden' &&
!(e.style.display == "none") &&
!(e.style.visibility == "hidden") && canSelectRecursive(e.parentNode));
}
function canSelectInOldIe(el) {
return el.attributes["tabIndex"].specified || el.nodeName == "INPUT" || el.nodeName == "TEXTAREA";
}
function isOldIe() {
return tinymce.isIE6 || tinymce.isIE7;
}
function canSelect(el) {
return ((!isOldIe() || canSelectInOldIe(el))) && el.getAttribute("tabindex") != '-1' && canSelectRecursive(el);
}
each(el, function(e, i) {
if (e.id == ed.id) {
x = i;
return false;
}
});
if (d > 0) {
for (i = x + 1; i < el.length; i++) {
if (canSelect(el[i]))
return el[i];
}
} else {
for (i = x - 1; i >= 0; i--) {
if (canSelect(el[i]))
return el[i];
}
}
return null;
}
if (e.keyCode === 9) {
v = explode(ed.getParam('tab_focus', ed.getParam('tabfocus_elements', ':prev,:next')));
if (v.length == 1) {
v[1] = v[0];
v[0] = ':prev';
}
// Find element to focus
if (e.shiftKey) {
if (v[0] == ':prev')
el = find(-1);
else
el = DOM.get(v[0]);
} else {
if (v[1] == ':next')
el = find(1);
else
el = DOM.get(v[1]);
}
if (el) {
if (el.id && (ed = tinymce.get(el.id || el.name)))
ed.focus();
else
window.setTimeout(function() {
if (!tinymce.isWebKit)
window.focus();
el.focus();
}, 10);
return Event.cancel(e);
}
}
}
ed.onKeyUp.add(tabCancel);
if (tinymce.isGecko) {
ed.onKeyPress.add(tabHandler);
ed.onKeyDown.add(tabCancel);
} else
ed.onKeyDown.add(tabHandler);
},
getInfo : function() {
return {
longname : 'Tabfocus',
author : 'Moxiecode Systems AB',
authorurl : 'http://tinymce.moxiecode.com',
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/tabfocus',
version : tinymce.majorVersion + "." + tinymce.minorVersion
};
}
});
// Register plugin
tinymce.PluginManager.add('tabfocus', tinymce.plugins.TabFocusPlugin);
})();
/**
* editor_plugin_src.js
*
* Copyright 2009, Moxiecode Systems AB
* Released under LGPL License.
*
* License: http://tinymce.moxiecode.com/license
* Contributing: http://tinymce.moxiecode.com/contributing
*/
(function() {
var DOM = tinymce.DOM, Event = tinymce.dom.Event, each = tinymce.each, explode = tinymce.explode;
tinymce.create('tinymce.plugins.TabFocusPlugin', {
init : function(ed, url) {
function tabCancel(ed, e) {
if (e.keyCode === 9)
return Event.cancel(e);
}
function tabHandler(ed, e) {
var x, i, f, el, v;
function find(d) {
el = DOM.select(':input:enabled,*[tabindex]:not(iframe)');
function canSelectRecursive(e) {
return e.nodeName==="BODY" || (e.type != 'hidden' &&
!(e.style.display == "none") &&
!(e.style.visibility == "hidden") && canSelectRecursive(e.parentNode));
}
function canSelectInOldIe(el) {
return el.attributes["tabIndex"].specified || el.nodeName == "INPUT" || el.nodeName == "TEXTAREA";
}
function isOldIe() {
return tinymce.isIE6 || tinymce.isIE7;
}
function canSelect(el) {
return ((!isOldIe() || canSelectInOldIe(el))) && el.getAttribute("tabindex") != '-1' && canSelectRecursive(el);
}
each(el, function(e, i) {
if (e.id == ed.id) {
x = i;
return false;
}
});
if (d > 0) {
for (i = x + 1; i < el.length; i++) {
if (canSelect(el[i]))
return el[i];
}
} else {
for (i = x - 1; i >= 0; i--) {
if (canSelect(el[i]))
return el[i];
}
}
return null;
}
if (e.keyCode === 9) {
v = explode(ed.getParam('tab_focus', ed.getParam('tabfocus_elements', ':prev,:next')));
if (v.length == 1) {
v[1] = v[0];
v[0] = ':prev';
}
// Find element to focus
if (e.shiftKey) {
if (v[0] == ':prev')
el = find(-1);
else
el = DOM.get(v[0]);
} else {
if (v[1] == ':next')
el = find(1);
else
el = DOM.get(v[1]);
}
if (el) {
if (el.id && (ed = tinymce.get(el.id || el.name)))
ed.focus();
else
window.setTimeout(function() {
if (!tinymce.isWebKit)
window.focus();
el.focus();
}, 10);
return Event.cancel(e);
}
}
}
ed.onKeyUp.add(tabCancel);
if (tinymce.isGecko) {
ed.onKeyPress.add(tabHandler);
ed.onKeyDown.add(tabCancel);
} else
ed.onKeyDown.add(tabHandler);
},
getInfo : function() {
return {
longname : 'Tabfocus',
author : 'Moxiecode Systems AB',
authorurl : 'http://tinymce.moxiecode.com',
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/tabfocus',
version : tinymce.majorVersion + "." + tinymce.minorVersion
};
}
});
// Register plugin
tinymce.PluginManager.add('tabfocus', tinymce.plugins.TabFocusPlugin);
})();

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

@ -247,7 +247,10 @@ function insertTable() {
// Fixes a bug in IE where the caret cannot be placed after the table if the table is at the end of the document
if (tinymce.isIE && node.nextSibling == null) {
dom.insertAfter(dom.create('p'), node);
if (inst.settings.forced_root_block)
dom.insertAfter(dom.create(inst.settings.forced_root_block), node);
else
dom.insertAfter(dom.create('br', {'data-mce-bogus': '1'}), node);
}
try {

@ -1,345 +1,345 @@
tinyMCEPopup.requireLangPack();
var detail = 50, strhex = "0123456789abcdef", i, isMouseDown = false, isMouseOver = false;
var colors = [
"#000000","#000033","#000066","#000099","#0000cc","#0000ff","#330000","#330033",
"#330066","#330099","#3300cc","#3300ff","#660000","#660033","#660066","#660099",
"#6600cc","#6600ff","#990000","#990033","#990066","#990099","#9900cc","#9900ff",
"#cc0000","#cc0033","#cc0066","#cc0099","#cc00cc","#cc00ff","#ff0000","#ff0033",
"#ff0066","#ff0099","#ff00cc","#ff00ff","#003300","#003333","#003366","#003399",
"#0033cc","#0033ff","#333300","#333333","#333366","#333399","#3333cc","#3333ff",
"#663300","#663333","#663366","#663399","#6633cc","#6633ff","#993300","#993333",
"#993366","#993399","#9933cc","#9933ff","#cc3300","#cc3333","#cc3366","#cc3399",
"#cc33cc","#cc33ff","#ff3300","#ff3333","#ff3366","#ff3399","#ff33cc","#ff33ff",
"#006600","#006633","#006666","#006699","#0066cc","#0066ff","#336600","#336633",
"#336666","#336699","#3366cc","#3366ff","#666600","#666633","#666666","#666699",
"#6666cc","#6666ff","#996600","#996633","#996666","#996699","#9966cc","#9966ff",
"#cc6600","#cc6633","#cc6666","#cc6699","#cc66cc","#cc66ff","#ff6600","#ff6633",
"#ff6666","#ff6699","#ff66cc","#ff66ff","#009900","#009933","#009966","#009999",
"#0099cc","#0099ff","#339900","#339933","#339966","#339999","#3399cc","#3399ff",
"#669900","#669933","#669966","#669999","#6699cc","#6699ff","#999900","#999933",
"#999966","#999999","#9999cc","#9999ff","#cc9900","#cc9933","#cc9966","#cc9999",
"#cc99cc","#cc99ff","#ff9900","#ff9933","#ff9966","#ff9999","#ff99cc","#ff99ff",
"#00cc00","#00cc33","#00cc66","#00cc99","#00cccc","#00ccff","#33cc00","#33cc33",
"#33cc66","#33cc99","#33cccc","#33ccff","#66cc00","#66cc33","#66cc66","#66cc99",
"#66cccc","#66ccff","#99cc00","#99cc33","#99cc66","#99cc99","#99cccc","#99ccff",
"#cccc00","#cccc33","#cccc66","#cccc99","#cccccc","#ccccff","#ffcc00","#ffcc33",
"#ffcc66","#ffcc99","#ffcccc","#ffccff","#00ff00","#00ff33","#00ff66","#00ff99",
"#00ffcc","#00ffff","#33ff00","#33ff33","#33ff66","#33ff99","#33ffcc","#33ffff",
"#66ff00","#66ff33","#66ff66","#66ff99","#66ffcc","#66ffff","#99ff00","#99ff33",
"#99ff66","#99ff99","#99ffcc","#99ffff","#ccff00","#ccff33","#ccff66","#ccff99",
"#ccffcc","#ccffff","#ffff00","#ffff33","#ffff66","#ffff99","#ffffcc","#ffffff"
];
var named = {
'#F0F8FF':'Alice Blue','#FAEBD7':'Antique White','#00FFFF':'Aqua','#7FFFD4':'Aquamarine','#F0FFFF':'Azure','#F5F5DC':'Beige',
'#FFE4C4':'Bisque','#000000':'Black','#FFEBCD':'Blanched Almond','#0000FF':'Blue','#8A2BE2':'Blue Violet','#A52A2A':'Brown',
'#DEB887':'Burly Wood','#5F9EA0':'Cadet Blue','#7FFF00':'Chartreuse','#D2691E':'Chocolate','#FF7F50':'Coral','#6495ED':'Cornflower Blue',
'#FFF8DC':'Cornsilk','#DC143C':'Crimson','#00FFFF':'Cyan','#00008B':'Dark Blue','#008B8B':'Dark Cyan','#B8860B':'Dark Golden Rod',
'#A9A9A9':'Dark Gray','#A9A9A9':'Dark Grey','#006400':'Dark Green','#BDB76B':'Dark Khaki','#8B008B':'Dark Magenta','#556B2F':'Dark Olive Green',
'#FF8C00':'Darkorange','#9932CC':'Dark Orchid','#8B0000':'Dark Red','#E9967A':'Dark Salmon','#8FBC8F':'Dark Sea Green','#483D8B':'Dark Slate Blue',
'#2F4F4F':'Dark Slate Gray','#2F4F4F':'Dark Slate Grey','#00CED1':'Dark Turquoise','#9400D3':'Dark Violet','#FF1493':'Deep Pink','#00BFFF':'Deep Sky Blue',
'#696969':'Dim Gray','#696969':'Dim Grey','#1E90FF':'Dodger Blue','#B22222':'Fire Brick','#FFFAF0':'Floral White','#228B22':'Forest Green',
'#FF00FF':'Fuchsia','#DCDCDC':'Gainsboro','#F8F8FF':'Ghost White','#FFD700':'Gold','#DAA520':'Golden Rod','#808080':'Gray','#808080':'Grey',
'#008000':'Green','#ADFF2F':'Green Yellow','#F0FFF0':'Honey Dew','#FF69B4':'Hot Pink','#CD5C5C':'Indian Red','#4B0082':'Indigo','#FFFFF0':'Ivory',
'#F0E68C':'Khaki','#E6E6FA':'Lavender','#FFF0F5':'Lavender Blush','#7CFC00':'Lawn Green','#FFFACD':'Lemon Chiffon','#ADD8E6':'Light Blue',
'#F08080':'Light Coral','#E0FFFF':'Light Cyan','#FAFAD2':'Light Golden Rod Yellow','#D3D3D3':'Light Gray','#D3D3D3':'Light Grey','#90EE90':'Light Green',
'#FFB6C1':'Light Pink','#FFA07A':'Light Salmon','#20B2AA':'Light Sea Green','#87CEFA':'Light Sky Blue','#778899':'Light Slate Gray','#778899':'Light Slate Grey',
'#B0C4DE':'Light Steel Blue','#FFFFE0':'Light Yellow','#00FF00':'Lime','#32CD32':'Lime Green','#FAF0E6':'Linen','#FF00FF':'Magenta','#800000':'Maroon',
'#66CDAA':'Medium Aqua Marine','#0000CD':'Medium Blue','#BA55D3':'Medium Orchid','#9370D8':'Medium Purple','#3CB371':'Medium Sea Green','#7B68EE':'Medium Slate Blue',
'#00FA9A':'Medium Spring Green','#48D1CC':'Medium Turquoise','#C71585':'Medium Violet Red','#191970':'Midnight Blue','#F5FFFA':'Mint Cream','#FFE4E1':'Misty Rose','#FFE4B5':'Moccasin',
'#FFDEAD':'Navajo White','#000080':'Navy','#FDF5E6':'Old Lace','#808000':'Olive','#6B8E23':'Olive Drab','#FFA500':'Orange','#FF4500':'Orange Red','#DA70D6':'Orchid',
'#EEE8AA':'Pale Golden Rod','#98FB98':'Pale Green','#AFEEEE':'Pale Turquoise','#D87093':'Pale Violet Red','#FFEFD5':'Papaya Whip','#FFDAB9':'Peach Puff',
'#CD853F':'Peru','#FFC0CB':'Pink','#DDA0DD':'Plum','#B0E0E6':'Powder Blue','#800080':'Purple','#FF0000':'Red','#BC8F8F':'Rosy Brown','#4169E1':'Royal Blue',
'#8B4513':'Saddle Brown','#FA8072':'Salmon','#F4A460':'Sandy Brown','#2E8B57':'Sea Green','#FFF5EE':'Sea Shell','#A0522D':'Sienna','#C0C0C0':'Silver',
'#87CEEB':'Sky Blue','#6A5ACD':'Slate Blue','#708090':'Slate Gray','#708090':'Slate Grey','#FFFAFA':'Snow','#00FF7F':'Spring Green',
'#4682B4':'Steel Blue','#D2B48C':'Tan','#008080':'Teal','#D8BFD8':'Thistle','#FF6347':'Tomato','#40E0D0':'Turquoise','#EE82EE':'Violet',
'#F5DEB3':'Wheat','#FFFFFF':'White','#F5F5F5':'White Smoke','#FFFF00':'Yellow','#9ACD32':'Yellow Green'
};
var namedLookup = {};
function init() {
var inputColor = convertRGBToHex(tinyMCEPopup.getWindowArg('input_color')), key, value;
tinyMCEPopup.resizeToInnerSize();
generatePicker();
generateWebColors();
generateNamedColors();
if (inputColor) {
changeFinalColor(inputColor);
col = convertHexToRGB(inputColor);
if (col)
updateLight(col.r, col.g, col.b);
}
for (key in named) {
value = named[key];
namedLookup[value.replace(/\s+/, '').toLowerCase()] = key.replace(/#/, '').toLowerCase();
}
}
function toHexColor(color) {
var matches, red, green, blue, toInt = parseInt;
function hex(value) {
value = parseInt(value).toString(16);
return value.length > 1 ? value : '0' + value; // Padd with leading zero
};
color = tinymce.trim(color);
color = color.replace(/^[#]/, '').toLowerCase(); // remove leading '#'
color = namedLookup[color] || color;
matches = /^rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)$/.exec(color);
if (matches) {
red = toInt(matches[1]);
green = toInt(matches[2]);
blue = toInt(matches[3]);
} else {
matches = /^([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/.exec(color);
if (matches) {
red = toInt(matches[1], 16);
green = toInt(matches[2], 16);
blue = toInt(matches[3], 16);
} else {
matches = /^([0-9a-f])([0-9a-f])([0-9a-f])$/.exec(color);
if (matches) {
red = toInt(matches[1] + matches[1], 16);
green = toInt(matches[2] + matches[2], 16);
blue = toInt(matches[3] + matches[3], 16);
} else {
return '';
}
}
}
return '#' + hex(red) + hex(green) + hex(blue);
}
function insertAction() {
var color = document.getElementById("color").value, f = tinyMCEPopup.getWindowArg('func');
var hexColor = toHexColor(color);
if (hexColor === '') {
var text = tinyMCEPopup.editor.getLang('advanced_dlg.invalid_color_value');
tinyMCEPopup.alert(text + ': ' + color);
}
else {
tinyMCEPopup.restoreSelection();
if (f)
f(hexColor);
tinyMCEPopup.close();
}
}
function showColor(color, name) {
if (name)
document.getElementById("colorname").innerHTML = name;
document.getElementById("preview").style.backgroundColor = color;
document.getElementById("color").value = color.toUpperCase();
}
function convertRGBToHex(col) {
var re = new RegExp("rgb\\s*\\(\\s*([0-9]+).*,\\s*([0-9]+).*,\\s*([0-9]+).*\\)", "gi");
if (!col)
return col;
var rgb = col.replace(re, "$1,$2,$3").split(',');
if (rgb.length == 3) {
r = parseInt(rgb[0]).toString(16);
g = parseInt(rgb[1]).toString(16);
b = parseInt(rgb[2]).toString(16);
r = r.length == 1 ? '0' + r : r;
g = g.length == 1 ? '0' + g : g;
b = b.length == 1 ? '0' + b : b;
return "#" + r + g + b;
}
return col;
}
function convertHexToRGB(col) {
if (col.indexOf('#') != -1) {
col = col.replace(new RegExp('[^0-9A-F]', 'gi'), '');
r = parseInt(col.substring(0, 2), 16);
g = parseInt(col.substring(2, 4), 16);
b = parseInt(col.substring(4, 6), 16);
return {r : r, g : g, b : b};
}
return null;
}
function generatePicker() {
var el = document.getElementById('light'), h = '', i;
for (i = 0; i < detail; i++){
h += '<div id="gs'+i+'" style="background-color:#000000; width:15px; height:3px; border-style:none; border-width:0px;"'
+ ' onclick="changeFinalColor(this.style.backgroundColor)"'
+ ' onmousedown="isMouseDown = true; return false;"'
+ ' onmouseup="isMouseDown = false;"'
+ ' onmousemove="if (isMouseDown && isMouseOver) changeFinalColor(this.style.backgroundColor); return false;"'
+ ' onmouseover="isMouseOver = true;"'
+ ' onmouseout="isMouseOver = false;"'
+ '></div>';
}
el.innerHTML = h;
}
function generateWebColors() {
var el = document.getElementById('webcolors'), h = '', i;
if (el.className == 'generated')
return;
// TODO: VoiceOver doesn't seem to support legend as a label referenced by labelledby.
h += '<div role="listbox" aria-labelledby="webcolors_title" tabindex="0"><table role="presentation" border="0" cellspacing="1" cellpadding="0">'
+ '<tr>';
for (i=0; i<colors.length; i++) {
h += '<td bgcolor="' + colors[i] + '" width="10" height="10">'
+ '<a href="javascript:insertAction();" role="option" tabindex="-1" aria-labelledby="web_colors_' + i + '" onfocus="showColor(\'' + colors[i] + '\');" onmouseover="showColor(\'' + colors[i] + '\');" style="display:block;width:10px;height:10px;overflow:hidden;">';
if (tinyMCEPopup.editor.forcedHighContrastMode) {
h += '<canvas class="mceColorSwatch" height="10" width="10" data-color="' + colors[i] + '"></canvas>';
}
h += '<span class="mceVoiceLabel" style="display:none;" id="web_colors_' + i + '">' + colors[i].toUpperCase() + '</span>';
h += '</a></td>';
if ((i+1) % 18 == 0)
h += '</tr><tr>';
}
h += '</table></div>';
el.innerHTML = h;
el.className = 'generated';
paintCanvas(el);
enableKeyboardNavigation(el.firstChild);
}
function paintCanvas(el) {
tinyMCEPopup.getWin().tinymce.each(tinyMCEPopup.dom.select('canvas.mceColorSwatch', el), function(canvas) {
var context;
if (canvas.getContext && (context = canvas.getContext("2d"))) {
context.fillStyle = canvas.getAttribute('data-color');
context.fillRect(0, 0, 10, 10);
}
});
}
function generateNamedColors() {
var el = document.getElementById('namedcolors'), h = '', n, v, i = 0;
if (el.className == 'generated')
return;
for (n in named) {
v = named[n];
h += '<a href="javascript:insertAction();" role="option" tabindex="-1" aria-labelledby="named_colors_' + i + '" onfocus="showColor(\'' + n + '\',\'' + v + '\');" onmouseover="showColor(\'' + n + '\',\'' + v + '\');" style="background-color: ' + n + '">';
if (tinyMCEPopup.editor.forcedHighContrastMode) {
h += '<canvas class="mceColorSwatch" height="10" width="10" data-color="' + colors[i] + '"></canvas>';
}
h += '<span class="mceVoiceLabel" style="display:none;" id="named_colors_' + i + '">' + v + '</span>';
h += '</a>';
i++;
}
el.innerHTML = h;
el.className = 'generated';
paintCanvas(el);
enableKeyboardNavigation(el);
}
function enableKeyboardNavigation(el) {
tinyMCEPopup.editor.windowManager.createInstance('tinymce.ui.KeyboardNavigation', {
root: el,
items: tinyMCEPopup.dom.select('a', el)
}, tinyMCEPopup.dom);
}
function dechex(n) {
return strhex.charAt(Math.floor(n / 16)) + strhex.charAt(n % 16);
}
function computeColor(e) {
var x, y, partWidth, partDetail, imHeight, r, g, b, coef, i, finalCoef, finalR, finalG, finalB, pos = tinyMCEPopup.dom.getPos(e.target);
x = e.offsetX ? e.offsetX : (e.target ? e.clientX - pos.x : 0);
y = e.offsetY ? e.offsetY : (e.target ? e.clientY - pos.y : 0);
partWidth = document.getElementById('colors').width / 6;
partDetail = detail / 2;
imHeight = document.getElementById('colors').height;
r = (x >= 0)*(x < partWidth)*255 + (x >= partWidth)*(x < 2*partWidth)*(2*255 - x * 255 / partWidth) + (x >= 4*partWidth)*(x < 5*partWidth)*(-4*255 + x * 255 / partWidth) + (x >= 5*partWidth)*(x < 6*partWidth)*255;
g = (x >= 0)*(x < partWidth)*(x * 255 / partWidth) + (x >= partWidth)*(x < 3*partWidth)*255 + (x >= 3*partWidth)*(x < 4*partWidth)*(4*255 - x * 255 / partWidth);
b = (x >= 2*partWidth)*(x < 3*partWidth)*(-2*255 + x * 255 / partWidth) + (x >= 3*partWidth)*(x < 5*partWidth)*255 + (x >= 5*partWidth)*(x < 6*partWidth)*(6*255 - x * 255 / partWidth);
coef = (imHeight - y) / imHeight;
r = 128 + (r - 128) * coef;
g = 128 + (g - 128) * coef;
b = 128 + (b - 128) * coef;
changeFinalColor('#' + dechex(r) + dechex(g) + dechex(b));
updateLight(r, g, b);
}
function updateLight(r, g, b) {
var i, partDetail = detail / 2, finalCoef, finalR, finalG, finalB, color;
for (i=0; i<detail; i++) {
if ((i>=0) && (i<partDetail)) {
finalCoef = i / partDetail;
finalR = dechex(255 - (255 - r) * finalCoef);
finalG = dechex(255 - (255 - g) * finalCoef);
finalB = dechex(255 - (255 - b) * finalCoef);
} else {
finalCoef = 2 - i / partDetail;
finalR = dechex(r * finalCoef);
finalG = dechex(g * finalCoef);
finalB = dechex(b * finalCoef);
}
color = finalR + finalG + finalB;
setCol('gs' + i, '#'+color);
}
}
function changeFinalColor(color) {
if (color.indexOf('#') == -1)
color = convertRGBToHex(color);
setCol('preview', color);
document.getElementById('color').value = color;
}
function setCol(e, c) {
try {
document.getElementById(e).style.backgroundColor = c;
} catch (ex) {
// Ignore IE warning
}
}
tinyMCEPopup.onInit.add(init);
tinyMCEPopup.requireLangPack();
var detail = 50, strhex = "0123456789abcdef", i, isMouseDown = false, isMouseOver = false;
var colors = [
"#000000","#000033","#000066","#000099","#0000cc","#0000ff","#330000","#330033",
"#330066","#330099","#3300cc","#3300ff","#660000","#660033","#660066","#660099",
"#6600cc","#6600ff","#990000","#990033","#990066","#990099","#9900cc","#9900ff",
"#cc0000","#cc0033","#cc0066","#cc0099","#cc00cc","#cc00ff","#ff0000","#ff0033",
"#ff0066","#ff0099","#ff00cc","#ff00ff","#003300","#003333","#003366","#003399",
"#0033cc","#0033ff","#333300","#333333","#333366","#333399","#3333cc","#3333ff",
"#663300","#663333","#663366","#663399","#6633cc","#6633ff","#993300","#993333",
"#993366","#993399","#9933cc","#9933ff","#cc3300","#cc3333","#cc3366","#cc3399",
"#cc33cc","#cc33ff","#ff3300","#ff3333","#ff3366","#ff3399","#ff33cc","#ff33ff",
"#006600","#006633","#006666","#006699","#0066cc","#0066ff","#336600","#336633",
"#336666","#336699","#3366cc","#3366ff","#666600","#666633","#666666","#666699",
"#6666cc","#6666ff","#996600","#996633","#996666","#996699","#9966cc","#9966ff",
"#cc6600","#cc6633","#cc6666","#cc6699","#cc66cc","#cc66ff","#ff6600","#ff6633",
"#ff6666","#ff6699","#ff66cc","#ff66ff","#009900","#009933","#009966","#009999",
"#0099cc","#0099ff","#339900","#339933","#339966","#339999","#3399cc","#3399ff",
"#669900","#669933","#669966","#669999","#6699cc","#6699ff","#999900","#999933",
"#999966","#999999","#9999cc","#9999ff","#cc9900","#cc9933","#cc9966","#cc9999",
"#cc99cc","#cc99ff","#ff9900","#ff9933","#ff9966","#ff9999","#ff99cc","#ff99ff",
"#00cc00","#00cc33","#00cc66","#00cc99","#00cccc","#00ccff","#33cc00","#33cc33",
"#33cc66","#33cc99","#33cccc","#33ccff","#66cc00","#66cc33","#66cc66","#66cc99",
"#66cccc","#66ccff","#99cc00","#99cc33","#99cc66","#99cc99","#99cccc","#99ccff",
"#cccc00","#cccc33","#cccc66","#cccc99","#cccccc","#ccccff","#ffcc00","#ffcc33",
"#ffcc66","#ffcc99","#ffcccc","#ffccff","#00ff00","#00ff33","#00ff66","#00ff99",
"#00ffcc","#00ffff","#33ff00","#33ff33","#33ff66","#33ff99","#33ffcc","#33ffff",
"#66ff00","#66ff33","#66ff66","#66ff99","#66ffcc","#66ffff","#99ff00","#99ff33",
"#99ff66","#99ff99","#99ffcc","#99ffff","#ccff00","#ccff33","#ccff66","#ccff99",
"#ccffcc","#ccffff","#ffff00","#ffff33","#ffff66","#ffff99","#ffffcc","#ffffff"
];
var named = {
'#F0F8FF':'Alice Blue','#FAEBD7':'Antique White','#00FFFF':'Aqua','#7FFFD4':'Aquamarine','#F0FFFF':'Azure','#F5F5DC':'Beige',
'#FFE4C4':'Bisque','#000000':'Black','#FFEBCD':'Blanched Almond','#0000FF':'Blue','#8A2BE2':'Blue Violet','#A52A2A':'Brown',
'#DEB887':'Burly Wood','#5F9EA0':'Cadet Blue','#7FFF00':'Chartreuse','#D2691E':'Chocolate','#FF7F50':'Coral','#6495ED':'Cornflower Blue',
'#FFF8DC':'Cornsilk','#DC143C':'Crimson','#00FFFF':'Cyan','#00008B':'Dark Blue','#008B8B':'Dark Cyan','#B8860B':'Dark Golden Rod',
'#A9A9A9':'Dark Gray','#A9A9A9':'Dark Grey','#006400':'Dark Green','#BDB76B':'Dark Khaki','#8B008B':'Dark Magenta','#556B2F':'Dark Olive Green',
'#FF8C00':'Darkorange','#9932CC':'Dark Orchid','#8B0000':'Dark Red','#E9967A':'Dark Salmon','#8FBC8F':'Dark Sea Green','#483D8B':'Dark Slate Blue',
'#2F4F4F':'Dark Slate Gray','#2F4F4F':'Dark Slate Grey','#00CED1':'Dark Turquoise','#9400D3':'Dark Violet','#FF1493':'Deep Pink','#00BFFF':'Deep Sky Blue',
'#696969':'Dim Gray','#696969':'Dim Grey','#1E90FF':'Dodger Blue','#B22222':'Fire Brick','#FFFAF0':'Floral White','#228B22':'Forest Green',
'#FF00FF':'Fuchsia','#DCDCDC':'Gainsboro','#F8F8FF':'Ghost White','#FFD700':'Gold','#DAA520':'Golden Rod','#808080':'Gray','#808080':'Grey',
'#008000':'Green','#ADFF2F':'Green Yellow','#F0FFF0':'Honey Dew','#FF69B4':'Hot Pink','#CD5C5C':'Indian Red','#4B0082':'Indigo','#FFFFF0':'Ivory',
'#F0E68C':'Khaki','#E6E6FA':'Lavender','#FFF0F5':'Lavender Blush','#7CFC00':'Lawn Green','#FFFACD':'Lemon Chiffon','#ADD8E6':'Light Blue',
'#F08080':'Light Coral','#E0FFFF':'Light Cyan','#FAFAD2':'Light Golden Rod Yellow','#D3D3D3':'Light Gray','#D3D3D3':'Light Grey','#90EE90':'Light Green',
'#FFB6C1':'Light Pink','#FFA07A':'Light Salmon','#20B2AA':'Light Sea Green','#87CEFA':'Light Sky Blue','#778899':'Light Slate Gray','#778899':'Light Slate Grey',
'#B0C4DE':'Light Steel Blue','#FFFFE0':'Light Yellow','#00FF00':'Lime','#32CD32':'Lime Green','#FAF0E6':'Linen','#FF00FF':'Magenta','#800000':'Maroon',
'#66CDAA':'Medium Aqua Marine','#0000CD':'Medium Blue','#BA55D3':'Medium Orchid','#9370D8':'Medium Purple','#3CB371':'Medium Sea Green','#7B68EE':'Medium Slate Blue',
'#00FA9A':'Medium Spring Green','#48D1CC':'Medium Turquoise','#C71585':'Medium Violet Red','#191970':'Midnight Blue','#F5FFFA':'Mint Cream','#FFE4E1':'Misty Rose','#FFE4B5':'Moccasin',
'#FFDEAD':'Navajo White','#000080':'Navy','#FDF5E6':'Old Lace','#808000':'Olive','#6B8E23':'Olive Drab','#FFA500':'Orange','#FF4500':'Orange Red','#DA70D6':'Orchid',
'#EEE8AA':'Pale Golden Rod','#98FB98':'Pale Green','#AFEEEE':'Pale Turquoise','#D87093':'Pale Violet Red','#FFEFD5':'Papaya Whip','#FFDAB9':'Peach Puff',
'#CD853F':'Peru','#FFC0CB':'Pink','#DDA0DD':'Plum','#B0E0E6':'Powder Blue','#800080':'Purple','#FF0000':'Red','#BC8F8F':'Rosy Brown','#4169E1':'Royal Blue',
'#8B4513':'Saddle Brown','#FA8072':'Salmon','#F4A460':'Sandy Brown','#2E8B57':'Sea Green','#FFF5EE':'Sea Shell','#A0522D':'Sienna','#C0C0C0':'Silver',
'#87CEEB':'Sky Blue','#6A5ACD':'Slate Blue','#708090':'Slate Gray','#708090':'Slate Grey','#FFFAFA':'Snow','#00FF7F':'Spring Green',
'#4682B4':'Steel Blue','#D2B48C':'Tan','#008080':'Teal','#D8BFD8':'Thistle','#FF6347':'Tomato','#40E0D0':'Turquoise','#EE82EE':'Violet',
'#F5DEB3':'Wheat','#FFFFFF':'White','#F5F5F5':'White Smoke','#FFFF00':'Yellow','#9ACD32':'Yellow Green'
};
var namedLookup = {};
function init() {
var inputColor = convertRGBToHex(tinyMCEPopup.getWindowArg('input_color')), key, value;
tinyMCEPopup.resizeToInnerSize();
generatePicker();
generateWebColors();
generateNamedColors();
if (inputColor) {
changeFinalColor(inputColor);
col = convertHexToRGB(inputColor);
if (col)
updateLight(col.r, col.g, col.b);
}
for (key in named) {
value = named[key];
namedLookup[value.replace(/\s+/, '').toLowerCase()] = key.replace(/#/, '').toLowerCase();
}
}
function toHexColor(color) {
var matches, red, green, blue, toInt = parseInt;
function hex(value) {
value = parseInt(value).toString(16);
return value.length > 1 ? value : '0' + value; // Padd with leading zero
};
color = tinymce.trim(color);
color = color.replace(/^[#]/, '').toLowerCase(); // remove leading '#'
color = namedLookup[color] || color;
matches = /^rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)$/.exec(color);
if (matches) {
red = toInt(matches[1]);
green = toInt(matches[2]);
blue = toInt(matches[3]);
} else {
matches = /^([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/.exec(color);
if (matches) {
red = toInt(matches[1], 16);
green = toInt(matches[2], 16);
blue = toInt(matches[3], 16);
} else {
matches = /^([0-9a-f])([0-9a-f])([0-9a-f])$/.exec(color);
if (matches) {
red = toInt(matches[1] + matches[1], 16);
green = toInt(matches[2] + matches[2], 16);
blue = toInt(matches[3] + matches[3], 16);
} else {
return '';
}
}
}
return '#' + hex(red) + hex(green) + hex(blue);
}
function insertAction() {
var color = document.getElementById("color").value, f = tinyMCEPopup.getWindowArg('func');
var hexColor = toHexColor(color);
if (hexColor === '') {
var text = tinyMCEPopup.editor.getLang('advanced_dlg.invalid_color_value');
tinyMCEPopup.alert(text + ': ' + color);
}
else {
tinyMCEPopup.restoreSelection();
if (f)
f(hexColor);
tinyMCEPopup.close();
}
}
function showColor(color, name) {
if (name)
document.getElementById("colorname").innerHTML = name;
document.getElementById("preview").style.backgroundColor = color;
document.getElementById("color").value = color.toUpperCase();
}
function convertRGBToHex(col) {
var re = new RegExp("rgb\\s*\\(\\s*([0-9]+).*,\\s*([0-9]+).*,\\s*([0-9]+).*\\)", "gi");
if (!col)
return col;
var rgb = col.replace(re, "$1,$2,$3").split(',');
if (rgb.length == 3) {
r = parseInt(rgb[0]).toString(16);
g = parseInt(rgb[1]).toString(16);
b = parseInt(rgb[2]).toString(16);
r = r.length == 1 ? '0' + r : r;
g = g.length == 1 ? '0' + g : g;
b = b.length == 1 ? '0' + b : b;
return "#" + r + g + b;
}
return col;
}
function convertHexToRGB(col) {
if (col.indexOf('#') != -1) {
col = col.replace(new RegExp('[^0-9A-F]', 'gi'), '');
r = parseInt(col.substring(0, 2), 16);
g = parseInt(col.substring(2, 4), 16);
b = parseInt(col.substring(4, 6), 16);
return {r : r, g : g, b : b};
}
return null;
}
function generatePicker() {
var el = document.getElementById('light'), h = '', i;
for (i = 0; i < detail; i++){
h += '<div id="gs'+i+'" style="background-color:#000000; width:15px; height:3px; border-style:none; border-width:0px;"'
+ ' onclick="changeFinalColor(this.style.backgroundColor)"'
+ ' onmousedown="isMouseDown = true; return false;"'
+ ' onmouseup="isMouseDown = false;"'
+ ' onmousemove="if (isMouseDown && isMouseOver) changeFinalColor(this.style.backgroundColor); return false;"'
+ ' onmouseover="isMouseOver = true;"'
+ ' onmouseout="isMouseOver = false;"'
+ '></div>';
}
el.innerHTML = h;
}
function generateWebColors() {
var el = document.getElementById('webcolors'), h = '', i;
if (el.className == 'generated')
return;
// TODO: VoiceOver doesn't seem to support legend as a label referenced by labelledby.
h += '<div role="listbox" aria-labelledby="webcolors_title" tabindex="0"><table role="presentation" border="0" cellspacing="1" cellpadding="0">'
+ '<tr>';
for (i=0; i<colors.length; i++) {
h += '<td bgcolor="' + colors[i] + '" width="10" height="10">'
+ '<a href="javascript:insertAction();" role="option" tabindex="-1" aria-labelledby="web_colors_' + i + '" onfocus="showColor(\'' + colors[i] + '\');" onmouseover="showColor(\'' + colors[i] + '\');" style="display:block;width:10px;height:10px;overflow:hidden;">';
if (tinyMCEPopup.editor.forcedHighContrastMode) {
h += '<canvas class="mceColorSwatch" height="10" width="10" data-color="' + colors[i] + '"></canvas>';
}
h += '<span class="mceVoiceLabel" style="display:none;" id="web_colors_' + i + '">' + colors[i].toUpperCase() + '</span>';
h += '</a></td>';
if ((i+1) % 18 == 0)
h += '</tr><tr>';
}
h += '</table></div>';
el.innerHTML = h;
el.className = 'generated';
paintCanvas(el);
enableKeyboardNavigation(el.firstChild);
}
function paintCanvas(el) {
tinyMCEPopup.getWin().tinymce.each(tinyMCEPopup.dom.select('canvas.mceColorSwatch', el), function(canvas) {
var context;
if (canvas.getContext && (context = canvas.getContext("2d"))) {
context.fillStyle = canvas.getAttribute('data-color');
context.fillRect(0, 0, 10, 10);
}
});
}
function generateNamedColors() {
var el = document.getElementById('namedcolors'), h = '', n, v, i = 0;
if (el.className == 'generated')
return;
for (n in named) {
v = named[n];
h += '<a href="javascript:insertAction();" role="option" tabindex="-1" aria-labelledby="named_colors_' + i + '" onfocus="showColor(\'' + n + '\',\'' + v + '\');" onmouseover="showColor(\'' + n + '\',\'' + v + '\');" style="background-color: ' + n + '">';
if (tinyMCEPopup.editor.forcedHighContrastMode) {
h += '<canvas class="mceColorSwatch" height="10" width="10" data-color="' + colors[i] + '"></canvas>';
}
h += '<span class="mceVoiceLabel" style="display:none;" id="named_colors_' + i + '">' + v + '</span>';
h += '</a>';
i++;
}
el.innerHTML = h;
el.className = 'generated';
paintCanvas(el);
enableKeyboardNavigation(el);
}
function enableKeyboardNavigation(el) {
tinyMCEPopup.editor.windowManager.createInstance('tinymce.ui.KeyboardNavigation', {
root: el,
items: tinyMCEPopup.dom.select('a', el)
}, tinyMCEPopup.dom);
}
function dechex(n) {
return strhex.charAt(Math.floor(n / 16)) + strhex.charAt(n % 16);
}
function computeColor(e) {
var x, y, partWidth, partDetail, imHeight, r, g, b, coef, i, finalCoef, finalR, finalG, finalB, pos = tinyMCEPopup.dom.getPos(e.target);
x = e.offsetX ? e.offsetX : (e.target ? e.clientX - pos.x : 0);
y = e.offsetY ? e.offsetY : (e.target ? e.clientY - pos.y : 0);
partWidth = document.getElementById('colors').width / 6;
partDetail = detail / 2;
imHeight = document.getElementById('colors').height;
r = (x >= 0)*(x < partWidth)*255 + (x >= partWidth)*(x < 2*partWidth)*(2*255 - x * 255 / partWidth) + (x >= 4*partWidth)*(x < 5*partWidth)*(-4*255 + x * 255 / partWidth) + (x >= 5*partWidth)*(x < 6*partWidth)*255;
g = (x >= 0)*(x < partWidth)*(x * 255 / partWidth) + (x >= partWidth)*(x < 3*partWidth)*255 + (x >= 3*partWidth)*(x < 4*partWidth)*(4*255 - x * 255 / partWidth);
b = (x >= 2*partWidth)*(x < 3*partWidth)*(-2*255 + x * 255 / partWidth) + (x >= 3*partWidth)*(x < 5*partWidth)*255 + (x >= 5*partWidth)*(x < 6*partWidth)*(6*255 - x * 255 / partWidth);
coef = (imHeight - y) / imHeight;
r = 128 + (r - 128) * coef;
g = 128 + (g - 128) * coef;
b = 128 + (b - 128) * coef;
changeFinalColor('#' + dechex(r) + dechex(g) + dechex(b));
updateLight(r, g, b);
}
function updateLight(r, g, b) {
var i, partDetail = detail / 2, finalCoef, finalR, finalG, finalB, color;
for (i=0; i<detail; i++) {
if ((i>=0) && (i<partDetail)) {
finalCoef = i / partDetail;
finalR = dechex(255 - (255 - r) * finalCoef);
finalG = dechex(255 - (255 - g) * finalCoef);
finalB = dechex(255 - (255 - b) * finalCoef);
} else {
finalCoef = 2 - i / partDetail;
finalR = dechex(r * finalCoef);
finalG = dechex(g * finalCoef);
finalB = dechex(b * finalCoef);
}
color = finalR + finalG + finalB;
setCol('gs' + i, '#'+color);
}
}
function changeFinalColor(color) {
if (color.indexOf('#') == -1)
color = convertRGBToHex(color);
setCol('preview', color);
document.getElementById('color').value = color;
}
function setCol(e, c) {
try {
document.getElementById(e).style.backgroundColor = c;
} catch (ex) {
// Ignore IE warning
}
}
tinyMCEPopup.onInit.add(init);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -48,4 +48,3 @@ font[face=mceinline] {font-family:inherit !important}
.mceItemEmbeddedAudio {background-image:url(../../img/video.gif)}
.mceItemIframe {background-image:url(../../img/iframe.gif)}
.mcePageBreak {display:block;border:0;width:100%;height:12px;border-top:1px dotted #ccc;margin-top:15px;background:#fff url(../../img/pagebreak.gif) no-repeat center top;}
.mceHideBrInPre pre br {display: none}

@ -22,4 +22,3 @@ abbr {border-bottom:1px dashed #CCC; cursor:help}
img:-moz-broken {-moz-force-broken-image-icon:1; width:24px; height:24px}
font[face=mceinline] {font-family:inherit !important}
*[contentEditable]:focus {outline:0}
.mceHideBrInPre pre br {display: none}

@ -46,4 +46,3 @@ font[face=mceinline] {font-family:inherit !important}
.mceItemAudio {background-image:url(../../img/video.gif)}
.mceItemIframe {background-image:url(../../img/iframe.gif)}
.mcePageBreak {display:block;border:0;width:100%;height:12px;border-top:1px dotted #ccc;margin-top:15px;background:#fff url(../../img/pagebreak.gif) no-repeat center top;}
.mceHideBrInPre pre br {display: none}

@ -4,7 +4,7 @@
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
<script type="text/javascript" src="js/source_editor.js"></script>
</head>
<body onresize="resizeInputs();" style="display:none; overflow:hidden;">
<body onresize="resizeInputs();" style="display:none; overflow:hidden;" spellcheck="false">
<form name="source" onsubmit="saveContent();return false;" action="#">
<div style="float: left" class="title"><label for="htmlSource">{#advanced_dlg.code_title}</label></div>

File diff suppressed because one or more lines are too long

@ -6,9 +6,9 @@
var tinymce = {
majorVersion : '3',
minorVersion : '5.2',
minorVersion : '5.4.1',
releaseDate : '2012-05-31',
releaseDate : '2012-06-24',
_init : function() {
var t = this, d = document, na = navigator, ua = na.userAgent, i, nl, n, base, p, v;
@ -1083,6 +1083,10 @@ tinymce.create('static tinymce.util.XHR', {
modifierPressed: function (e) {
return e.shiftKey || e.ctrlKey || e.altKey;
},
metaKeyPressed: function(e) {
return tinymce.isMac ? e.metaKey : e.ctrlKey;
}
};
})(tinymce);
@ -1098,6 +1102,12 @@ tinymce.util.Quirks = function(editor) {
}
}
function getDocumentMode() {
var documentMode = editor.getDoc().documentMode;
return documentMode ? documentMode : 6;
};
function cleanupStylesWhenDeleting() {
function removeMergedFormatSpans(isDelete) {
var rng, blockElm, node, clonedSpan;
@ -1157,74 +1167,58 @@ tinymce.util.Quirks = function(editor) {
};
function emptyEditorWhenDeleting() {
function getEndPointNode(rng, start) {
var container, offset, prefix = start ? 'start' : 'end';
container = rng[prefix + 'Container'];
offset = rng[prefix + 'Offset'];
function serializeRng(rng) {
var body = dom.create("body");
var contents = rng.cloneContents();
body.appendChild(contents);
return selection.serializer.serialize(body, {format: 'html'});
}
// Resolve indexed container
if (container.nodeType == 1 && container.hasChildNodes()) {
container = container.childNodes[Math.min(start ? offset : (offset > 0 ? offset - 1 : 0), container.childNodes.length - 1)]
}
function allContentsSelected(rng) {
var selection = serializeRng(rng);
return container;
};
var allRng = dom.createRng();
allRng.selectNode(editor.getBody());
function isAtStartEndOfBody(rng, start) {
var container, offset, root, childNode, prefix = start ? 'start' : 'end', isAfter;
var allSelection = serializeRng(allRng);//console.log(selection, "----", allSelection);
return selection === allSelection;
}
container = rng[prefix + 'Container'];
offset = rng[prefix + 'Offset'];
root = dom.getRoot();
editor.onKeyDown.add(function(editor, e) {
var keyCode = e.keyCode, isCollapsed;
// Resolve indexed container
if (container.nodeType == 1) {
isAfter = offset >= container.childNodes.length;
container = getEndPointNode(rng, start);
// Empty the editor if it's needed for example backspace at <p><b>|</b></p>
if (!e.isDefaultPrevented() && (keyCode == DELETE || keyCode == BACKSPACE)) {
isCollapsed = editor.selection.isCollapsed();
if (container.nodeType == 3) {
offset = start && !isAfter ? 0 : container.nodeValue.length;
// Selection is collapsed but the editor isn't empty
if (isCollapsed && !dom.isEmpty(editor.getBody())) {
return;
}
}
// Check if start/end is in the middle of text
if (container.nodeType == 3 && ((start && offset > 0) || (!start && offset < container.nodeValue.length))) {
return false;
}
// Walk up the DOM tree to see if the endpoint is at the beginning/end of body
while (container !== root) {
childNode = container.parentNode[start ? 'firstChild' : 'lastChild'];
// If first/last element is a BR then jump to it's sibling in case: <p>x<br></p>
if (childNode.nodeName == "BR") {
childNode = childNode[start ? 'nextSibling' : 'previousSibling'] || childNode;
// IE deletes all contents correctly when everything is selected
if (tinymce.isIE && !isCollapsed) {
return;
}
// If the childNode isn't the container node then break in case <p><span>A</span>[X]</p>
if (childNode !== container) {
return false;
// Selection isn't collapsed but not all the contents is selected
if (!isCollapsed && !allContentsSelected(editor.selection.getRng())) {
return;
}
container = container.parentNode;
// Manually empty the editor
editor.setContent('');
editor.selection.setCursorLocation(editor.getBody(), 0);
editor.nodeChanged();
}
});
};
return true;
};
editor.onKeyDown.addToTop(function(editor, e) {
var rng, keyCode = e.keyCode;
if (!e.isDefaultPrevented() && (keyCode == DELETE || keyCode == BACKSPACE)) {
rng = selection.getRng(true);
if (isAtStartEndOfBody(rng, true) && isAtStartEndOfBody(rng, false) &&
(rng.collapsed || dom.findCommonAncestor(getEndPointNode(rng, true), getEndPointNode(rng)) === dom.getRoot())) {
editor.setContent('');
editor.nodeChanged();
e.preventDefault();
}
function selectAll() {
editor.onKeyDown.add(function(editor, e) {
if (e.keyCode == 65 && VK.metaKeyPressed(e)) {
e.preventDefault();
editor.execCommand('SelectAll');
}
});
};
@ -1393,16 +1387,15 @@ tinymce.util.Quirks = function(editor) {
}
function addNewLinesBeforeBrInPre() {
var documentMode = editor.getDoc().documentMode;
// IE8+ rendering mode does the right thing with BR in PRE
if (documentMode && documentMode > 7) {
if (getDocumentMode() > 7) {
return;
}
// Enable display: none in area and add a specific class that hides all BR elements in PRE to
// avoid the caret from getting stuck at the BR elements while pressing the right arrow key
setEditorCommandState('RespectVisibilityInDesign', true);
editor.contentStyles.push('.mceHideBrInPre pre br {display: none}');
dom.addClass(editor.getBody(), 'mceHideBrInPre');
// Adds a \n before all BR elements in PRE to get them visual
@ -1608,13 +1601,105 @@ tinymce.util.Quirks = function(editor) {
editor.onSetContent.add(repaint);
};
function deleteImageOnBackSpace() {
function deleteControlItemOnBackSpace() {
editor.onKeyDown.add(function(editor, e) {
if (!e.isDefaultPrevented() && e.keyCode == 8 && selection.getNode().nodeName == 'IMG') {
var rng;
if (!e.isDefaultPrevented() && e.keyCode == BACKSPACE) {
rng = editor.getDoc().selection.createRange();
if (rng && rng.item) {
e.preventDefault();
editor.undoManager.beforeChange();
dom.remove(rng.item(0));
editor.undoManager.add();
}
}
});
};
function renderEmptyBlocksFix() {
var emptyBlocksCSS;
// IE10+
if (getDocumentMode() >= 10) {
emptyBlocksCSS = '';
tinymce.each('p div h1 h2 h3 h4 h5 h6'.split(' '), function(name, i) {
emptyBlocksCSS += (i > 0 ? ',' : '') + name + ':empty';
});
editor.contentStyles.push(emptyBlocksCSS + '{padding-right: 1px !important}');
}
};
function fakeImageResize() {
var mouseDownImg, startX, startY, startW, startH;
if (!settings.object_resizing || settings.webkit_fake_resize === false) {
return;
}
editor.contentStyles.push('.mceResizeImages img {cursor: se-resize !important}');
function resizeImage(e) {
var deltaX, deltaY, ratio, width, height;
if (mouseDownImg) {
deltaX = e.screenX - startX;
deltaY = e.screenY - startY;
ratio = Math.max((startW + deltaX) / startW, (startH + deltaY) / startH);
// Only update styles if the user draged one pixel or more
if (Math.abs(deltaX) > 1 || Math.abs(deltaY) > 1) {
// Constrain proportions
width = Math.round(startW * ratio);
height = Math.round(startH * ratio);
// Resize by using style or attribute
if (mouseDownImg.style.width) {
dom.setStyle(mouseDownImg, 'width', width);
} else {
dom.setAttrib(mouseDownImg, 'width', width);
}
// Resize by using style or attribute
if (mouseDownImg.style.height) {
dom.setStyle(mouseDownImg, 'height', height);
} else {
dom.setAttrib(mouseDownImg, 'height', height);
}
if (!dom.hasClass(editor.getBody(), 'mceResizeImages')) {
dom.addClass(editor.getBody(), 'mceResizeImages');
}
}
}
};
editor.onMouseDown.add(function(editor, e) {
var target = e.target;
if (target.nodeName == "IMG") {
mouseDownImg = target;
startX = e.screenX;
startY = e.screenY;
startW = mouseDownImg.clientWidth;
startH = mouseDownImg.clientHeight;
dom.bind(editor.getDoc(), 'mousemove', resizeImage);
e.preventDefault();
editor.undoManager.beforeChange();
dom.remove(selection.getNode());
editor.undoManager.add();
}
});
// Unbind events on node change and restore resize cursor
editor.onNodeChange.add(function() {
if (mouseDownImg) {
mouseDownImg = null;
dom.unbind(editor.getDoc(), 'mousemove', resizeImage);
}
if (selection.getNode().nodeName == "IMG") {
dom.addClass(editor.getBody(), 'mceResizeImages');
} else {
dom.removeClass(editor.getBody(), 'mceResizeImages');
}
});
};
@ -1635,6 +1720,9 @@ tinymce.util.Quirks = function(editor) {
// iOS
if (tinymce.isIDevice) {
selectionChangeNodeChanged();
} else {
fakeImageResize();
selectAll();
}
}
@ -1644,7 +1732,8 @@ tinymce.util.Quirks = function(editor) {
ensureBodyHasRoleApplication();
addNewLinesBeforeBrInPre();
removePreSerializedStylesWhenSelectingControls();
deleteImageOnBackSpace();
deleteControlItemOnBackSpace();
renderEmptyBlocksFix();
}
// Gecko
@ -2107,9 +2196,9 @@ tinymce.html.Styles = function(settings, schema) {
if (!html5) {
html5 = mapCache.html5 = unpack({
A : 'id|accesskey|class|dir|draggable|item|hidden|itemprop|role|spellcheck|style|subject|title',
A : 'id|accesskey|class|dir|draggable|item|hidden|itemprop|role|spellcheck|style|subject|title|onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup',
B : '#|a|abbr|area|audio|b|bdo|br|button|canvas|cite|code|command|datalist|del|dfn|em|embed|i|iframe|img|input|ins|kbd|keygen|label|link|map|mark|meta|' +
'meter|noscript|object|output|progress|q|ruby|samp|script|select|small|span|strong|sub|sup|svg|textarea|time|var|video',
'meter|noscript|object|output|progress|q|ruby|samp|script|select|small|span|strong|sub|sup|svg|textarea|time|var|video|wbr',
C : '#|a|abbr|area|address|article|aside|audio|b|bdo|blockquote|br|button|canvas|cite|code|command|datalist|del|details|dfn|dialog|div|dl|em|embed|fieldset|' +
'figure|footer|form|h1|h2|h3|h4|h5|h6|header|hgroup|hr|i|iframe|img|input|ins|kbd|keygen|label|link|map|mark|menu|meta|meter|nav|noscript|ol|object|output|' +
'p|pre|progress|q|ruby|samp|script|section|select|small|span|strong|style|sub|sup|svg|table|textarea|time|ul|var|video'
@ -2218,7 +2307,8 @@ tinymce.html.Styles = function(settings, schema) {
'tbody[A][tr]' +
'tr[A][th|td]' +
'th[A|headers|rowspan|colspan|scope][B]' +
'td[A|headers|rowspan|colspan][C]'
'td[A|headers|rowspan|colspan][C]' +
'wbr[A][]'
);
}
@ -2399,7 +2489,7 @@ tinymce.html.Styles = function(settings, schema) {
// Setup map objects
whiteSpaceElementsMap = createLookupTable('whitespace_elements', 'pre script style textarea');
selfClosingElementsMap = createLookupTable('self_closing_elements', 'colgroup dd dt li option p td tfoot th thead tr');
shortEndedElementsMap = createLookupTable('short_ended_elements', 'area base basefont br col frame hr img input isindex link meta param embed source');
shortEndedElementsMap = createLookupTable('short_ended_elements', 'area base basefont br col frame hr img input isindex link meta param embed source wbr');
boolAttrMap = createLookupTable('boolean_attributes', 'checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls');
nonEmptyElementsMap = createLookupTable('non_empty_elements', 'td th iframe video audio object', shortEndedElementsMap);
blockElementsMap = createLookupTable('block_elements', 'h1 h2 h3 h4 h5 h6 hr p div address pre form table tbody thead tfoot ' +
@ -4657,7 +4747,7 @@ tinymce.dom = {};
// Old API supported multiple targets
if (target && target instanceof Array) {
var i = target;
var i = target.length;
while (i--) {
self.add(target[i], events, func, scope);
@ -5499,6 +5589,32 @@ tinymce.dom.TreeWalker = function(start_node, root_node) {
return this.styles.serialize(o, name);
},
addStyle: function(cssText) {
var doc = this.doc, head;
// Create style element if needed
styleElm = doc.getElementById('mceDefaultStyles');
if (!styleElm) {
styleElm = doc.createElement('style'),
styleElm.id = 'mceDefaultStyles';
styleElm.type = 'text/css';
head = doc.getElementsByTagName('head')[0]
if (head.firstChild) {
head.insertBefore(styleElm, head.firstChild);
} else {
head.appendChild(styleElm);
}
}
// Append style data to old or new style element
if (styleElm.styleSheet) {
styleElm.styleSheet.cssText += cssText;
} else {
styleElm.appendChild(doc.createTextNode(cssText));
}
},
loadCSS : function(u) {
var t = this, d = t.doc, head;
@ -5622,13 +5738,13 @@ tinymce.dom.TreeWalker = function(start_node, root_node) {
// This seems to fix this problem
// Create new div with HTML contents and a BR infront to keep comments
element = self.create('div');
element.innerHTML = '<br />' + html;
var newElement = self.create('div');
newElement.innerHTML = '<br />' + html;
// Add all children from div to target
each (element.childNodes, function(node, i) {
each (tinymce.grep(newElement.childNodes), function(node, i) {
// Skip br element
if (i)
if (i && element.canHaveHTML)
element.appendChild(node);
});
}
@ -9069,7 +9185,7 @@ window.tinymce.dom.Sizzle = Sizzle;
},
getStart : function() {
var rng = this.getRng(), startElement, parentElement, checkRng, node;
var self = this, rng = self.getRng(), startElement, parentElement, checkRng, node;
if (rng.duplicate || rng.item) {
// Control selection, return first item
@ -9080,6 +9196,9 @@ window.tinymce.dom.Sizzle = Sizzle;
checkRng = rng.duplicate();
checkRng.collapse(1);
startElement = checkRng.parentElement();
if (startElement.ownerDocument !== self.dom.doc) {
startElement = self.dom.getRoot();
}
// Check if range parent is inside the start element, then return the inner parent element
// This will fix issues when a single element is selected, IE would otherwise return the wrong start element
@ -9106,31 +9225,34 @@ window.tinymce.dom.Sizzle = Sizzle;
},
getEnd : function() {
var t = this, r = t.getRng(), e, eo;
var self = this, rng = self.getRng(), endElement, endOffset;
if (r.duplicate || r.item) {
if (r.item)
return r.item(0);
if (rng.duplicate || rng.item) {
if (rng.item)
return rng.item(0);
r = r.duplicate();
r.collapse(0);
e = r.parentElement();
rng = rng.duplicate();
rng.collapse(0);
endElement = rng.parentElement();
if (endElement.ownerDocument !== self.dom.doc) {
endElement = self.dom.getRoot();
}
if (e && e.nodeName == 'BODY')
return e.lastChild || e;
if (endElement && endElement.nodeName == 'BODY')
return endElement.lastChild || endElement;
return e;
return endElement;
} else {
e = r.endContainer;
eo = r.endOffset;
endElement = rng.endContainer;
endOffset = rng.endOffset;
if (e.nodeType == 1 && e.hasChildNodes())
e = e.childNodes[eo > 0 ? eo - 1 : eo];
if (endElement.nodeType == 1 && endElement.hasChildNodes())
endElement = endElement.childNodes[endOffset > 0 ? endOffset - 1 : endOffset];
if (e && e.nodeType == 3)
return e.parentNode;
if (endElement && endElement.nodeType == 3)
return endElement.parentNode;
return e;
return endElement;
}
},
@ -11475,7 +11597,7 @@ tinymce.create('tinymce.ui.Separator:tinymce.ui.Control', {
l = DOM.encode(s.label || '');
h = '<a role="button" id="' + this.id + '" href="javascript:;" class="' + cp + ' ' + cp + 'Enabled ' + s['class'] + (l ? ' ' + cp + 'Labeled' : '') +'" onmousedown="return false;" onclick="return false;" aria-labelledby="' + this.id + '_voice" title="' + DOM.encode(s.title) + '">';
if (s.image && !(this.editor &&this.editor.forcedHighContrastMode) )
h += '<img class="mceIcon" src="' + s.image + '" alt="' + DOM.encode(s.title) + '" />' + l;
h += '<span class="mceIcon ' + s['class'] + '"><img class="mceIcon" src="' + s.image + '" alt="' + DOM.encode(s.title) + '" /></span>' + (l ? '<span class="' + cp + 'Label">' + l + '</span>' : '');
else
h += '<span class="mceIcon ' + s['class'] + '"></span>' + (l ? '<span class="' + cp + 'Label">' + l + '</span>' : '');
@ -12183,6 +12305,16 @@ tinymce.create('tinymce.ui.Separator:tinymce.ui.Control', {
DOM.select('a', t.id + '_menu')[0].focus(); // Select first link
}
t.keyboardNav = new tinymce.ui.KeyboardNavigation({
root: t.id + '_menu',
items: DOM.select('a', t.id + '_menu'),
onCancel: function() {
t.hideMenu();
t.focus();
}
});
t.keyboardNav.focus();
t.isMenuVisible = 1;
},
@ -12203,6 +12335,7 @@ tinymce.create('tinymce.ui.Separator:tinymce.ui.Control', {
t.isMenuVisible = 0;
t.onHideMenu.dispatch();
t.keyboardNav.destroy();
}
},
@ -12267,15 +12400,6 @@ tinymce.create('tinymce.ui.Separator:tinymce.ui.Control', {
}
DOM.addClass(m, 'mceColorSplitMenu');
new tinymce.ui.KeyboardNavigation({
root: t.id + '_menu',
items: DOM.select('a', t.id + '_menu'),
onCancel: function() {
t.hideMenu();
t.focus();
}
});
// Prevent IE from scrolling and hindering click to occur #4019
Event.add(t.id + '_menu', 'mousedown', function(e) {return Event.cancel(e);});
@ -12317,11 +12441,17 @@ tinymce.create('tinymce.ui.Separator:tinymce.ui.Control', {
},
destroy : function() {
this.parent();
var self = this;
Event.clear(this.id + '_menu');
Event.clear(this.id + '_more');
DOM.remove(this.id + '_menu');
self.parent();
Event.clear(self.id + '_menu');
Event.clear(self.id + '_more');
DOM.remove(self.id + '_menu');
if (self.keyboardNav) {
self.keyboardNav.destroy();
}
}
});
})(tinymce);
@ -12965,6 +13095,8 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', {
self.contentCSS = [];
self.contentStyles = [];
// Creates all events like onClick, onSetContent etc see Editor.Events.js for the actual logic
self.setupEvents();
@ -13156,12 +13288,6 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', {
t.controlManager = new tinymce.ControlManager(t);
t.onExecCommand.add(function(ed, c) {
// Don't refresh the select lists until caret move
if (!/^(FontName|FontSize)$/.test(c))
t.nodeChanged();
});
// Enables users to override the control factory
t.onBeforeRenderUI.dispatch(t, t.controlManager);
@ -13321,7 +13447,7 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', {
},
initContentBody : function() {
var self = this, settings = self.settings, targetElm = DOM.get(self.id), doc = self.getDoc(), html, body;
var self = this, settings = self.settings, targetElm = DOM.get(self.id), doc = self.getDoc(), html, body, contentCssText;
// Setup iframe body
if ((!isIE || !tinymce.relaxedDomain) && !settings.content_editable) {
@ -13430,6 +13556,12 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', {
self.enterKey = new tinymce.EnterKey(self);
self.editorCommands = new tinymce.EditorCommands(self);
self.onExecCommand.add(function(editor, command) {
// Don't refresh the select lists until caret move
if (!/^(FontName|FontSize)$/.test(command))
self.nodeChanged();
});
// Pass through
self.serializer.onPreProcess.add(function(se, o) {
return self.onPreProcess.dispatch(self, o, se);
@ -13492,6 +13624,17 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', {
self.focus(true);
self.nodeChanged({initial : true});
// Add editor specific CSS styles
if (self.contentStyles.length > 0) {
contentCssText = '';
each(self.contentStyles, function(style) {
contentCssText += style + "\r\n";
});
self.dom.addStyle(contentCssText);
}
// Load specified content CSS last
each(self.contentCSS, function(url) {
self.dom.loadCSS(url);
@ -14119,7 +14262,7 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', {
return;
case 'A':
if (!elm.href) {
if (!dom.getAttrib(elm, 'href', false)) {
value = dom.getAttrib(elm, 'name') || elm.id;
cls = 'mceItemAnchor';
@ -14148,13 +14291,12 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', {
// Don't clear the window or document if content editable
// is enabled since other instances might still be present
if (!self.settings.content_editable) {
Event.clear(self.getWin());
Event.clear(self.getDoc());
Event.unbind(self.getWin());
Event.unbind(self.getDoc());
}
Event.clear(self.getBody());
Event.clear(self.formElement);
Event.unbind(elm);
Event.unbind(self.getBody());
Event.clear(elm);
self.execCallback('remove_instance_callback', self);
self.onRemove.dispatch(self);
@ -14356,8 +14498,10 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', {
// Handle legacy handle_event_callback option
if (settings.handle_event_callback) {
self.onEvent.add(function(ed, e, o) {
if (self.execCallback('handle_event_callback', e, ed, o) === false)
Event.cancel(e);
if (self.execCallback('handle_event_callback', e, ed, o) === false) {
e.preventDefault();
e.stopPropagation();
}
});
}
@ -14423,9 +14567,12 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', {
self.focus(true);
};
function nodeChanged() {
// Normalize selection for example <b>a</b><i>|a</i> becomes <b>a|</b><i>a</i>
self.selection.normalize();
function nodeChanged(ed, e) {
// Normalize selection for example <b>a</b><i>|a</i> becomes <b>a|</b><i>a</i> except for Ctrl+A since it selects everything
if (e.keyCode != 65 || !tinymce.VK.metaKeyPressed(e)) {
self.selection.normalize();
}
self.nodeChanged();
}
@ -14469,7 +14616,7 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', {
var keyCode = e.keyCode;
if ((keyCode >= 33 && keyCode <= 36) || (keyCode >= 37 && keyCode <= 40) || keyCode == 13 || keyCode == 45 || keyCode == 46 || keyCode == 8 || (tinymce.isMac && (keyCode == 91 || keyCode == 93)) || e.ctrlKey)
nodeChanged();
nodeChanged(ed, e);
});
// Add reset handler
@ -14896,6 +15043,10 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', {
editor.setContent(editor.getContent().replace(/tiny_mce_marker/g, function() { return value }));
},
mceToggleFormat : function(command, ui, value) {
toggleFormat(value);
},
mceSetContent : function(command, ui, value) {
editor.setContent(value);
},
@ -15284,7 +15435,7 @@ tinymce.ForceBlocks = function(editor) {
var settings = editor.settings, dom = editor.dom, selection = editor.selection, blockElements = editor.schema.getBlockElements();
function addRootBlocks() {
var node = selection.getStart(), rootNode = editor.getBody(), rng, startContainer, startOffset, endContainer, endOffset, rootBlockNode, tempNode, offset = -0xFFFFFF, wrapped;
var node = selection.getStart(), rootNode = editor.getBody(), rng, startContainer, startOffset, endContainer, endOffset, rootBlockNode, tempNode, offset = -0xFFFFFF, wrapped, isInEditorDocument;
if (!node || node.nodeType !== 1 || !settings.forced_root_block)
return;
@ -15312,6 +15463,7 @@ tinymce.ForceBlocks = function(editor) {
rng.moveToElementText(node);
}
isInEditorDocument = rng.parentElement().ownerDocument === editor.getDoc();
tmpRng = rng.duplicate();
tmpRng.collapse(true);
startOffset = tmpRng.move('character', offset) * -1;
@ -15342,28 +15494,30 @@ tinymce.ForceBlocks = function(editor) {
}
}
if (rng.setStart) {
rng.setStart(startContainer, startOffset);
rng.setEnd(endContainer, endOffset);
selection.setRng(rng);
} else {
try {
rng = editor.getDoc().body.createTextRange();
rng.moveToElementText(rootNode);
rng.collapse(true);
rng.moveStart('character', startOffset);
if (wrapped) {
if (rng.setStart) {
rng.setStart(startContainer, startOffset);
rng.setEnd(endContainer, endOffset);
selection.setRng(rng);
} else {
// Only select if the previous selection was inside the document to prevent auto focus in quirks mode
if (isInEditorDocument) {
try {
rng = editor.getDoc().body.createTextRange();
rng.moveToElementText(rootNode);
rng.collapse(true);
rng.moveStart('character', startOffset);
if (endOffset > 0)
rng.moveEnd('character', endOffset);
if (endOffset > 0)
rng.moveEnd('character', endOffset);
rng.select();
} catch (ex) {
// Ignore
rng.select();
} catch (ex) {
// Ignore
}
}
}
}
// Only trigger nodeChange when we wrapped nodes to prevent a forever loop
if (wrapped) {
editor.nodeChanged();
}
};
@ -17949,7 +18103,7 @@ tinymce.onAddEditor.add(function(tinymce, ed) {
var TreeWalker = tinymce.dom.TreeWalker;
tinymce.EnterKey = function(editor) {
var dom = editor.dom, selection = editor.selection, settings = editor.settings, undoManager = editor.undoManager;
var dom = editor.dom, selection = editor.selection, settings = editor.settings, undoManager = editor.undoManager, nonEmptyElementsMap = editor.schema.getNonEmptyElements();
function handleEnterKey(evt) {
var rng = selection.getRng(true), tmpRng, editableRoot, container, offset, parentBlock, documentMode,
@ -17959,11 +18113,48 @@ tinymce.onAddEditor.add(function(tinymce, ed) {
function canSplitBlock(node) {
return node &&
dom.isBlock(node) &&
!/^(TD|TH|CAPTION)$/.test(node.nodeName) &&
!/^(TD|TH|CAPTION|FORM)$/.test(node.nodeName) &&
!/^(fixed|absolute)/i.test(node.style.position) &&
dom.getContentEditable(node) !== "true";
};
// Renders empty block on IE
function renderBlockOnIE(block) {
var oldRng;
if (tinymce.isIE && dom.isBlock(block)) {
oldRng = selection.getRng();
block.appendChild(dom.create('span', null, '\u00a0'));
selection.select(block);
block.lastChild.outerHTML = '';
selection.setRng(oldRng);
}
};
// Remove the first empty inline element of the block so this: <p><b><em></em></b>x</p> becomes this: <p>x</p>
function trimInlineElementsOnLeftSideOfBlock(block) {
var node = block, firstChilds = [], i;
// Find inner most first child ex: <p><i><b>*</b></i></p>
while (node = node.firstChild) {
if (dom.isBlock(node)) {
return;
}
if (node.nodeType == 1 && !nonEmptyElementsMap[node.nodeName.toLowerCase()]) {
firstChilds.push(node);
}
}
i = firstChilds.length;
while (i--) {
node = firstChilds[i];
if (!node.hasChildNodes() || (node.firstChild == node.lastChild && node.firstChild.nodeValue === '')) {
dom.remove(node);
}
}
};
// Moves the caret to a suitable position within the root for example in the first non pure whitespace text node or before an image
function moveToCaretPosition(root) {
var walker, node, rng, y, viewPort, lastNode = root, tempElm;
@ -17980,7 +18171,7 @@ tinymce.onAddEditor.add(function(tinymce, ed) {
break;
}
if (/^(BR|IMG)$/.test(node.nodeName)) {
if (nonEmptyElementsMap[node.nodeName.toLowerCase()]) {
rng.setStartBefore(node);
rng.setEndBefore(node);
break;
@ -18077,6 +18268,11 @@ tinymce.onAddEditor.add(function(tinymce, ed) {
return true;
}
// If the caret if before the first element in parentBlock
if (start && container.nodeType == 1 && container == parentBlock.firstChild) {
return true;
}
// Caret can be before/after a table
if (container.nodeName === "TABLE" || (container.previousSibling && container.previousSibling.nodeName == "TABLE")) {
return (isAfterLastNodeInContainer && !start) || (!isAfterLastNodeInContainer && start);
@ -18084,21 +18280,35 @@ tinymce.onAddEditor.add(function(tinymce, ed) {
// Walk the DOM and look for text nodes or non empty elements
walker = new TreeWalker(container, parentBlock);
while (node = (start ? walker.prev() : walker.next())) {
// If caret is in beginning or end of a text block then jump to the next/previous node
if (container.nodeType == 3) {
if (start && offset == 0) {
walker.prev();
} else if (!start && offset == container.nodeValue.length) {
walker.next();
}
}
while (node = walker.current()) {
if (node.nodeType === 1) {
// Ignore bogus elements
if (node.getAttribute('data-mce-bogus')) {
continue;
}
// Keep empty elements like <img />
name = node.nodeName.toLowerCase();
if (name === 'IMG') {
return false;
if (!node.getAttribute('data-mce-bogus')) {
// Keep empty elements like <img /> <input /> but not trailing br:s like <p>text|<br></p>
name = node.nodeName.toLowerCase();
if (nonEmptyElementsMap[name] && name !== 'br') {
return false;
}
}
} else if (node.nodeType === 3 && !/^[ \t\r\n]*$/.test(node.nodeValue)) {
return false;
}
if (start) {
walker.prev();
} else {
walker.next();
}
}
return true;
@ -18182,6 +18392,7 @@ tinymce.onAddEditor.add(function(tinymce, ed) {
} else if (isFirstOrLastLi()) {
// Last LI in list then temove LI and add text block after list
dom.insertAfter(newBlock, containerBlock);
renderBlockOnIE(newBlock);
} else {
// Middle LI in list the split the list and insert a text block in the middle
// Extract after fragment and insert it after the current block
@ -18273,6 +18484,22 @@ tinymce.onAddEditor.add(function(tinymce, ed) {
return parent !== root ? editableRoot : root;
};
// Adds a BR at the end of blocks that only contains an IMG or INPUT since these might be floated and then they won't expand the block
function addBrToBlockIfNeeded(block) {
var lastChild;
// IE will render the blocks correctly other browsers needs a BR
if (!tinymce.isIE) {
block.normalize(); // Remove empty text nodes that got left behind by the extract
// Check if the block is empty or contains a floated last child
lastChild = block.lastChild;
if (!lastChild || (/^(left|right)$/gi.test(dom.getStyle(lastChild, 'float', true)))) {
dom.add(block, 'br');
}
}
};
// Delete any selected contents
if (!rng.collapsed) {
editor.execCommand('Delete');
@ -18295,7 +18522,11 @@ tinymce.onAddEditor.add(function(tinymce, ed) {
if (container.nodeType == 1 && container.hasChildNodes()) {
isAfterLastNodeInContainer = offset > container.childNodes.length - 1;
container = container.childNodes[Math.min(offset, container.childNodes.length - 1)] || container;
offset = 0;
if (isAfterLastNodeInContainer && container.nodeType == 3) {
offset = container.nodeValue.length;
} else {
offset = 0;
}
}
// Get editable root node normaly the body element but sometimes a div or span
@ -18376,9 +18607,12 @@ tinymce.onAddEditor.add(function(tinymce, ed) {
} else {
dom.insertAfter(newBlock, parentBlock);
}
moveToCaretPosition(newBlock);
} else if (isCaretAtStartOrEndOfBlock(true)) {
// Insert new block before
newBlock = parentBlock.parentNode.insertBefore(createNewBlock(), parentBlock);
renderBlockOnIE(newBlock);
} else {
// Extract after fragment and insert it after the current block
tmpRng = rng.cloneRange();
@ -18387,10 +18621,12 @@ tinymce.onAddEditor.add(function(tinymce, ed) {
trimLeadingLineBreaks(fragment);
newBlock = fragment.firstChild;
dom.insertAfter(fragment, parentBlock);
trimInlineElementsOnLeftSideOfBlock(newBlock);
addBrToBlockIfNeeded(parentBlock);
moveToCaretPosition(newBlock);
}
dom.setAttrib(newBlock, 'id', ''); // Remove ID since it needs to be document unique
moveToCaretPosition(newBlock);
undoManager.add();
}

Loading…
Cancel
Save