spud_core 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (190) hide show
  1. data/README.markdown +41 -0
  2. data/app/assets/images/back_disabled.jpg +0 -0
  3. data/app/assets/images/back_enabled.jpg +0 -0
  4. data/app/assets/images/favicon.ico +0 -0
  5. data/app/assets/images/forward_disabled.jpg +0 -0
  6. data/app/assets/images/forward_enabled.jpg +0 -0
  7. data/app/assets/images/sort_asc.png +0 -0
  8. data/app/assets/images/sort_asc_disabled.png +0 -0
  9. data/app/assets/images/sort_both.png +0 -0
  10. data/app/assets/images/sort_desc.png +0 -0
  11. data/app/assets/images/sort_desc_disabled.png +0 -0
  12. data/app/assets/images/spud/admin/flick/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  13. data/app/assets/images/spud/admin/flick/ui-bg_flat_0_eeeeee_40x100.png +0 -0
  14. data/app/assets/images/spud/admin/flick/ui-bg_flat_55_ffffff_40x100.png +0 -0
  15. data/app/assets/images/spud/admin/flick/ui-bg_flat_75_ffffff_40x100.png +0 -0
  16. data/app/assets/images/spud/admin/flick/ui-bg_glass_65_ffffff_1x400.png +0 -0
  17. data/app/assets/images/spud/admin/flick/ui-bg_highlight-soft_100_f6f6f6_1x100.png +0 -0
  18. data/app/assets/images/spud/admin/flick/ui-bg_highlight-soft_25_0073ea_1x100.png +0 -0
  19. data/app/assets/images/spud/admin/flick/ui-bg_highlight-soft_50_dddddd_1x100.png +0 -0
  20. data/app/assets/images/spud/admin/flick/ui-icons_0073ea_256x240.png +0 -0
  21. data/app/assets/images/spud/admin/flick/ui-icons_454545_256x240.png +0 -0
  22. data/app/assets/images/spud/admin/flick/ui-icons_666666_256x240.png +0 -0
  23. data/app/assets/images/spud/admin/flick/ui-icons_ff0084_256x240.png +0 -0
  24. data/app/assets/images/spud/admin/flick/ui-icons_ffffff_256x240.png +0 -0
  25. data/app/assets/images/spud/admin/users_thumb.png +0 -0
  26. data/app/assets/javascripts/spud/admin/application.js +90 -0
  27. data/app/assets/javascripts/spud/admin/jquery.dataTables.min.js +151 -0
  28. data/app/assets/javascripts/spud/admin/settings.js +2 -0
  29. data/app/assets/javascripts/spud/admin/users.js +2 -0
  30. data/app/assets/javascripts/spud/setup.js +2 -0
  31. data/app/assets/javascripts/spud/sitemaps.js +2 -0
  32. data/app/assets/javascripts/spud/user_sessions.js +2 -0
  33. data/app/assets/javascripts/spud/users.js +2 -0
  34. data/app/assets/javascripts/wymeditor/iframe/default/lbl-article.png +0 -0
  35. data/app/assets/javascripts/wymeditor/iframe/default/lbl-aside.png +0 -0
  36. data/app/assets/javascripts/wymeditor/iframe/default/lbl-blockquote.png +0 -0
  37. data/app/assets/javascripts/wymeditor/iframe/default/lbl-command.png +0 -0
  38. data/app/assets/javascripts/wymeditor/iframe/default/lbl-details.png +0 -0
  39. data/app/assets/javascripts/wymeditor/iframe/default/lbl-figcaption.png +0 -0
  40. data/app/assets/javascripts/wymeditor/iframe/default/lbl-figure.png +0 -0
  41. data/app/assets/javascripts/wymeditor/iframe/default/lbl-footer.png +0 -0
  42. data/app/assets/javascripts/wymeditor/iframe/default/lbl-h1.png +0 -0
  43. data/app/assets/javascripts/wymeditor/iframe/default/lbl-h2.png +0 -0
  44. data/app/assets/javascripts/wymeditor/iframe/default/lbl-h3.png +0 -0
  45. data/app/assets/javascripts/wymeditor/iframe/default/lbl-h4.png +0 -0
  46. data/app/assets/javascripts/wymeditor/iframe/default/lbl-h5.png +0 -0
  47. data/app/assets/javascripts/wymeditor/iframe/default/lbl-h6.png +0 -0
  48. data/app/assets/javascripts/wymeditor/iframe/default/lbl-header.png +0 -0
  49. data/app/assets/javascripts/wymeditor/iframe/default/lbl-hgroup.png +0 -0
  50. data/app/assets/javascripts/wymeditor/iframe/default/lbl-mark.png +0 -0
  51. data/app/assets/javascripts/wymeditor/iframe/default/lbl-meter.png +0 -0
  52. data/app/assets/javascripts/wymeditor/iframe/default/lbl-nav.png +0 -0
  53. data/app/assets/javascripts/wymeditor/iframe/default/lbl-p.png +0 -0
  54. data/app/assets/javascripts/wymeditor/iframe/default/lbl-pre.png +0 -0
  55. data/app/assets/javascripts/wymeditor/iframe/default/lbl-progress.png +0 -0
  56. data/app/assets/javascripts/wymeditor/iframe/default/lbl-rp.png +0 -0
  57. data/app/assets/javascripts/wymeditor/iframe/default/lbl-rt.png +0 -0
  58. data/app/assets/javascripts/wymeditor/iframe/default/lbl-ruby.png +0 -0
  59. data/app/assets/javascripts/wymeditor/iframe/default/lbl-section.png +0 -0
  60. data/app/assets/javascripts/wymeditor/iframe/default/lbl-summary.png +0 -0
  61. data/app/assets/javascripts/wymeditor/iframe/default/lbl-time.png +0 -0
  62. data/app/assets/javascripts/wymeditor/iframe/default/readme.md +1 -0
  63. data/app/assets/javascripts/wymeditor/iframe/default/wymiframe.css +91 -0
  64. data/app/assets/javascripts/wymeditor/iframe/default/wymiframe.html +26 -0
  65. data/app/assets/javascripts/wymeditor/jquery.wymeditor.js +9983 -0
  66. data/app/assets/javascripts/wymeditor/jquery.wymeditor.min.js +34 -0
  67. data/app/assets/javascripts/wymeditor/lang/bg.js +45 -0
  68. data/app/assets/javascripts/wymeditor/lang/ca.js +45 -0
  69. data/app/assets/javascripts/wymeditor/lang/cs.js +45 -0
  70. data/app/assets/javascripts/wymeditor/lang/cy.js +45 -0
  71. data/app/assets/javascripts/wymeditor/lang/de.js +45 -0
  72. data/app/assets/javascripts/wymeditor/lang/en.js +45 -0
  73. data/app/assets/javascripts/wymeditor/lang/es.js +45 -0
  74. data/app/assets/javascripts/wymeditor/lang/fa.js +46 -0
  75. data/app/assets/javascripts/wymeditor/lang/fi.js +44 -0
  76. data/app/assets/javascripts/wymeditor/lang/fr.js +45 -0
  77. data/app/assets/javascripts/wymeditor/lang/gl.js +45 -0
  78. data/app/assets/javascripts/wymeditor/lang/he.js +45 -0
  79. data/app/assets/javascripts/wymeditor/lang/hr.js +45 -0
  80. data/app/assets/javascripts/wymeditor/lang/hu.js +45 -0
  81. data/app/assets/javascripts/wymeditor/lang/it.js +45 -0
  82. data/app/assets/javascripts/wymeditor/lang/ja.js +44 -0
  83. data/app/assets/javascripts/wymeditor/lang/lt.js +45 -0
  84. data/app/assets/javascripts/wymeditor/lang/nb.js +45 -0
  85. data/app/assets/javascripts/wymeditor/lang/nl.js +45 -0
  86. data/app/assets/javascripts/wymeditor/lang/nn.js +45 -0
  87. data/app/assets/javascripts/wymeditor/lang/pl.js +45 -0
  88. data/app/assets/javascripts/wymeditor/lang/pt-br.js +45 -0
  89. data/app/assets/javascripts/wymeditor/lang/pt.js +45 -0
  90. data/app/assets/javascripts/wymeditor/lang/ru.js +45 -0
  91. data/app/assets/javascripts/wymeditor/lang/sv.js +46 -0
  92. data/app/assets/javascripts/wymeditor/lang/tr.js +45 -0
  93. data/app/assets/javascripts/wymeditor/lang/zh_cn.js +47 -0
  94. data/app/assets/javascripts/wymeditor/plugins/embed/jquery.wymeditor.embed.js +82 -0
  95. data/app/assets/javascripts/wymeditor/plugins/fullscreen/icon_fullscreen.gif +0 -0
  96. data/app/assets/javascripts/wymeditor/plugins/fullscreen/jquery.wymeditor.fullscreen.js +124 -0
  97. data/app/assets/javascripts/wymeditor/plugins/hovertools/jquery.wymeditor.hovertools.js +49 -0
  98. data/app/assets/javascripts/wymeditor/plugins/list/jquery.wymeditor.list.js +60 -0
  99. data/app/assets/javascripts/wymeditor/plugins/rdfa/jquery.wymeditor.rdfa.js +186 -0
  100. data/app/assets/javascripts/wymeditor/plugins/resizable/jquery.wymeditor.resizable.js +77 -0
  101. data/app/assets/javascripts/wymeditor/plugins/resizable/readme.txt +124 -0
  102. data/app/assets/javascripts/wymeditor/plugins/table/jquery.wymeditor.table.js +721 -0
  103. data/app/assets/javascripts/wymeditor/plugins/table/table_delete_column.png +0 -0
  104. data/app/assets/javascripts/wymeditor/plugins/table/table_delete_row.png +0 -0
  105. data/app/assets/javascripts/wymeditor/plugins/table/table_insert_column.png +0 -0
  106. data/app/assets/javascripts/wymeditor/plugins/table/table_insert_row.png +0 -0
  107. data/app/assets/javascripts/wymeditor/plugins/table/table_join_row.png +0 -0
  108. data/app/assets/javascripts/wymeditor/plugins/tidy/README +19 -0
  109. data/app/assets/javascripts/wymeditor/plugins/tidy/jquery.wymeditor.tidy.js +78 -0
  110. data/app/assets/javascripts/wymeditor/plugins/tidy/tidy.php +58 -0
  111. data/app/assets/javascripts/wymeditor/plugins/tidy/wand.png +0 -0
  112. data/app/assets/javascripts/wymeditor/skins/compact/icons.png +0 -0
  113. data/app/assets/javascripts/wymeditor/skins/compact/skin.css +134 -0
  114. data/app/assets/javascripts/wymeditor/skins/compact/skin.js +37 -0
  115. data/app/assets/javascripts/wymeditor/skins/default/icons.png +0 -0
  116. data/app/assets/javascripts/wymeditor/skins/default/skin.css +133 -0
  117. data/app/assets/javascripts/wymeditor/skins/default/skin.js +40 -0
  118. data/app/assets/javascripts/wymeditor/skins/minimal/images/bg.header.gif +0 -0
  119. data/app/assets/javascripts/wymeditor/skins/minimal/images/bg.selector.silver.gif +0 -0
  120. data/app/assets/javascripts/wymeditor/skins/minimal/images/bg.wymeditor.png +0 -0
  121. data/app/assets/javascripts/wymeditor/skins/minimal/images/icons.silver.gif +0 -0
  122. data/app/assets/javascripts/wymeditor/skins/minimal/skin.css +131 -0
  123. data/app/assets/javascripts/wymeditor/skins/minimal/skin.js +30 -0
  124. data/app/assets/javascripts/wymeditor/skins/silver/COPYING +674 -0
  125. data/app/assets/javascripts/wymeditor/skins/silver/README +27 -0
  126. data/app/assets/javascripts/wymeditor/skins/silver/images/bg.header.gif +0 -0
  127. data/app/assets/javascripts/wymeditor/skins/silver/images/bg.selector.silver.gif +0 -0
  128. data/app/assets/javascripts/wymeditor/skins/silver/images/bg.wymeditor.png +0 -0
  129. data/app/assets/javascripts/wymeditor/skins/silver/images/icons.silver.gif +0 -0
  130. data/app/assets/javascripts/wymeditor/skins/silver/skin.css +297 -0
  131. data/app/assets/javascripts/wymeditor/skins/silver/skin.js +61 -0
  132. data/app/assets/javascripts/wymeditor/skins/twopanels/icons.png +0 -0
  133. data/app/assets/javascripts/wymeditor/skins/twopanels/skin.css +134 -0
  134. data/app/assets/javascripts/wymeditor/skins/twopanels/skin.js +39 -0
  135. data/app/assets/javascripts/wymeditor/skins/wymeditor_icon.png +0 -0
  136. data/app/assets/stylesheets/spud/admin/application.css +464 -0
  137. data/app/assets/stylesheets/spud/admin/jquery-ui.css +568 -0
  138. data/app/assets/stylesheets/spud/admin/settings.css +4 -0
  139. data/app/assets/stylesheets/spud/admin/users.css +4 -0
  140. data/app/assets/stylesheets/spud/forms.css +108 -0
  141. data/app/assets/stylesheets/spud/login/application.css +302 -0
  142. data/app/assets/stylesheets/spud/login.css +58 -0
  143. data/app/assets/stylesheets/spud/setup.css +4 -0
  144. data/app/assets/stylesheets/spud/sitemaps.css +4 -0
  145. data/app/assets/stylesheets/spud/user_sessions.css +4 -0
  146. data/app/assets/stylesheets/spud/users.css +4 -0
  147. data/app/controllers/spud/admin/application_controller.rb +19 -0
  148. data/app/controllers/spud/admin/dashboard_controller.rb +7 -0
  149. data/app/controllers/spud/admin/settings_controller.rb +15 -0
  150. data/app/controllers/spud/admin/users_controller.rb +111 -0
  151. data/app/controllers/spud/application_controller.rb +48 -0
  152. data/app/controllers/spud/setup_controller.rb +22 -0
  153. data/app/controllers/spud/sitemaps_controller.rb +6 -0
  154. data/app/controllers/spud/user_sessions_controller.rb +28 -0
  155. data/app/controllers/spud/users_controller.rb +21 -0
  156. data/app/helpers/spud/admin/application_helper.rb +17 -0
  157. data/app/helpers/spud/admin/settings_helper.rb +2 -0
  158. data/app/helpers/spud/admin/users_helper.rb +2 -0
  159. data/app/helpers/spud/setup_helper.rb +2 -0
  160. data/app/helpers/spud/sitemaps_helper.rb +2 -0
  161. data/app/helpers/spud/user_sessions_helper.rb +2 -0
  162. data/app/helpers/spud/users_helper.rb +2 -0
  163. data/app/models/spud_admin_permission.rb +2 -0
  164. data/app/models/spud_setting.rb +2 -0
  165. data/app/models/spud_user.rb +16 -0
  166. data/app/models/spud_user_session.rb +3 -0
  167. data/app/views/layouts/spud/admin/application.html.erb +44 -0
  168. data/app/views/layouts/spud/admin/detail.html.erb +31 -0
  169. data/app/views/layouts/spud/login/application.html.erb +17 -0
  170. data/app/views/layouts/spud/setup.html.erb +47 -0
  171. data/app/views/spud/admin/dashboard/index.html.erb +11 -0
  172. data/app/views/spud/admin/users/_edit.html.erb +14 -0
  173. data/app/views/spud/admin/users/_form.html.erb +51 -0
  174. data/app/views/spud/admin/users/_new.html.erb +14 -0
  175. data/app/views/spud/admin/users/index.html.erb +41 -0
  176. data/app/views/spud/admin/users/show.html.erb +17 -0
  177. data/app/views/spud/setup/index.html.erb +25 -0
  178. data/app/views/spud/sitemaps/show.xml.builder +12 -0
  179. data/app/views/spud/user_sessions/new.html.erb +22 -0
  180. data/app/views/spud/users/_form.html.erb +35 -0
  181. data/app/views/spud/users/settings.html.erb +14 -0
  182. data/config/application.rb +48 -0
  183. data/config/boot.rb +6 -0
  184. data/config/routes.rb +15 -0
  185. data/lib/spud_core/belongs_to_app.rb +54 -0
  186. data/lib/spud_core/configuration.rb +9 -0
  187. data/lib/spud_core/engine.rb +34 -0
  188. data/lib/spud_core/test_files.rb +25 -0
  189. data/lib/spud_core.rb +8 -0
  190. metadata +311 -0
@@ -0,0 +1,34 @@
1
+ /*jslint evil: true, indent: 4 *//**
2
+ WYMeditor
3
+ =========
4
+
5
+ version 1.0.0a6
6
+
7
+ WYMeditor : what you see is What You Mean web-based editor
8
+
9
+ Main JS file with core classes and functions.
10
+
11
+ Copyright
12
+ ---------
13
+
14
+ Copyright (c) 2005 - 2010 Jean-Francois Hovinne, http://www.wymeditor.org/
15
+ Dual licensed under the MIT (MIT-license.txt)
16
+ and GPL (GPL-license.txt) licenses.
17
+
18
+ Website
19
+ -------
20
+
21
+ For further information visit:
22
+ http://www.wymeditor.org/
23
+
24
+
25
+ Authors
26
+ -------
27
+
28
+ See AUTHORS file
29
+ */// Global WYMeditor namespace.
30
+ typeof WYMeditor=="undefined"&&(WYMeditor={}),function(){if(typeof window.console=="undefined"&&typeof console=="undefined"){var a=["log","debug","info","warn","error","assert","dir","dirxml","group","groupEnd","time","timeEnd","count","trace","profile","profileEnd"],b=function(){},c;WYMeditor.console={};for(c=0;c<a.length;c+=1)WYMeditor.console[a[c]]=b}else console?WYMeditor.console=console:window.console.firebug?WYMeditor.console=window.console:window.console&&(WYMeditor.console=window.console)}(),jQuery.extend(WYMeditor,{VERSION:"1.0.0a6",INSTANCES:[],STRINGS:[],SKINS:[],NAME:"name",INDEX:"{Wym_Index}",WYM_INDEX:"wym_index",BASE_PATH:"{Wym_Base_Path}",CSS_PATH:"{Wym_Css_Path}",WYM_PATH:"{Wym_Wym_Path}",SKINS_DEFAULT_PATH:"skins/",SKINS_DEFAULT_CSS:"skin.css",SKINS_DEFAULT_JS:"skin.js",LANG_DEFAULT_PATH:"lang/",IFRAME_BASE_PATH:"{Wym_Iframe_Base_Path}",IFRAME_DEFAULT:"iframe/default/",JQUERY_PATH:"{Wym_Jquery_Path}",DIRECTION:"{Wym_Direction}",LOGO:"{Wym_Logo}",TOOLS:"{Wym_Tools}",TOOLS_ITEMS:"{Wym_Tools_Items}",TOOL_NAME:"{Wym_Tool_Name}",TOOL_TITLE:"{Wym_Tool_Title}",TOOL_CLASS:"{Wym_Tool_Class}",CLASSES:"{Wym_Classes}",CLASSES_ITEMS:"{Wym_Classes_Items}",CLASS_NAME:"{Wym_Class_Name}",CLASS_TITLE:"{Wym_Class_Title}",CONTAINERS:"{Wym_Containers}",CONTAINERS_ITEMS:"{Wym_Containers_Items}",CONTAINER_NAME:"{Wym_Container_Name}",CONTAINER_TITLE:"{Wym_Containers_Title}",CONTAINER_CLASS:"{Wym_Container_Class}",HTML:"{Wym_Html}",IFRAME:"{Wym_Iframe}",STATUS:"{Wym_Status}",DIALOG_TITLE:"{Wym_Dialog_Title}",DIALOG_BODY:"{Wym_Dialog_Body}",NEWLINE:"\n",STRING:"string",BODY:"body",DIV:"div",P:"p",H1:"h1",H2:"h2",H3:"h3",H4:"h4",H5:"h5",H6:"h6",PRE:"pre",BLOCKQUOTE:"blockquote",A:"a",BR:"br",IMG:"img",TABLE:"table",TR:"tr",TD:"td",TH:"th",UL:"ul",OL:"ol",LI:"li",CLASS:"class",HREF:"href",SRC:"src",TITLE:"title",REL:"rel",ALT:"alt",DIALOG_LINK:"Link",DIALOG_IMAGE:"Image",DIALOG_TABLE:"Table",DIALOG_PASTE:"Paste_From_Word",BOLD:"Bold",ITALIC:"Italic",CREATE_LINK:"CreateLink",INSERT_IMAGE:"InsertImage",INSERT_TABLE:"InsertTable",INSERT_HTML:"InsertHTML",PASTE:"Paste",INDENT:"Indent",OUTDENT:"Outdent",TOGGLE_HTML:"ToggleHtml",FORMAT_BLOCK:"FormatBlock",PREVIEW:"Preview",UNLINK:"Unlink",INSERT_UNORDEREDLIST:"InsertUnorderedList",INSERT_ORDEREDLIST:"InsertOrderedList",MAIN_CONTAINERS:["p","h1","h2","h3","h4","h5","h6","pre","blockquote"],BLOCKS:["address","blockquote","div","dl","fieldset","form","h1","h2","h3","h4","h5","h6","hr","noscript","ol","p","pre","table","ul","dd","dt","li","tbody","td","tfoot","th","thead","tr"],BLOCKING_ELEMENTS:["table","blockquote","pre"],NON_BLOCKING_ELEMENTS:["p","h1","h2","h3","h4","h5","h6"],POTENTIAL_LIST_ELEMENTS:["p","h1","h2","h3","h4","h5","h6","pre","blockquote","td"],KEY:{BACKSPACE:8,TAB:9,ENTER:13,CTRL:17,END:35,HOME:36,CURSOR:[37,38,39,40],LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46,B:66,I:73,R:82,COMMAND:224},NODE:{ELEMENT:1,ATTRIBUTE:2,TEXT:3},editor:function(a,b){this._index=WYMeditor.INSTANCES.push(this)-1,this._element=a,this._options=b,this._html=jQuery(a).val(),this._options.html&&(this._html=this._options.html),this._options.wymPath=this._options.wymPath||WYMeditor.computeWymPath(),this._options.basePath=this._options.basePath||WYMeditor.computeBasePath(this._options.wymPath),this._options.jQueryPath=this._options.jQueryPath||WYMeditor.computeJqueryPath(),this._options.skinPath=this._options.skinPath||this._options.basePath+WYMeditor.SKINS_DEFAULT_PATH+this._options.skin+"/",this._options.langPath=this._options.langPath||this._options.basePath+WYMeditor.LANG_DEFAULT_PATH,this._options.iframeBasePath=this._options.iframeBasePath||this._options.basePath+WYMeditor.IFRAME_DEFAULT,this.init()}}),jQuery.fn.wymeditor=function(a){return a=jQuery.extend({html:"",basePath:!1,skinPath:!1,wymPath:!1,iframeBasePath:!1,jQueryPath:!1,styles:!1,stylesheet:!1,skin:"default",initSkin:!0,loadSkin:!0,lang:"en",direction:"ltr",customCommands:[],boxHtml:String()+"<div class='wym_box'>"+"<div class='wym_area_top'>"+WYMeditor.TOOLS+"</div>"+"<div class='wym_area_left'></div>"+"<div class='wym_area_right'>"+WYMeditor.CONTAINERS+WYMeditor.CLASSES+"</div>"+"<div class='wym_area_main'>"+WYMeditor.HTML+WYMeditor.IFRAME+WYMeditor.STATUS+"</div>"+"<div class='wym_area_bottom'>"+WYMeditor.LOGO+"</div>"+"</div>",logoHtml:String()+'<a class="wym_wymeditor_link" '+'href="http://www.wymeditor.org/">WYMeditor</a>',iframeHtml:String()+'<div class="wym_iframe wym_section">'+'<iframe src="'+WYMeditor.IFRAME_BASE_PATH+'wymiframe.html" '+'onload="this.contentWindow.parent.WYMeditor.INSTANCES['+WYMeditor.INDEX+'].initIframe(this)">'+"</iframe>"+"</div>",editorStyles:[],toolsHtml:String()+'<div class="wym_tools wym_section">'+"<h2>{Tools}</h2>"+"<ul>"+WYMeditor.TOOLS_ITEMS+"</ul>"+"</div>",toolsItemHtml:String()+'<li class="'+WYMeditor.TOOL_CLASS+'">'+'<a href="#" name="'+WYMeditor.TOOL_NAME+'"'+'title="'+WYMeditor.TOOL_TITLE+'">'+WYMeditor.TOOL_TITLE+"</a>"+"</li>",toolsItems:[{name:"Bold",title:"Strong",css:"wym_tools_strong"},{name:"Italic",title:"Emphasis",css:"wym_tools_emphasis"},{name:"Superscript",title:"Superscript",css:"wym_tools_superscript"},{name:"Subscript",title:"Subscript",css:"wym_tools_subscript"},{name:"InsertOrderedList",title:"Ordered_List",css:"wym_tools_ordered_list"},{name:"InsertUnorderedList",title:"Unordered_List",css:"wym_tools_unordered_list"},{name:"Indent",title:"Indent",css:"wym_tools_indent"},{name:"Outdent",title:"Outdent",css:"wym_tools_outdent"},{name:"Undo",title:"Undo",css:"wym_tools_undo"},{name:"Redo",title:"Redo",css:"wym_tools_redo"},{name:"CreateLink",title:"Link",css:"wym_tools_link"},{name:"Unlink",title:"Unlink",css:"wym_tools_unlink"},{name:"InsertImage",title:"Image",css:"wym_tools_image"},{name:"InsertTable",title:"Table",css:"wym_tools_table"},{name:"Paste",title:"Paste_From_Word",css:"wym_tools_paste"},{name:"ToggleHtml",title:"HTML",css:"wym_tools_html"},{name:"Preview",title:"Preview",css:"wym_tools_preview"}],containersHtml:String()+'<div class="wym_containers wym_section">'+"<h2>{Containers}</h2>"+"<ul>"+WYMeditor.CONTAINERS_ITEMS+"</ul>"+"</div>",containersItemHtml:String()+'<li class="'+WYMeditor.CONTAINER_CLASS+'">'+'<a href="#" name="'+WYMeditor.CONTAINER_NAME+'">'+WYMeditor.CONTAINER_TITLE+"</a>"+"</li>",containersItems:[{name:"P",title:"Paragraph",css:"wym_containers_p"},{name:"H1",title:"Heading_1",css:"wym_containers_h1"},{name:"H2",title:"Heading_2",css:"wym_containers_h2"},{name:"H3",title:"Heading_3",css:"wym_containers_h3"},{name:"H4",title:"Heading_4",css:"wym_containers_h4"},{name:"H5",title:"Heading_5",css:"wym_containers_h5"},{name:"H6",title:"Heading_6",css:"wym_containers_h6"},{name:"PRE",title:"Preformatted",css:"wym_containers_pre"},{name:"BLOCKQUOTE",title:"Blockquote",css:"wym_containers_blockquote"},{name:"TH",title:"Table_Header",css:"wym_containers_th"}],classesHtml:String()+'<div class="wym_classes wym_section">'+"<h2>{Classes}</h2>"+"<ul>"+WYMeditor.CLASSES_ITEMS+"</ul>"+"</div>",classesItemHtml:String()+'<li class="wym_classes_'+WYMeditor.CLASS_NAME+'">'+'<a href="#" name="'+WYMeditor.CLASS_NAME+'">'+WYMeditor.CLASS_TITLE+"</a>"+"</li>",classesItems:[],statusHtml:String()+'<div class="wym_status wym_section">'+"<h2>{Status}</h2>"+"</div>",htmlHtml:String()+'<div class="wym_html wym_section">'+"<h2>{Source_Code}</h2>"+'<textarea class="wym_html_val"></textarea>'+"</div>",boxSelector:".wym_box",toolsSelector:".wym_tools",toolsListSelector:" ul",containersSelector:".wym_containers",classesSelector:".wym_classes",htmlSelector:".wym_html",iframeSelector:".wym_iframe iframe",iframeBodySelector:".wym_iframe",statusSelector:".wym_status",toolSelector:".wym_tools a",containerSelector:".wym_containers a",classSelector:".wym_classes a",htmlValSelector:".wym_html_val",hrefSelector:".wym_href",srcSelector:".wym_src",titleSelector:".wym_title",relSelector:".wym_rel",altSelector:".wym_alt",textSelector:".wym_text",rowsSelector:".wym_rows",colsSelector:".wym_cols",captionSelector:".wym_caption",summarySelector:".wym_summary",submitSelector:"form",cancelSelector:".wym_cancel",previewSelector:"",dialogTypeSelector:".wym_dialog_type",dialogLinkSelector:".wym_dialog_link",dialogImageSelector:".wym_dialog_image",dialogTableSelector:".wym_dialog_table",dialogPasteSelector:".wym_dialog_paste",dialogPreviewSelector:".wym_dialog_preview",updateSelector:".wymupdate",updateEvent:"click",dialogFeatures:"menubar=no,titlebar=no,toolbar=no,resizable=no,width=560,height=300,top=0,left=0",dialogFeaturesPreview:"menubar=no,titlebar=no,toolbar=no,resizable=no,scrollbars=yes,width=560,height=300,top=0,left=0",dialogHtml:String()+'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" '+'"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'+'<html dir="'+WYMeditor.DIRECTION+'">'+"<head>"+'<link rel="stylesheet" type="text/css" media="screen" '+'href="'+WYMeditor.CSS_PATH+'" />'+"<title>"+WYMeditor.DIALOG_TITLE+"</title>"+'<script type="text/javascript" '+'src="'+WYMeditor.JQUERY_PATH+'"></script>'+'<script type="text/javascript" '+'src="'+WYMeditor.WYM_PATH+'"></script>'+"</head>"+WYMeditor.DIALOG_BODY+"</html>",dialogLinkHtml:String()+'<body class="wym_dialog wym_dialog_link" '+' onload="WYMeditor.INIT_DIALOG('+WYMeditor.INDEX+')">'+"<form>"+"<fieldset>"+'<input type="hidden" class="wym_dialog_type" '+'value="'+WYMeditor.DIALOG_LINK+'" />'+"<legend>{Link}</legend>"+'<div class="row">'+"<label>{URL}</label>"+'<input type="text" class="wym_href" value="" '+'size="40" autofocus="autofocus" />'+"</div>"+'<div class="row">'+"<label>{Title}</label>"+'<input type="text" class="wym_title" value="" '+'size="40" />'+"</div>"+'<div class="row">'+"<label>{Relationship}</label>"+'<input type="text" class="wym_rel" value="" '+'size="40" />'+"</div>"+'<div class="row row-indent">'+'<input class="wym_submit" type="submit" '+'value="{Submit}" />'+'<input class="wym_cancel" type="button" '+'value="{Cancel}" />'+"</div>"+"</fieldset>"+"</form>"+"</body>",dialogImageHtml:String()+'<body class="wym_dialog wym_dialog_image" '+'onload="WYMeditor.INIT_DIALOG('+WYMeditor.INDEX+')">'+"<form>"+"<fieldset>"+'<input type="hidden" class="wym_dialog_type" '+'value="'+WYMeditor.DIALOG_IMAGE+'" />'+"<legend>{Image}</legend>"+'<div class="row">'+"<label>{URL}</label>"+'<input type="text" class="wym_src" value="" '+'size="40" autofocus="autofocus" />'+"</div>"+'<div class="row">'+"<label>{Alternative_Text}</label>"+'<input type="text" class="wym_alt" value="" size="40" />'+"</div>"+'<div class="row">'+"<label>{Title}</label>"+'<input type="text" class="wym_title" value="" size="40" />'+"</div>"+'<div class="row row-indent">'+'<input class="wym_submit" type="submit" '+'value="{Submit}" />'+'<input class="wym_cancel" type="button" '+'value="{Cancel}" />'+"</div>"+"</fieldset>"+"</form>"+"</body>",dialogTableHtml:String()+'<body class="wym_dialog wym_dialog_table" '+'onload="WYMeditor.INIT_DIALOG('+WYMeditor.INDEX+')">'+"<form>"+"<fieldset>"+'<input type="hidden" class="wym_dialog_type" '+'value="'+WYMeditor.DIALOG_TABLE+'" />'+"<legend>{Table}</legend>"+'<div class="row">'+"<label>{Caption}</label>"+'<input type="text" class="wym_caption" value="" '+'size="40" />'+"</div>"+'<div class="row">'+"<label>{Summary}</label>"+'<input type="text" class="wym_summary" value="" '+'size="40" />'+"</div>"+'<div class="row">'+"<label>{Number_Of_Rows}</label>"+'<input type="text" class="wym_rows" value="3" size="3" />'+"</div>"+'<div class="row">'+"<label>{Number_Of_Cols}</label>"+'<input type="text" class="wym_cols" value="2" size="3" />'+"</div>"+'<div class="row row-indent">'+'<input class="wym_submit" type="submit" '+'value="{Submit}" />'+'<input class="wym_cancel" type="button" '+'value="{Cancel}" />'+"</div>"+"</fieldset>"+"</form>"+"</body>",dialogPasteHtml:String()+'<body class="wym_dialog wym_dialog_paste" '+'onload="WYMeditor.INIT_DIALOG('+WYMeditor.INDEX+')">'+"<form>"+'<input type="hidden" class="wym_dialog_type" '+'value="'+WYMeditor.DIALOG_PASTE+'" />'+"<fieldset>"+"<legend>{Paste_From_Word}</legend>"+'<div class="row">'+'<textarea class="wym_text" rows="10" cols="50" '+'autofocus="autofocus"></textarea>'+"</div>"+'<div class="row">'+'<input class="wym_submit" type="submit" '+'value="{Submit}" />'+'<input class="wym_cancel" type="button" '+'value="{Cancel}" />'+"</div>"+"</fieldset>"+"</form>"+"</body>",dialogPreviewHtml:String()+'<body class="wym_dialog wym_dialog_preview" '+'onload="WYMeditor.INIT_DIALOG('+WYMeditor.INDEX+')"></body>',dialogStyles:[],stringDelimiterLeft:"{",stringDelimiterRight:"}",preInit:null,preBind:null,postInit:null,preInitDialog:null,postInitDialog:null},a),this.each(function(){var b=new WYMeditor.editor(jQuery(this),a)})},jQuery.extend({wymeditors:function(a){return WYMeditor.INSTANCES[a]}}),WYMeditor.computeWymPath=function(){var a=jQuery(jQuery.grep(jQuery("script"),function(a){return a.src?a.src.match(/jquery\.wymeditor(\.pack|\.min|\.packed)?\.js(\?.*)?$/)||a.src.match(/\/core\.js(\?.*)?$/):null}));return a.length>0?a.attr("src"):(WYMeditor.console.warn("Error determining wymPath. No base WYMeditor file located."),WYMeditor.console.warn("Assuming wymPath to be the current URL"),WYMeditor.console.warn("Please pass a correct wymPath option"),"")},WYMeditor.computeBasePath=function(a){var b=a.lastIndexOf("/");return a.substr(0,b+1)},WYMeditor.computeJqueryPath=function(){return jQuery(jQuery.grep(jQuery("script"),function(a){return a.src&&a.src.match(/jquery(-(.*)){0,1}(\.pack|\.min|\.packed)?\.js(\?.*)?$/)})).attr("src")},WYMeditor.INIT_DIALOG=function(index){var wym=window.opener.WYMeditor.INSTANCES[index],doc=window.document,selected=wym.selected(),dialogType=jQuery(wym._options.dialogTypeSelector).val(),sStamp=wym.uniqueStamp(),styles,aCss,tableOnClick;dialogType===WYMeditor.DIALOG_LINK&&(selected&&selected.tagName&&selected.tagName.toLowerCase!==WYMeditor.A&&(selected=jQuery(selected).parentsOrSelf(WYMeditor.A)),!selected&&wym._selected_image&&(selected=jQuery(wym._selected_image).parentsOrSelf(WYMeditor.A))),jQuery.isFunction(wym._options.preInitDialog)&&wym._options.preInitDialog(wym,window),styles=doc.styleSheets[0],aCss=eval(wym._options.dialogStyles),wym.addCssRules(doc,aCss),selected&&(jQuery(wym._options.hrefSelector).val(jQuery(selected).attr(WYMeditor.HREF)),jQuery(wym._options.srcSelector).val(jQuery(selected).attr(WYMeditor.SRC)),jQuery(wym._options.titleSelector).val(jQuery(selected).attr(WYMeditor.TITLE)),jQuery(wym._options.relSelector).val(jQuery(selected).attr(WYMeditor.REL)),jQuery(wym._options.altSelector).val(jQuery(selected).attr(WYMeditor.ALT))),wym._selected_image&&(jQuery(wym._options.dialogImageSelector+" "+wym._options.srcSelector).val(jQuery(wym._selected_image).attr(WYMeditor.SRC)),jQuery(wym._options.dialogImageSelector+" "+wym._options.titleSelector).val(jQuery(wym._selected_image).attr(WYMeditor.TITLE)),jQuery(wym._options.dialogImageSelector+" "+wym._options.altSelector).val(jQuery(wym._selected_image).attr(WYMeditor.ALT))),jQuery(wym._options.dialogLinkSelector+" "+wym._options.submitSelector).submit(function(){var a=jQuery(wym._options.hrefSelector).val(),b;a.length>0&&(selected[0]&&selected[0].tagName.toLowerCase()===WYMeditor.A?b=selected:(wym._exec(WYMeditor.CREATE_LINK,sStamp),b=jQuery("a[href="+sStamp+"]",wym._doc.body)),b.attr(WYMeditor.HREF,a),b.attr(WYMeditor.TITLE,jQuery(wym._options.titleSelector).val()),b.attr(WYMeditor.REL,jQuery(wym._options.relSelector).val())),window.close()}),jQuery(wym._options.dialogImageSelector+" "+wym._options.submitSelector).submit(function(){var a=jQuery(wym._options.srcSelector).val(),b;a.length>0&&(wym._exec(WYMeditor.INSERT_IMAGE,sStamp),b=jQuery("img[src$="+sStamp+"]",wym._doc.body),b.attr(WYMeditor.SRC,a),b.attr(WYMeditor.TITLE,jQuery(wym._options.titleSelector).val()),b.attr(WYMeditor.ALT,jQuery(wym._options.altSelector).val())),window.close()}),tableOnClick=WYMeditor.MAKE_TABLE_ONCLICK(wym),jQuery(wym._options.dialogTableSelector+" "+wym._options.submitSelector).submit(tableOnClick),jQuery(wym._options.dialogPasteSelector+" "+wym._options.submitSelector).submit(function(){var a=jQuery(wym._options.textSelector).val();wym.paste(a),window.close()}),jQuery(wym._options.dialogPreviewSelector+" "+wym._options.previewSelector).html(wym.xhtml()),jQuery(wym._options.cancelSelector).mousedown(function(){window.close()}),jQuery.isFunction(wym._options.postInitDialog)&&wym._options.postInitDialog(wym,window)},WYMeditor.MAKE_TABLE_ONCLICK=function(a){var b=function(){var b=jQuery(a._options.rowsSelector).val(),c=jQuery(a._options.colsSelector).val(),d=jQuery(a._options.captionSelector).val(),e=jQuery(a._options.summarySelector).val(),f=a.insertTable(b,c,d,e);window.close()};return b},jQuery.fn.isPhantomNode=function(){return this[0].nodeType===3?!/[^\t\n\r ]/.test(this[0].data):!1},jQuery.fn.nextAllContents=function(){var a=[],b=this.get(0);if(!b)return $();b=b.nextSibling;while(b)a.push(b),b=b.nextSibling;return $(a)},WYMeditor.isPhantomNode=function(a){return a.nodeType===3?!/[^\t\n\r ]/.test(a.data):!1},WYMeditor.isPhantomString=function(a){return!/[^\t\n\r ]/.test(a)},jQuery.fn.parentsOrSelf=function(a){var b=this;return b[0].nodeType===3&&(b=b.parents().slice(0,1)),b.filter(a).size()===1?b:b.parents(a).slice(0,1)},WYMeditor.changeNodeType=function(a,b){var c,d,e=a.attributes;$(a).wrapInner("<"+b+">"),c=$(a).children().get(0);for(d=0;d<e.length;d++)e[d].specified&&c.setAttribute(e[d].nodeName,e[d].nodeValue);return $(a).contents().unwrap(),c},WYMeditor.Helper={replaceAll:function(a,b,c){var d=new RegExp(b,"g");return a.replace(d,c)},insertAt:function(a,b,c){return a.substr(0,c)+b+a.substring(c)},trim:function(a){return a.replace(/^(\s*)|(\s*)$/gm,"")},contains:function(a,b){var c;for(c=0;c<a.length;c+=1)if(a[c]===b)return!0;return!1},indexOf:function(a,b){var c=-1,d;for(d=0;d<a.length;d+=1)if(a[d]===b){c=d;break}return c},findByName:function(a,b){var c,d;for(c=0;c<a.length;c+=1){d=a[c];if(d.name===b)return d}return null}},window.rangy=function(){function h(c,d){var e=typeof c[d];return e==b||e==a&&!!c[d]||e=="unknown"}function i(b,c){return typeof b[c]==a&&!!b[c]}function j(a,b){return typeof a[b]!=c}function k(a){return function(b,c){var d=c.length;while(d--)if(!a(b,c[d]))return!1;return!0}}function o(a){return a&&l(a,g)&&n(a,f)}function q(a){window.alert("Rangy not supported in your browser. Reason: "+a),p.initialized=!0,p.supported=!1}function r(a){var b="Rangy warning: "+a;p.config.alertOnWarn?window.alert(b):typeof window.console!=c&&typeof window.console.log!=c&&window.console.log(b)}function u(){if(p.initialized)return;var a,b=!1,c=!1;h(document,"createRange")&&(a=document.createRange(),l(a,e)&&n(a,d)&&(b=!0),a.detach());var f=i(document,"body")?document.body:document.getElementsByTagName("body")[0];f&&h(f,"createTextRange")&&(a=f.createTextRange(),o(a)&&(c=!0)),!b&&!c&&q("Neither Range nor TextRange are implemented"),p.initialized=!0,p.features={implementsDomRange:b,implementsTextRange:c};var g=t.concat(s);for(var j=0,k=g.length;j<k;++j)try{g[j](p)}catch(m){i(window,"console")&&h(window.console,"log")&&window.console.log("Init listener threw an exception. Continuing.",m)}}function w(a){a=a||window,u();for(var b=0,c=v.length;b<c;++b)v[b](a)}function x(a){this.name=a,this.initialized=!1,this.supported=!1}var a="object",b="function",c="undefined",d=["startContainer","startOffset","endContainer","endOffset","collapsed","commonAncestorContainer","START_TO_START","START_TO_END","END_TO_START","END_TO_END"],e=["setStart","setStartBefore","setStartAfter","setEnd","setEndBefore","setEndAfter","collapse","selectNode","selectNodeContents","compareBoundaryPoints","deleteContents","extractContents","cloneContents","insertNode","surroundContents","cloneRange","toString","detach"],f=["boundingHeight","boundingLeft","boundingTop","boundingWidth","htmlText","text"],g=["collapse","compareEndPoints","duplicate","getBookmark","moveToBookmark","moveToElementText","parentElement","pasteHTML","select","setEndPoint","getBoundingClientRect"],l=k(h),m=k(i),n=k(j),p={version:"1.2.2",initialized:!1,supported:!0,util:{isHostMethod:h,isHostObject:i,isHostProperty:j,areHostMethods:l,areHostObjects:m,areHostProperties:n,isTextRange:o},features:{},modules:{},config:{alertOnWarn:!1,preferTextRange:!1}};p.fail=q,p.warn=r,{}.hasOwnProperty?p.util.extend=function(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c])}:q("hasOwnProperty not supported");var s=[],t=[];p.init=u,p.addInitListener=function(a){p.initialized?a(p):s.push(a)};var v=[];p.addCreateMissingNativeApiListener=function(a){v.push(a)},p.createMissingNativeApi=w,x.prototype.fail=function(a){throw this.initialized=!0,this.supported=!1,new Error("Module '"+this.name+"' failed to load: "+a)},x.prototype.warn=function(a){p.warn("Module "+this.name+": "+a)},x.prototype.createError=function(a){return new Error("Error in Rangy "+this.name+" module: "+a)},p.createModule=function(a,b){var c=new x(a);p.modules[a]=c,t.push(function(a){b(a,c),c.initialized=!0,c.supported=!0})},p.requireModules=function(a){for(var b=0,c=a.length,d,e;b<c;++b){e=a[b],d=p.modules[e];if(!d||!(d instanceof x))throw new Error("Module '"+e+"' not found");if(!d.supported)throw new Error("Module '"+e+"' not supported")}};var y=!1,z=function(a){y||(y=!0,p.initialized||u())};if(typeof window==c){q("No window found");return}if(typeof document==c){q("No document found");return}return h(document,"addEventListener")&&document.addEventListener("DOMContentLoaded",z,!1),h(window,"addEventListener")?window.addEventListener("load",z,!1):h(window,"attachEvent")?window.attachEvent("onload",z):q("Window does not have required addEventListener or attachEvent method"),p}(),rangy.createModule("DomUtil",function(a,b){function h(a){var b;return typeof a.namespaceURI==c||(b=a.namespaceURI)===null||b=="http://www.w3.org/1999/xhtml"}function i(a){var b=a.parentNode;return b.nodeType==1?b:null}function j(a){var b=0;while(a=a.previousSibling)b++;return b}function k(a){var b;return o(a)?a.length:(b=a.childNodes)?b.length:0}function l(a,b){var c=[],d;for(d=a;d;d=d.parentNode)c.push(d);for(d=b;d;d=d.parentNode)if(g(c,d))return d;return null}function m(a,b,c){var d=c?b:b.parentNode;while(d){if(d===a)return!0;d=d.parentNode}return!1}function n(a,b,c){var d,e=c?a:a.parentNode;while(e){d=e.parentNode;if(d===b)return e;e=d}return null}function o(a){var b=a.nodeType;return b==3||b==4||b==8}function p(a,b){var c=b.nextSibling,d=b.parentNode;return c?d.insertBefore(a,c):d.appendChild(a),a}function q(a,b){var c=a.cloneNode(!1);return c.deleteData(0,b),a.deleteData(b,a.length-b),p(c,a),c}function r(a){if(a.nodeType==9)return a;if(typeof a.ownerDocument!=c)return a.ownerDocument;if(typeof a.document!=c)return a.document;if(a.parentNode)return r(a.parentNode);throw new Error("getDocument: no document found for node")}function s(a){var b=r(a);if(typeof b.defaultView!=c)return b.defaultView;if(typeof b.parentWindow!=c)return b.parentWindow;throw new Error("Cannot get a window object for node")}function t(a){if(typeof a.contentDocument!=c)return a.contentDocument;if(typeof a.contentWindow!=c)return a.contentWindow.document;throw new Error("getIframeWindow: No Document object found for iframe element")}function u(a){if(typeof a.contentWindow!=c)return a.contentWindow;if(typeof a.contentDocument!=c)return a.contentDocument.defaultView;throw new Error("getIframeWindow: No Window object found for iframe element")}function v(a){return d.isHostObject(a,"body")?a.body:a.getElementsByTagName("body")[0]}function w(a){var b;while(b=a.parentNode)a=b;return a}function x(a,b,c,d){var e,f,g,h,i;if(a==c)return b===d?0:b<d?-1:1;if(e=n(c,a,!0))return b<=j(e)?-1:1;if(e=n(a,c,!0))return j(e)<d?-1:1;f=l(a,c),g=a===f?f:n(a,f,!0),h=c===f?f:n(c,f,!0);if(g===h)throw new Error("comparePoints got to case 4 and childA and childB are the same!");i=f.firstChild;while(i){if(i===g)return-1;if(i===h)return 1;i=i.nextSibling}throw new Error("Should not be here!")}function y(a){var b=r(a).createDocumentFragment(),c;while(c=a.firstChild)b.appendChild(c);return b}function z(a){if(!a)return"[No node]";if(o(a))return'"'+a.data+'"';if(a.nodeType==1){var b=a.id?' id="'+a.id+'"':"";return"<"+a.nodeName+b+">["+a.childNodes.length+"]"}return a.nodeName}function A(a){this.root=a,this._next=a}function B(a){return new A(a)}function C(a,b){this.node=a,this.offset=b}function D(a){this.code=this[a],this.codeName=a,this.message="DOMException: "+this.codeName}var c="undefined",d=a.util;d.areHostMethods(document,["createDocumentFragment","createElement","createTextNode"])||b.fail("document missing a Node creation method"),d.isHostMethod(document,"getElementsByTagName")||b.fail("document missing getElementsByTagName method");var e=document.createElement("div");d.areHostMethods(e,["insertBefore","appendChild","cloneNode"]||!d.areHostObjects(e,["previousSibling","nextSibling","childNodes","parentNode"]))||b.fail("Incomplete Element implementation"),d.isHostProperty(e,"innerHTML")||b.fail("Element is missing innerHTML property");var f=document.createTextNode("test");d.areHostMethods(f,["splitText","deleteData","insertData","appendData","cloneNode"]||!d.areHostObjects(e,["previousSibling","nextSibling","childNodes","parentNode"])||!d.areHostProperties(f,["data"]))||b.fail("Incomplete Text Node implementation");var g=function(a,b){var c=a.length;while(c--)if(a[c]===b)return!0;return!1};A.prototype={_current:null,hasNext:function(){return!!this._next},next:function(){var a=this._current=this._next,b,c;if(this._current){b=a.firstChild;if(b)this._next=b;else{c=null;while(a!==this.root&&!(c=a.nextSibling))a=a.parentNode;this._next=c}}return this._current},detach:function(){this._current=this._next=this.root=null}},C.prototype={equals:function(a){return this.node===a.node&this.offset==a.offset},inspect:function(){return"[DomPosition("+z(this.node)+":"+this.offset+")]"}},D.prototype={INDEX_SIZE_ERR:1,HIERARCHY_REQUEST_ERR:3,WRONG_DOCUMENT_ERR:4,NO_MODIFICATION_ALLOWED_ERR:7,NOT_FOUND_ERR:8,NOT_SUPPORTED_ERR:9,INVALID_STATE_ERR:11},D.prototype.toString=function(){return this.message},a.dom={arrayContains:g,isHtmlNamespace:h,parentElement:i,getNodeIndex:j,getNodeLength:k,getCommonAncestor:l,isAncestorOf:m,getClosestAncestorIn:n,isCharacterDataNode:o,insertAfter:p,splitDataNode:q,getDocument:r,getWindow:s,getIframeWindow:u,getIframeDocument:t,getBody:v,getRootContainer:w,comparePoints:x,inspectNode:z,fragmentFromNodeChildren:y,createIterator:B,DomPosition:C},a.DOMException=D}),rangy.createModule("DomRange",function(a,b){function f(a,b){return a.nodeType!=3&&(c.isAncestorOf(a,b.startContainer,!0)||c.isAncestorOf(a,b.endContainer,!0))}function g(a){return c.getDocument(a.startContainer)}function h(a,b,c){var d=a._listeners[b];if(d)for(var e=0,f=d.length;e<f;++e)d[e].call(a,{target:a,args:c})}function i(a){return new d(a.parentNode,c.getNodeIndex(a))}function j(a){return new d(a.parentNode,c.getNodeIndex(a)+1)}function k(a,b,d){var e=a.nodeType==11?a.firstChild:a;return c.isCharacterDataNode(b)?d==b.length?c.insertAfter(a,b):b.parentNode.insertBefore(a,d==0?b:c.splitDataNode(b,d)):d>=b.childNodes.length?b.appendChild(a):b.insertBefore(a,b.childNodes[d]),e}function l(a){var b;for(var c,d=g(a.range).createDocumentFragment(),f;c=a.next();){b=a.isPartiallySelectedSubtree(),c=c.cloneNode(!b),b&&(f=a.getSubtreeIterator(),c.appendChild(l(f)),f.detach(!0));if(c.nodeType==10)throw new e("HIERARCHY_REQUEST_ERR");d.appendChild(c)}return d}function m(a,b,d){var e,f;d=d||{stop:!1};for(var g,h;g=a.next();)if(a.isPartiallySelectedSubtree()){if(b(g)===!1){d.stop=!0;return}h=a.getSubtreeIterator(),m(h,b,d),h.detach(!0);if(d.stop)return}else{e=c.createIterator(g);while(f=e.next())if(b(f)===!1){d.stop=!0;return}}}function n(a){var b;while(a.next())a.isPartiallySelectedSubtree()?(b=a.getSubtreeIterator(),n(b),b.detach(!0)):a.remove()}function o(a){for(var b,c=g(a.range).createDocumentFragment(),d;b=a.next();){a.isPartiallySelectedSubtree()?(b=b.cloneNode(!1),d=a.getSubtreeIterator(),b.appendChild(o(d)),d.detach(!0)):a.remove();if(b.nodeType==10)throw new e("HIERARCHY_REQUEST_ERR");c.appendChild(b)}return c}function p(a,b,c){var d=!!b&&!!b.length,e,f=!!c;d&&(e=new RegExp("^("+b.join("|")+")$"));var g=[];return m(new r(a,!1),function(a){(!d||e.test(a.nodeType))&&(!f||c(a))&&g.push(a)}),g}function q(a){var b=typeof a.getName=="undefined"?"Range":a.getName();return"["+b+"("+c.inspectNode(a.startContainer)+":"+a.startOffset+", "+c.inspectNode(a.endContainer)+":"+a.endOffset+")]"}function r(a,b){this.range=a,this.clonePartiallySelectedTextNodes=b;if(!a.collapsed){this.sc=a.startContainer,this.so=a.startOffset,this.ec=a.endContainer,this.eo=a.endOffset;var d=a.commonAncestorContainer;this.sc===this.ec&&c.isCharacterDataNode(this.sc)?(this.isSingleCharacterDataNode=!0,this._first=this._last=this._next=this.sc):(this._first=this._next=this.sc===d&&!c.isCharacterDataNode(this.sc)?this.sc.childNodes[this.so]:c.getClosestAncestorIn(this.sc,d,!0),this._last=this.ec===d&&!c.isCharacterDataNode(this.ec)?this.ec.childNodes[this.eo-1]:c.getClosestAncestorIn(this.ec,d,!0))}}function s(a){this.code=this[a],this.codeName=a,this.message="RangeException: "+this.codeName}function t(a,b,c){this.nodes=p(a,b,c),this._next=this.nodes[0],this._position=0}function z(a){return function(b,d){var e,f=d?b:b.parentNode;while(f){e=f.nodeType;if(c.arrayContains(a,e))return f;f=f.parentNode}return null}}function E(a,b){if(D(a,b))throw new s("INVALID_NODE_TYPE_ERR")}function F(a){if(!a.startContainer)throw new e("INVALID_STATE_ERR")}function G(a,b){if(!c.arrayContains(b,a.nodeType))throw new s("INVALID_NODE_TYPE_ERR")}function H(a,b){if(b<0||b>(c.isCharacterDataNode(a)?a.length:a.childNodes.length))throw new e("INDEX_SIZE_ERR")}function I(a,b){if(B(a,!0)!==B(b,!0))throw new e("WRONG_DOCUMENT_ERR")}function J(a){if(C(a,!0))throw new e("NO_MODIFICATION_ALLOWED_ERR")}function K(a,b){if(!a)throw new e(b)}function L(a){return!c.arrayContains(v,a.nodeType)&&!B(a,!0)}function M(a,b){return b<=(c.isCharacterDataNode(a)?a.length:a.childNodes.length)}function N(a){F(a);if(L(a.startContainer)||L(a.endContainer)||!M(a.startContainer,a.startOffset)||!M(a.endContainer,a.endOffset))throw new Error("Range error: Range is no longer valid after DOM mutation ("+a.inspect()+")")}function _(){}function ba(a){a.START_TO_START=T,a.START_TO_END=U,a.END_TO_END=V,a.END_TO_START=W,a.NODE_BEFORE=X,a.NODE_AFTER=Y,a.NODE_BEFORE_AND_AFTER=Z,a.NODE_INSIDE=$}function bb(a){ba(a),ba(a.prototype)}function bc(a,b){return function(){N(this);var d=this.startContainer,e=this.startOffset,f=this.commonAncestorContainer,g=new r(this,!0),h,i;d!==f&&(h=c.getClosestAncestorIn(d,f,!0),i=j(h),d=i.node,e=i.offset),m(g,J),g.reset();var k=a(g);return g.detach(),b(this,d,e,d,e),k}}function bd(b,d,e){function g(a,b){return function(c){F(this),G(c,u),G(A(c),v);var d=(a?i:j)(c);(b?h:k)(this,d.node,d.offset)}}function h(a,b,e){var f=a.endContainer,g=a.endOffset;if(b!==a.startContainer||e!==a.startOffset){if(A(b)!=A(f)||c.comparePoints(b,e,f,g)==1)f=b,g=e;d(a,b,e,f,g)}}function k(a,b,e){var f=a.startContainer,g=a.startOffset;if(b!==a.endContainer||e!==a.endOffset){if(A(b)!=A(f)||c.comparePoints(b,e,f,g)==-1)f=b,g=e;d(a,f,g,b,e)}}function l(a,b,c){(b!==a.startContainer||c!==a.startOffset||b!==a.endContainer||c!==a.endOffset)&&d(a,b,c,b,c)}b.prototype=new _,a.util.extend(b.prototype,{setStart:function(a,b){F(this),E(a,!0),H(a,b),h(this,a,b)},setEnd:function(a,b){F(this),E(a,!0),H(a,b),k(this,a,b)},setStartBefore:g(!0,!0),setStartAfter:g(!1,!0),setEndBefore:g(!0,!1),setEndAfter:g(!1,!1),collapse:function(a){N(this),a?d(this,this.startContainer,this.startOffset,this.startContainer,this.startOffset):d(this,this.endContainer,this.endOffset,this.endContainer,this.endOffset)},selectNodeContents:function(a){F(this),E(a,!0),d(this,a,0,a,c.getNodeLength(a))},selectNode:function(a){F(this),E(a,!1),G(a,u);var b=i(a),c=j(a);d(this,b.node,b.offset,c.node,c.offset)},extractContents:bc(o,d),deleteContents:bc(n,d),canSurroundContents:function(){N(this),J(this.startContainer),J(this.endContainer);var a=new r(this,!0),b=a._first&&f(a._first,this)||a._last&&f(a._last,this);return a.detach(),!b},detach:function(){e(
31
+ this)},splitBoundaries:function(){N(this);var a=this.startContainer,b=this.startOffset,e=this.endContainer,f=this.endOffset,g=a===e;c.isCharacterDataNode(e)&&f>0&&f<e.length&&c.splitDataNode(e,f),c.isCharacterDataNode(a)&&b>0&&b<a.length&&(a=c.splitDataNode(a,b),g?(f-=b,e=a):e==a.parentNode&&f>=c.getNodeIndex(a)&&f++,b=0),d(this,a,b,e,f)},normalizeBoundaries:function(){N(this);var a=this.startContainer,b=this.startOffset,e=this.endContainer,f=this.endOffset,g=function(a){var b=a.nextSibling;b&&b.nodeType==a.nodeType&&(e=a,f=a.length,a.appendData(b.data),b.parentNode.removeChild(b))},h=function(d){var g=d.previousSibling;if(g&&g.nodeType==d.nodeType){a=d;var h=d.length;b=g.length,d.insertData(0,g.data),g.parentNode.removeChild(g);if(a==e)f+=b,e=a;else if(e==d.parentNode){var i=c.getNodeIndex(d);f==i?(e=d,f=h):f>i&&f--}}},i=!0;if(c.isCharacterDataNode(e))e.length==f&&g(e);else{if(f>0){var j=e.childNodes[f-1];j&&c.isCharacterDataNode(j)&&g(j)}i=!this.collapsed}if(i){if(c.isCharacterDataNode(a))b==0&&h(a);else if(b<a.childNodes.length){var k=a.childNodes[b];k&&c.isCharacterDataNode(k)&&h(k)}}else a=e,b=f;d(this,a,b,e,f)},collapseToPoint:function(a,b){F(this),E(a,!0),H(a,b),l(this,a,b)}}),bb(b)}function be(a){a.collapsed=a.startContainer===a.endContainer&&a.startOffset===a.endOffset,a.commonAncestorContainer=a.collapsed?a.startContainer:c.getCommonAncestor(a.startContainer,a.endContainer)}function bf(a,b,c,d,e){var f=a.startContainer!==b||a.startOffset!==c,g=a.endContainer!==d||a.endOffset!==e;a.startContainer=b,a.startOffset=c,a.endContainer=d,a.endOffset=e,be(a),h(a,"boundarychange",{startMoved:f,endMoved:g})}function bg(a){F(a),a.startContainer=a.startOffset=a.endContainer=a.endOffset=null,a.collapsed=a.commonAncestorContainer=null,h(a,"detach",null),a._listeners=null}function bh(a){this.startContainer=a,this.startOffset=0,this.endContainer=a,this.endOffset=0,this._listeners={boundarychange:[],detach:[]},be(this)}a.requireModules(["DomUtil"]);var c=a.dom,d=c.DomPosition,e=a.DOMException;r.prototype={_current:null,_next:null,_first:null,_last:null,isSingleCharacterDataNode:!1,reset:function(){this._current=null,this._next=this._first},hasNext:function(){return!!this._next},next:function(){var a=this._current=this._next;return a&&(this._next=a!==this._last?a.nextSibling:null,c.isCharacterDataNode(a)&&this.clonePartiallySelectedTextNodes&&(a===this.ec&&(a=a.cloneNode(!0)).deleteData(this.eo,a.length-this.eo),this._current===this.sc&&(a=a.cloneNode(!0)).deleteData(0,this.so))),a},remove:function(){var a=this._current,b,d;!c.isCharacterDataNode(a)||a!==this.sc&&a!==this.ec?a.parentNode&&a.parentNode.removeChild(a):(b=a===this.sc?this.so:0,d=a===this.ec?this.eo:a.length,b!=d&&a.deleteData(b,d-b))},isPartiallySelectedSubtree:function(){var a=this._current;return f(a,this.range)},getSubtreeIterator:function(){var a;if(this.isSingleCharacterDataNode)a=this.range.cloneRange(),a.collapse();else{a=new bh(g(this.range));var b=this._current,d=b,e=0,f=b,h=c.getNodeLength(b);c.isAncestorOf(b,this.sc,!0)&&(d=this.sc,e=this.so),c.isAncestorOf(b,this.ec,!0)&&(f=this.ec,h=this.eo),bf(a,d,e,f,h)}return new r(a,this.clonePartiallySelectedTextNodes)},detach:function(a){a&&this.range.detach(),this.range=this._current=this._next=this._first=this._last=this.sc=this.so=this.ec=this.eo=null}},s.prototype={BAD_BOUNDARYPOINTS_ERR:1,INVALID_NODE_TYPE_ERR:2},s.prototype.toString=function(){return this.message},t.prototype={_current:null,hasNext:function(){return!!this._next},next:function(){return this._current=this._next,this._next=this.nodes[++this._position],this._current},detach:function(){this._current=this._next=this.nodes=null}};var u=[1,3,4,5,7,8,10],v=[2,9,11],w=[5,6,10,12],x=[1,3,4,5,7,8,10,11],y=[1,3,4,5,7,8],A=c.getRootContainer,B=z([9,11]),C=z(w),D=z([6,10,12]),O=document.createElement("style"),P=!1;try{O.innerHTML="<b>x</b>",P=O.firstChild.nodeType==3}catch(Q){}a.features.htmlParsingConforms=P;var R=P?function(a){var b=this.startContainer,d=c.getDocument(b);if(!b)throw new e("INVALID_STATE_ERR");var f=null;return b.nodeType==1?f=b:c.isCharacterDataNode(b)&&(f=c.parentElement(b)),f===null||f.nodeName=="HTML"&&c.isHtmlNamespace(c.getDocument(f).documentElement)&&c.isHtmlNamespace(f)?f=d.createElement("body"):f=f.cloneNode(!1),f.innerHTML=a,c.fragmentFromNodeChildren(f)}:function(a){F(this);var b=g(this),d=b.createElement("body");return d.innerHTML=a,c.fragmentFromNodeChildren(d)},S=["startContainer","startOffset","endContainer","endOffset","collapsed","commonAncestorContainer"],T=0,U=1,V=2,W=3,X=0,Y=1,Z=2,$=3;_.prototype={attachListener:function(a,b){this._listeners[a].push(b)},compareBoundaryPoints:function(a,b){N(this),I(this.startContainer,b.startContainer);var d,e,f,g,h=a==W||a==T?"start":"end",i=a==U||a==T?"start":"end";return d=this[h+"Container"],e=this[h+"Offset"],f=b[i+"Container"],g=b[i+"Offset"],c.comparePoints(d,e,f,g)},insertNode:function(a){N(this),G(a,x),J(this.startContainer);if(c.isAncestorOf(a,this.startContainer,!0))throw new e("HIERARCHY_REQUEST_ERR");var b=k(a,this.startContainer,this.startOffset);this.setStartBefore(b)},cloneContents:function(){N(this);var a,b;if(this.collapsed)return g(this).createDocumentFragment();if(this.startContainer===this.endContainer&&c.isCharacterDataNode(this.startContainer))return a=this.startContainer.cloneNode(!0),a.data=a.data.slice(this.startOffset,this.endOffset),b=g(this).createDocumentFragment(),b.appendChild(a),b;var d=new r(this,!0);return a=l(d),d.detach(),a},canSurroundContents:function(){N(this),J(this.startContainer),J(this.endContainer);var a=new r(this,!0),b=a._first&&f(a._first,this)||a._last&&f(a._last,this);return a.detach(),!b},surroundContents:function(a){G(a,y);if(!this.canSurroundContents())throw new s("BAD_BOUNDARYPOINTS_ERR");var b=this.extractContents();if(a.hasChildNodes())while(a.lastChild)a.removeChild(a.lastChild);k(a,this.startContainer,this.startOffset),a.appendChild(b),this.selectNode(a)},cloneRange:function(){N(this);var a=new bh(g(this)),b=S.length,c;while(b--)c=S[b],a[c]=this[c];return a},toString:function(){N(this);var a=this.startContainer;if(a===this.endContainer&&c.isCharacterDataNode(a))return a.nodeType==3||a.nodeType==4?a.data.slice(this.startOffset,this.endOffset):"";var b=[],d=new r(this,!0);return m(d,function(a){(a.nodeType==3||a.nodeType==4)&&b.push(a.data)}),d.detach(),b.join("")},compareNode:function(a){N(this);var b=a.parentNode,d=c.getNodeIndex(a);if(!b)throw new e("NOT_FOUND_ERR");var f=this.comparePoint(b,d),g=this.comparePoint(b,d+1);return f<0?g>0?Z:X:g>0?Y:$},comparePoint:function(a,b){return N(this),K(a,"HIERARCHY_REQUEST_ERR"),I(a,this.startContainer),c.comparePoints(a,b,this.startContainer,this.startOffset)<0?-1:c.comparePoints(a,b,this.endContainer,this.endOffset)>0?1:0},createContextualFragment:R,toHtml:function(){N(this);var a=g(this).createElement("div");return a.appendChild(this.cloneContents()),a.innerHTML},intersectsNode:function(a,b){N(this),K(a,"NOT_FOUND_ERR");if(c.getDocument(a)!==g(this))return!1;var d=a.parentNode,e=c.getNodeIndex(a);K(d,"NOT_FOUND_ERR");var f=c.comparePoints(d,e,this.endContainer,this.endOffset),h=c.comparePoints(d,e+1,this.startContainer,this.startOffset);return b?f<=0&&h>=0:f<0&&h>0},isPointInRange:function(a,b){return N(this),K(a,"HIERARCHY_REQUEST_ERR"),I(a,this.startContainer),c.comparePoints(a,b,this.startContainer,this.startOffset)>=0&&c.comparePoints(a,b,this.endContainer,this.endOffset)<=0},intersectsRange:function(a,b){N(this);if(g(a)!=g(this))throw new e("WRONG_DOCUMENT_ERR");var d=c.comparePoints(this.startContainer,this.startOffset,a.endContainer,a.endOffset),f=c.comparePoints(this.endContainer,this.endOffset,a.startContainer,a.startOffset);return b?d<=0&&f>=0:d<0&&f>0},intersection:function(a){if(this.intersectsRange(a)){var b=c.comparePoints(this.startContainer,this.startOffset,a.startContainer,a.startOffset),d=c.comparePoints(this.endContainer,this.endOffset,a.endContainer,a.endOffset),e=this.cloneRange();return b==-1&&e.setStart(a.startContainer,a.startOffset),d==1&&e.setEnd(a.endContainer,a.endOffset),e}return null},union:function(a){if(this.intersectsRange(a,!0)){var b=this.cloneRange();return c.comparePoints(a.startContainer,a.startOffset,this.startContainer,this.startOffset)==-1&&b.setStart(a.startContainer,a.startOffset),c.comparePoints(a.endContainer,a.endOffset,this.endContainer,this.endOffset)==1&&b.setEnd(a.endContainer,a.endOffset),b}throw new s("Ranges do not intersect")},containsNode:function(a,b){return b?this.intersectsNode(a,!1):this.compareNode(a)==$},containsNodeContents:function(a){return this.comparePoint(a,0)>=0&&this.comparePoint(a,c.getNodeLength(a))<=0},containsRange:function(a){return this.intersection(a).equals(a)},containsNodeText:function(a){var b=this.cloneRange();b.selectNode(a);var c=b.getNodes([3]);if(c.length>0){b.setStart(c[0],0);var d=c.pop();b.setEnd(d,d.length);var e=this.containsRange(b);return b.detach(),e}return this.containsNodeContents(a)},createNodeIterator:function(a,b){return N(this),new t(this,a,b)},getNodes:function(a,b){return N(this),p(this,a,b)},getDocument:function(){return g(this)},collapseBefore:function(a){F(this),this.setEndBefore(a),this.collapse(!1)},collapseAfter:function(a){F(this),this.setStartAfter(a),this.collapse(!0)},getName:function(){return"DomRange"},equals:function(a){return bh.rangesEqual(this,a)},inspect:function(){return q(this)}},bd(bh,bf,bg),a.rangePrototype=_.prototype,bh.rangeProperties=S,bh.RangeIterator=r,bh.copyComparisonConstants=bb,bh.createPrototypeRange=bd,bh.inspect=q,bh.getRangeDocument=g,bh.rangesEqual=function(a,b){return a.startContainer===b.startContainer&&a.startOffset===b.startOffset&&a.endContainer===b.endContainer&&a.endOffset===b.endOffset},a.DomRange=bh,a.RangeException=s}),rangy.createModule("WrappedRange",function(a,b){function g(a){var b=a.parentElement(),c=a.duplicate();c.collapse(!0);var e=c.parentElement();c=a.duplicate(),c.collapse(!1);var f=c.parentElement(),g=e==f?e:d.getCommonAncestor(e,f);return g==b?g:d.getCommonAncestor(b,g)}function h(a){return a.compareEndPoints("StartToEnd",a)==0}function i(a,b,c,f){var g=a.duplicate();g.collapse(c);var h=g.parentElement();d.isAncestorOf(b,h,!0)||(h=b);if(!h.canHaveHTML)return new e(h.parentNode,d.getNodeIndex(h));var i=d.getDocument(h).createElement("span"),j,k=c?"StartToStart":"StartToEnd",l,m,n,o;do h.insertBefore(i,i.previousSibling),g.moveToElementText(i);while((j=g.compareEndPoints(k,a))>0&&i.previousSibling);o=i.nextSibling;if(j==-1&&o&&d.isCharacterDataNode(o)){g.setEndPoint(c?"EndToStart":"EndToEnd",a);var p;if(/[\r\n]/.test(o.data)){var q=g.duplicate(),r=q.text.replace(/\r\n/g,"\r").length;p=q.moveStart("character",r);while((j=q.compareEndPoints("StartToEnd",q))==-1)p++,q.moveStart("character",1)}else p=g.text.length;n=new e(o,p)}else l=(f||!c)&&i.previousSibling,m=(f||c)&&i.nextSibling,m&&d.isCharacterDataNode(m)?n=new e(m,0):l&&d.isCharacterDataNode(l)?n=new e(l,l.length):n=new e(h,d.getNodeIndex(i));return i.parentNode.removeChild(i),n}function j(a,b){var c,e,f=a.offset,g=d.getDocument(a.node),h,i,j=g.body.createTextRange(),k=d.isCharacterDataNode(a.node);return k?(c=a.node,e=c.parentNode):(i=a.node.childNodes,c=f<i.length?i[f]:null,e=a.node),h=g.createElement("span"),h.innerHTML="&#feff;",c?e.insertBefore(h,c):e.appendChild(h),j.moveToElementText(h),j.collapse(!b),e.removeChild(h),k&&j[b?"moveStart":"moveEnd"]("character",f),j}a.requireModules(["DomUtil","DomRange"]);var c,d=a.dom,e=d.DomPosition,f=a.DomRange;if(a.features.implementsDomRange&&(!a.features.implementsTextRange||!a.config.preferTextRange))(function(){function h(a){var b=e.length,c;while(b--)c=e[b],a[c]=a.nativeRange[c]}function i(a,b,c,d,e){var f=a.startContainer!==b||a.startOffset!=c,g=a.endContainer!==d||a.endOffset!=e;if(f||g)a.setEnd(d,e),a.setStart(b,c)}function j(a){a.nativeRange.detach(),a.detached=!0;var b=e.length,c;while(b--)c=e[b],a[c]=null}var b,e=f.rangeProperties,g,k;c=function(a){if(!a)throw new Error("Range must be specified");this.nativeRange=a,h(this)},f.createPrototypeRange(c,i,j),b=c.prototype,b.selectNode=function(a){this.nativeRange.selectNode(a),h(this)},b.deleteContents=function(){this.nativeRange.deleteContents(),h(this)},b.extractContents=function(){var a=this.nativeRange.extractContents();return h(this),a},b.cloneContents=function(){return this.nativeRange.cloneContents()},b.surroundContents=function(a){this.nativeRange.surroundContents(a),h(this)},b.collapse=function(a){this.nativeRange.collapse(a),h(this)},b.cloneRange=function(){return new c(this.nativeRange.cloneRange())},b.refresh=function(){h(this)},b.toString=function(){return this.nativeRange.toString()};var l=document.createTextNode("test");d.getBody(document).appendChild(l);var m=document.createRange();m.setStart(l,0),m.setEnd(l,0);try{m.setStart(l,1),g=!0,b.setStart=function(a,b){this.nativeRange.setStart(a,b),h(this)},b.setEnd=function(a,b){this.nativeRange.setEnd(a,b),h(this)},k=function(a){return function(b){this.nativeRange[a](b),h(this)}}}catch(n){g=!1,b.setStart=function(a,b){try{this.nativeRange.setStart(a,b)}catch(c){this.nativeRange.setEnd(a,b),this.nativeRange.setStart(a,b)}h(this)},b.setEnd=function(a,b){try{this.nativeRange.setEnd(a,b)}catch(c){this.nativeRange.setStart(a,b),this.nativeRange.setEnd(a,b)}h(this)},k=function(a,b){return function(c){try{this.nativeRange[a](c)}catch(d){this.nativeRange[b](c),this.nativeRange[a](c)}h(this)}}}b.setStartBefore=k("setStartBefore","setEndBefore"),b.setStartAfter=k("setStartAfter","setEndAfter"),b.setEndBefore=k("setEndBefore","setStartBefore"),b.setEndAfter=k("setEndAfter","setStartAfter"),m.selectNodeContents(l),m.startContainer==l&&m.endContainer==l&&m.startOffset==0&&m.endOffset==l.length?b.selectNodeContents=function(a){this.nativeRange.selectNodeContents(a),h(this)}:b.selectNodeContents=function(a){this.setStart(a,0),this.setEnd(a,f.getEndOffset(a))},m.selectNodeContents(l),m.setEnd(l,3);var o=document.createRange();o.selectNodeContents(l),o.setEnd(l,4),o.setStart(l,2),m.compareBoundaryPoints(m.START_TO_END,o)==-1&m.compareBoundaryPoints(m.END_TO_START,o)==1?b.compareBoundaryPoints=function(a,b){return b=b.nativeRange||b,a==b.START_TO_END?a=b.END_TO_START:a==b.END_TO_START&&(a=b.START_TO_END),this.nativeRange.compareBoundaryPoints(a,b)}:b.compareBoundaryPoints=function(a,b){return this.nativeRange.compareBoundaryPoints(a,b.nativeRange||b)},a.util.isHostMethod(m,"createContextualFragment")&&(b.createContextualFragment=function(a){return this.nativeRange.createContextualFragment(a)}),d.getBody(document).removeChild(l),m.detach(),o.detach()})(),a.createNativeRange=function(a){return a=a||document,a.createRange()};else if(a.features.implementsTextRange){c=function(a){this.textRange=a,this.refresh()},c.prototype=new f(document),c.prototype.refresh=function(){var a,b,c=g(this.textRange);h(this.textRange)?b=a=i(this.textRange,c,!0,!0):(a=i(this.textRange,c,!0,!1),b=i(this.textRange,c,!1,!1)),this.setStart(a.node,a.offset),this.setEnd(b.node,b.offset)},f.copyComparisonConstants(c);var k=function(){return this}();typeof k.Range=="undefined"&&(k.Range=c),a.createNativeRange=function(a){return a=a||document,a.body.createTextRange()}}a.features.implementsTextRange&&(c.rangeToTextRange=function(a){if(a.collapsed){var b=j(new e(a.startContainer,a.startOffset),!0);return b}var c=j(new e(a.startContainer,a.startOffset),!0),f=j(new e(a.endContainer,a.endOffset),!1),g=d.getDocument(a.startContainer).body.createTextRange();return g.setEndPoint("StartToStart",c),g.setEndPoint("EndToEnd",f),g}),c.prototype.getName=function(){return"WrappedRange"},a.WrappedRange=c,a.createRange=function(b){return b=b||document,new c(a.createNativeRange(b))},a.createRangyRange=function(a){return a=a||document,new f(a)},a.createIframeRange=function(b){return a.createRange(d.getIframeDocument(b))},a.createIframeRangyRange=function(b){return a.createRangyRange(d.getIframeDocument(b))},a.addCreateMissingNativeApiListener(function(b){var c=b.document;typeof c.createRange=="undefined"&&(c.createRange=function(){return a.createRange(this)}),c=b=null})}),rangy.createModule("WrappedSelection",function(a,b){function n(a){return(a||window).getSelection()}function o(a){return(a||window).document.selection}function C(a,b,c){var d=c?"end":"start",e=c?"start":"end";a.anchorNode=b[d+"Container"],a.anchorOffset=b[d+"Offset"],a.focusNode=b[e+"Container"],a.focusOffset=b[e+"Offset"]}function D(a){var b=a.nativeSelection;a.anchorNode=b.anchorNode,a.anchorOffset=b.anchorOffset,a.focusNode=b.focusNode,a.focusOffset=b.focusOffset}function E(a){a.anchorNode=a.focusNode=null,a.anchorOffset=a.focusOffset=0,a.rangeCount=0,a.isCollapsed=!0,a._ranges.length=0}function F(b){var c;return b instanceof g?(c=b._selectionNativeRange,c||(c=a.createNativeRange(e.getDocument(b.startContainer)),c.setEnd(b.endContainer,b.endOffset),c.setStart(b.startContainer,b.startOffset),b._selectionNativeRange=c,b.attachListener("detach",function(){this._selectionNativeRange=null}))):b instanceof h?c=b.nativeRange:a.features.implementsDomRange&&b instanceof e.getWindow(b.startContainer).Range&&(c=b),c}function G(a){if(!a.length||a[0].nodeType!=1)return!1;for(var b=1,c=a.length;b<c;++b)if(!e.isAncestorOf(a[0],a[b]))return!1;return!0}function H(a){var b=a.getNodes();if(!G(b))throw new Error("getSingleElementFromRange: range "+a.inspect()+" did not consist of a single element");return b[0]}function I(a){return!!a&&typeof a.text!="undefined"}function J(a,b){var c=new h(b);a._ranges=[c],C(a,c,!1),a.rangeCount=1,a.isCollapsed=c.collapsed}function K(b){b._ranges.length=0;if(b.docSelection.type=="None")E(b);else{var c=b.docSelection.createRange();if(I(c))J(b,c);else{b.rangeCount=c.length;var d,f=e.getDocument(c.item(0));for(var g=0;g<b.rangeCount;++g)d=a.createRange(f),d.selectNode(c.item(g)),b._ranges.push(d);b.isCollapsed=b.rangeCount==1&&b._ranges[0].collapsed,C(b,b._ranges[b.rangeCount-1],!1)}}}function L(a,b){var c=a.docSelection.createRange(),d=H(b),f=e.getDocument(c.item(0)),g=e.getBody(f).createControlRange();for(var h=0,i=c.length;h<i;++h)g.add(c.item(h));try{g.add(d)}catch(j){throw new Error("addRange(): Element within the specified Range could not be added to control selection (does it have layout?)")}g.select(),K(a)}function N(a,b,c){this.nativeSelection=a,this.docSelection=b,this._ranges=[],this.win=c,this.refresh()}function P(a,b){var c=e.getDocument(b[0].startContainer),d=e.getBody(c).createControlRange();for(var f=0,g;f<rangeCount;++f){g=H(b[f]);try{d.add(g)}catch(h){throw new Error("setRanges(): Element within the one of the specified Ranges could not be added to control selection (does it have layout?)")}}d.select(),K(a)}function U(a,b){if(a.anchorNode&&e.getDocument(a.anchorNode)!==e.getDocument(b))throw new i("WRONG_DOCUMENT_ERR")}function V(a){var b=[],c=new j(a.anchorNode,a.anchorOffset),d=new j(a.focusNode,a.focusOffset),e=typeof a.getName=="function"?a.getName():"Selection";if(typeof a.rangeCount!="undefined")for(var f=0,h=a.rangeCount;f<h;++f)b[f]=g.inspect(a.getRangeAt(f));return"["+e+"(Ranges: "+b.join(", ")+")(anchor: "+c.inspect()+", focus: "+d.inspect()+"]"}a.requireModules(["DomUtil","DomRange","WrappedRange"]),a.config.checkSelectionRanges=!0;var c="boolean",d="_rangySelection",e=a.dom,f=a.util,g=a.DomRange,h=a.WrappedRange,i=a.DOMException,j=e.DomPosition,k,l,m="Control",p=a.util.isHostMethod(window,"getSelection"),q=a.util.isHostObject(document,"selection"),r=q&&(!p||a.config.preferTextRange);r?(k=o,a.isSelectionValid=function(a){var b=(a||window).document,c=b.selection;return c.type!="None"||e.getDocument(c.createRange().parentElement())==b}):p?(k=n,a.isSelectionValid=function(){return!0}):b.fail("Neither document.selection or window.getSelection() detected."),a.getNativeSelection=k;var s=k(),t=a.createNativeRange(document),u=e.getBody(document),v=f.areHostObjects(s,["anchorNode","focusNode"]&&f.areHostProperties(s,["anchorOffset","focusOffset"]));a.features.selectionHasAnchorAndFocus=v;var w=f.isHostMethod(s,"extend");a.features.selectionHasExtend=w;var x=typeof s.rangeCount=="number";a.features.selectionHasRangeCount=x;var y=!1,z=!0;f.areHostMethods(s,["addRange","getRangeAt","removeAllRanges"])&&typeof s.rangeCount=="number"&&a.features.implementsDomRange&&function(){var a=document.createElement("iframe");u.appendChild(a);var b=e.getIframeDocument(a);b.open(),b.write("<html><head></head><body>12</body></html>"),b.close();var c=e.getIframeWindow(a).getSelection(),d=b.documentElement,f=d.lastChild,g=f.firstChild,h=b.createRange();h.setStart(g,1),h.collapse(!0),c.addRange(h),z=c.rangeCount==1,c.removeAllRanges();var i=h.cloneRange();h.setStart(g,0),i.setEnd(g,2),c.addRange(h),c.addRange(i),y=c.rangeCount==2,h.detach(),i.detach(),u.removeChild(a)}(),a.features.selectionSupportsMultipleRanges=y,a.features.collapsedNonEditableSelectionsSupported=z;var A=!1,B;u&&f.isHostMethod(u,"createControlRange")&&(B=u.createControlRange(),f.areHostProperties(B,["item","add"])&&(A=!0)),a.features.implementsControlRange=A,v?l=function(a){return a.anchorNode===a.focusNode&&a.anchorOffset===a.focusOffset}:l=function(a){return a.rangeCount?a.getRangeAt(a.rangeCount-1).collapsed:!1};var M;f.isHostMethod(s,"getRangeAt")?M=function(a,b){try{return a.getRangeAt(b)}catch(c){return null}}:v&&(M=function(b){var c=e.getDocument(b.anchorNode),d=a.createRange(c);return d.setStart(b.anchorNode,b.anchorOffset),d.setEnd(b.focusNode,b.focusOffset),d.collapsed!==this.isCollapsed&&(d.setStart(b.focusNode,b.focusOffset),d.setEnd(b.anchorNode,b.anchorOffset)),d}),a.getSelection=function(a){a=a||window;var b=a[d],c=k(a),e=q?o(a):null;return b?(b.nativeSelection=c,b.docSelection=e,b.refresh(a)):(b=new N(c,e,a),a[d]=b),b},a.getIframeSelection=function(b){return a.getSelection(e.getIframeWindow(b))};var O=N.prototype;if(!r&&v&&f.areHostMethods(s,["removeAllRanges","addRange"])){O.removeAllRanges=function(){this.nativeSelection.removeAllRanges(),E(this)};var Q=function(b,c){var d=g.getRangeDocument(c),e=a.createRange(d);e.collapseToPoint(c.endContainer,c.endOffset),b.nativeSelection.addRange(F(e)),b.nativeSelection.extend(c.startContainer,c.startOffset),b.refresh()};x?O.addRange=function(b,c){if(A&&q&&this.docSelection.type==m)L(this,b);else if(c&&w)Q(this,b);else{var d;y?d=this.rangeCount:(this.removeAllRanges(),d=0),this.nativeSelection.addRange(F(b)),this.rangeCount=this.nativeSelection.rangeCount;if(this.rangeCount==d+1){if(a.config.checkSelectionRanges){var e=M(this.nativeSelection,this.rangeCount-1);e&&!g.rangesEqual(e,b)&&(b=new h(e))}this._ranges[this.rangeCount-1]=b,C(this,b,T(this.nativeSelection)),this.isCollapsed=l(this)}else this.refresh()}}:O.addRange=function(a,b){b&&w?Q(this,a):(this.nativeSelection.addRange(F(a)),this.refresh())},O.setRanges=function(a){if(A&&a.length>1)P(this,a);else{this.removeAllRanges();for(var b=0,c=a.length;b<c;++b)this.addRange(a[b])}}}else{if(!(f.isHostMethod(s,"empty")&&f.isHostMethod(t,"select")&&A&&r))return b.fail("No means of selecting a Range or TextRange was found"),!1;O.removeAllRanges=function(){try{this.docSelection.empty();if(this.docSelection.type!="None"){var a;if(this.anchorNode)a=e.getDocument(this.anchorNode);else if(this.docSelection.type==m){var b=this.docSelection.createRange();b.length&&(a=e.getDocument(b.item(0)).body.createTextRange())}if(a){var c=a.body.createTextRange();c.select(),this.docSelection.empty()}}}catch(d){}E(this)},O.addRange=function(a){this.docSelection.type==m?L(this,a):(h.rangeToTextRange(a).select(),this._ranges[0]=a,this.rangeCount=1,this.isCollapsed=this._ranges[0].collapsed,C(this,a,!1))},O.setRanges=function(a){this.removeAllRanges();var b=a.length;b>1?P(this,a):b&&this.addRange(a[0])}}O.getRangeAt=function(a){if(a<0||a>=this.rangeCount)throw new i("INDEX_SIZE_ERR");return this._ranges[a]};var R;if(r)R=function(b){var c;a.isSelectionValid(b.win)?c=b.docSelection.createRange():(c=e.getBody(b.win.document).createTextRange(),c.collapse(!0)),b.docSelection.type==m?K(b):I(c)?J(b,c):E(b)};else if(f.isHostMethod(s,"getRangeAt")&&typeof s.rangeCount=="number")R=function(b){if(A&&q&&b.docSelection.type==m)K(b);else{b._ranges.length=b.rangeCount=b.nativeSelection.rangeCount;if(b.rangeCount){for(var c=0,d=b.rangeCount;c<d;++c)b._ranges[c]=new a.WrappedRange(b.nativeSelection.getRangeAt(c));C(b,b._ranges[b.rangeCount-1],T(b.nativeSelection)),b.isCollapsed=l(b)}else E(b)}};else{if(!v||typeof s.isCollapsed!=c||typeof t.collapsed!=c||!a.features.implementsDomRange)return b.fail("No means of obtaining a Range or TextRange from the user's selection was found"),!1;R=function(a){var b,c=a.nativeSelection;c.anchorNode?(b=M(c,0),a._ranges=[b],a.rangeCount=1,D(a),a.isCollapsed=l(a)):E(a)}}O.refresh=function(a){var b=a?this._ranges.slice(0):null;R(this);if(a){var c=b.length;if(c!=this._ranges.length)return!1;while(c--)if(!g.rangesEqual(b[c],this._ranges[c]))return!1;return!0}};var S=function(a,b){var c=a.getAllRanges(),d=!1;a.removeAllRanges();for(var e=0,f=c.length;e<f;++e)d||b!==c[e]?a.addRange(c[e]):d=!0;a.rangeCount||E(a)};A?O.removeRange=function(a){if(this.docSelection.type==m){var b=this.docSelection.createRange(),c=H(a),d=e.getDocument(b.item(0)),f=e.getBody(d).createControlRange(),g,h=!1;for(var i=0,j=b.length;i<j;++i)g=b.item(i),g!==c||h?f.add(b.item(i)):h=!0;f.select(),K(this)}else S(this,a)}:O.removeRange=function(a){S(this,a)};var T;!r&&v&&a.features.implementsDomRange?(T=function(a){var b=!1;return a.anchorNode&&(b=e.comparePoints(a.anchorNode,a.anchorOffset,a.focusNode,a.focusOffset)==1),b},O.isBackwards=function(){return T(this)}):T=O.isBackwards=function(){return!1},O.toString=function(){var a=[];for(var b=0,c=this.rangeCount;b<c;++b)a[b]=""+this._ranges[b];return a.join("")},O.collapse=function(b,c){U(this,b);var d=a.createRange(e.getDocument(b));d.collapseToPoint(b,c),this.removeAllRanges(),this.addRange(d),this.isCollapsed=!0},O.collapseToStart=function(){if(!this.rangeCount)throw new i("INVALID_STATE_ERR");var a=this._ranges[0];this.collapse(a.startContainer,a.startOffset)},O.collapseToEnd=function(){if(!this.rangeCount)throw new i("INVALID_STATE_ERR");var a=this._ranges[this.rangeCount-1];this.collapse(a.endContainer,a.endOffset)},O.selectAllChildren=function(b){U(this,b);var c=a.createRange(e.getDocument(b));c.selectNodeContents(b),this.removeAllRanges(),this.addRange(c)},O.deleteFromDocument=function(){if(A&&q&&this.docSelection.type==m){var a=this.docSelection.createRange(),b;while(a.length)b=a.item(0),a.remove(b),b.parentNode.removeChild(b);this.refresh()}else if(this.rangeCount){var c=this.getAllRanges();this.removeAllRanges();for(var d=0,e=c.length;d<e;++d)c[d].deleteContents();this.addRange(c[e-1])}},O.getAllRanges=function(){return this._ranges.slice(0)},O.setSingleRange=function(a){this.setRanges([a])},O.containsNode=function(a,b){for(var c=0,d=this._ranges.length;c<d;++c)if(this._ranges[c].containsNode(a,b))return!0;return!1},O.toHtml=function(){var a="";if(this.rangeCount){var b=g.getRangeDocument(this._ranges[0]).createElement("div");for(var c=0,d=this._ranges.length;c<d;++c)b.appendChild(this._ranges[c].cloneContents());a=b.innerHTML}return a},O.getName=function(){return"WrappedSelection"},O.inspect=function(){return V(this)},O.detach=function(){this.win[d]=null,this.win=this.anchorNode=this.focusNode=null},N.inspect=V,a.Selection=N,a.selectionPrototype=O,a.addCreateMissingNativeApiListener(function(b){typeof b.getSelection=="undefined"&&(b.getSelection=function(){return a.getSelection(this)}),b=null})}),rangy.createModule("SaveRestore",function(a,b){function e(a,b){return(b||document).getElementById(a)}function f(a,b){var e="selectionBoundary_"+ +(new Date)+"_"+(""+Math.random()).slice(2),f,g=c.getDocument(a.startContainer),h=a.cloneRange();return h.collapse(b),f=g.createElement("span"),f.id=e,f.style.lineHeight="0",f.style.display="none",f.className="rangySelectionBoundary",f.appendChild(g.createTextNode(d)),h.insertNode(f),h.detach(),f}function g(a,c,d,f){var g=e(d,a);g?(c[f?"setStartBefore":"setEndBefore"](g),g.parentNode.removeChild(g)):b.warn("Marker element has been removed. Cannot restore selection.")}function h(a,b){return b.compareBoundaryPoints(a.START_TO_START,a)}function i(c){c=c||window;var d=c.document;if(!a.isSelectionValid(c)){b.warn("Cannot save selection. This usually happens when the selection is collapsed and the selection document has lost focus.");return}var g=a.getSelection(c),i=g.getAllRanges(),j=[],k,l,m;i.sort(h);for(var n=0,o=i.length;n<o;++n)m=i[n],m.collapsed?(l=f(m,!1),j.push({markerId:l.id,collapsed:!0})):(l=f(m,!1),k=f(m,!0),j[n]={startMarkerId:k.id,endMarkerId:l.id,collapsed:!1,backwards:i.length==1&&g.isBackwards()});for(n=o-1;n>=0;--n)m=i[n],m.collapsed?m.collapseBefore(e(j[n].markerId,d)):(m.setEndBefore(e(j[n].endMarkerId,d)),m.setStartAfter(e(j[n].startMarkerId,d)));return g.setRanges(i),{win:c,doc:d,rangeInfos:j,restored:!1}}function j(c,d){if(!c.restored){var f=c.rangeInfos,h=a.getSelection(c.win),i=[];for(var j=f.length,k=j-1,l,m;k>=0;--k){l=f[k],m=a.createRange(c.doc);if(l.collapsed){var n=e(l.markerId,c.doc);if(n){n.style.display="inline";var o=n.previousSibling;o&&o.nodeType==3?(n.parentNode.removeChild(n),m.collapseToPoint(o,o.length)):(m.collapseBefore(n),n.parentNode.removeChild(n))}else b.warn("Marker element has been removed. Cannot restore selection.")}else g(c.doc,m,l.startMarkerId,!0),g(c.doc,m,l.endMarkerId,!1);j==1&&m.normalizeBoundaries(),i[k]=m}j==1&&d&&a.features.selectionHasExtend&&f[0].backwards?(h.removeAllRanges(),h.addRange(i[0],!0)):h.setRanges(i),c.restored=!0}}function k(a,b){var c=e(b,a);c&&c.parentNode.removeChild(c)}function l(a){var b=a.rangeInfos;for(var c=0,d=b.length,e;c<d;++c)e=b[c],e.collapsed?k(a.doc,e.markerId):(k(a.doc,e.startMarkerId),k(a.doc,e.endMarkerId))}a.requireModules(["DomUtil","DomRange","WrappedRange"]);var c=a.dom,d="";a.saveSelection=i,a.restoreSelection=j,a.removeMarkerElement=k,a.removeMarkers=l}),WYMeditor.editor.prototype.init=function(){var WymClass=!1,SaxListener,prop,h,iframeHtml,boxHtml,aTools,sTools,oTool,sTool,i,aClasses,sClasses,oClass,sClass,aContainers,sContainers,sContainer,oContainer;jQuery.browser.msie?WymClass=new WYMeditor.WymClassExplorer(this):jQuery.browser.mozilla?WymClass=new WYMeditor.WymClassMozilla(this):jQuery.browser.opera?WymClass=new WYMeditor.WymClassOpera(this):jQuery.browser.safari&&(WymClass=new WYMeditor.WymClassSafari(this));if(WymClass===!1)return;jQuery.isFunction(this._options.preInit)&&this._options.preInit(this),SaxListener=new WYMeditor.XhtmlSaxListener,jQuery.extend(SaxListener,WymClass),this.parser=new WYMeditor.XhtmlParser(SaxListener),(this._options.styles||this._options.stylesheet)&&this.configureEditorUsingRawCss(),this.helper=new WYMeditor.XmlHelper;for(prop in WymClass)this[prop]=WymClass[prop];this._box=jQuery(this._element).hide().after(this._options.boxHtml).next().addClass("wym_box_"+this._index),jQuery.isFunction(jQuery.fn.data)&&(jQuery.data(this._box.get(0),WYMeditor.WYM_INDEX,this._index),jQuery.data(this._element.get(0),WYMeditor.WYM_INDEX,this._index)),h=WYMeditor.Helper,iframeHtml=this._options.iframeHtml,iframeHtml=h.replaceAll(iframeHtml,WYMeditor.INDEX,this._index),iframeHtml=h.replaceAll(iframeHtml,WYMeditor.IFRAME_BASE_PATH,this._options.iframeBasePath),boxHtml=jQuery(this._box).html(),boxHtml=h.replaceAll(boxHtml,WYMeditor.LOGO,this._options.logoHtml),boxHtml=h.replaceAll(boxHtml,WYMeditor.TOOLS,this._options.toolsHtml),boxHtml=h.replaceAll(boxHtml,WYMeditor.CONTAINERS,this._options.containersHtml),boxHtml=h.replaceAll(boxHtml,WYMeditor.CLASSES,this._options.classesHtml),boxHtml=h.replaceAll(boxHtml,WYMeditor.HTML,this._options.htmlHtml),boxHtml=h.replaceAll(boxHtml,WYMeditor.IFRAME,iframeHtml),boxHtml=h.replaceAll(boxHtml,WYMeditor.STATUS,this._options.statusHtml),aTools=eval(this._options.toolsItems),sTools="";for(i=0;i<aTools.length;i+=1)oTool=aTools[i],sTool="",oTool.name&&oTool.title&&(sTool=this._options.toolsItemHtml),sTool=h.replaceAll(sTool,WYMeditor.TOOL_NAME,oTool.name),sTool=h.replaceAll(sTool,WYMeditor.TOOL_TITLE,this._options.stringDelimiterLeft+oTool.title+this._options.stringDelimiterRight),sTool=h.replaceAll(sTool,WYMeditor.TOOL_CLASS,oTool.css),sTools+=sTool;boxHtml=h.replaceAll(boxHtml,WYMeditor.TOOLS_ITEMS,sTools),aClasses=eval(this._options.classesItems),sClasses="";for(i=0;i<aClasses.length;i+=1)oClass=aClasses[i],sClass="",oClass.name&&oClass.title&&(sClass=this._options.classesItemHtml),sClass=h.replaceAll(sClass,WYMeditor.CLASS_NAME,oClass.name),sClass=h.replaceAll(sClass,WYMeditor.CLASS_TITLE,oClass.title),sClasses+=sClass;boxHtml=h.replaceAll(boxHtml,WYMeditor.CLASSES_ITEMS,sClasses),aContainers=eval(this._options.containersItems),sContainers="";for(i=0;i<aContainers
32
+ .length;i+=1)oContainer=aContainers[i],sContainer="",oContainer.name&&oContainer.title&&(sContainer=this._options.containersItemHtml),sContainer=h.replaceAll(sContainer,WYMeditor.CONTAINER_NAME,oContainer.name),sContainer=h.replaceAll(sContainer,WYMeditor.CONTAINER_TITLE,this._options.stringDelimiterLeft+oContainer.title+this._options.stringDelimiterRight),sContainer=h.replaceAll(sContainer,WYMeditor.CONTAINER_CLASS,oContainer.css),sContainers+=sContainer;boxHtml=h.replaceAll(boxHtml,WYMeditor.CONTAINERS_ITEMS,sContainers),boxHtml=this.replaceStrings(boxHtml),jQuery(this._box).html(boxHtml),jQuery(this._box).find(this._options.htmlSelector).hide(),this.loadSkin()},WYMeditor.editor.prototype.bindEvents=function(){var wym=this,$html_val;jQuery(this._box).find(this._options.toolSelector).click(function(){return wym._iframe.contentWindow.focus(),wym.exec(jQuery(this).attr(WYMeditor.NAME)),!1}),jQuery(this._box).find(this._options.containerSelector).click(function(){return wym.container(jQuery(this).attr(WYMeditor.NAME)),!1}),$html_val=jQuery(this._box).find(this._options.htmlValSelector),$html_val.keyup(function(){jQuery(wym._doc.body).html(jQuery(this).val())}),$html_val.focus(function(){jQuery(this).toggleClass("hasfocus")}),$html_val.blur(function(){jQuery(this).toggleClass("hasfocus")}),jQuery(this._box).find(this._options.classSelector).click(function(){var aClasses=eval(wym._options.classesItems),sName=jQuery(this).attr(WYMeditor.NAME),oClass=WYMeditor.Helper.findByName(aClasses,sName),jqexpr;return oClass&&(jqexpr=oClass.expr,wym.toggleClass(sName,jqexpr)),wym._iframe.contentWindow.focus(),!1}),jQuery(this._options.updateSelector).bind(this._options.updateEvent,function(){wym.update()})},WYMeditor.editor.prototype.ready=function(){return this._doc!==null},WYMeditor.editor.prototype.box=function(){return this._box},WYMeditor.editor.prototype.html=function(a){if(typeof a!="string")return jQuery(this._doc.body).html();jQuery(this._doc.body).html(a),this.update()},WYMeditor.editor.prototype.xhtml=function(){var a;return jQuery(this._doc.body).children(WYMeditor.BR).remove(),this.parser.parse(this.html())},WYMeditor.editor.prototype.exec=function(a){var b,c,d=this;switch(a){case WYMeditor.CREATE_LINK:b=this.container(),(b||this._selected_image)&&this.dialog(WYMeditor.DIALOG_LINK);break;case WYMeditor.INSERT_IMAGE:this.dialog(WYMeditor.DIALOG_IMAGE);break;case WYMeditor.INSERT_TABLE:this.dialog(WYMeditor.DIALOG_TABLE);break;case WYMeditor.PASTE:this.dialog(WYMeditor.DIALOG_PASTE);break;case WYMeditor.TOGGLE_HTML:this.update(),this.toggleHtml();break;case WYMeditor.PREVIEW:this.dialog(WYMeditor.PREVIEW,this._options.dialogFeaturesPreview);break;case WYMeditor.INSERT_ORDEREDLIST:this.insertOrderedlist();break;case WYMeditor.INSERT_UNORDEREDLIST:this.insertUnorderedlist();break;case WYMeditor.INDENT:this.indent();break;case WYMeditor.OUTDENT:this.outdent();break;default:c=!1,jQuery.each(this._options.customCommands,function(){if(a===this.name)return c=!0,this.run.apply(d),!1}),c||this._exec(a)}},WYMeditor.editor.prototype.selection=function(){window.rangy&&!rangy.initialized&&rangy.init();var a=this._iframe,b=rangy.getIframeSelection(a);return b},WYMeditor.editor.prototype.selected=function(){var a=this.selection(),b=a.focusNode;return b?b.nodeName==="#text"?b.parentNode:b:null},WYMeditor.editor.prototype.selection_collapsed=function(){var a=this.selection(),b=!1;return $.each(a.getAllRanges(),function(){if(this.collapsed)return b=!0,!1}),b},WYMeditor.editor.prototype.selected_contains=function(a){var b=this.selection(),c=[];return $.each(b.getAllRanges(),function(){$.each(this.getNodes(),function(){$(this).is(a)&&c.push(this)})}),c},WYMeditor.editor.prototype.selected_parents_contains=function(a){var b=$([]),c=$(this.selected());return c.is(a)&&(b=b.add(c)),b=b.add(c.parents(a)),b},WYMeditor.editor.prototype.container=function(a){if(typeof a=="undefined")return this.selected();var b=null,c=null,d=null,e,f,g,h=null,i;if(a.toLowerCase()===WYMeditor.TH){b=this.container();switch(b.tagName.toLowerCase()){case WYMeditor.TD:case WYMeditor.TH:break;default:c=[WYMeditor.TD,WYMeditor.TH],b=this.findUp(this.container(),c)}b!==null&&(a=WYMeditor.TD,b.tagName.toLowerCase()===WYMeditor.TD&&(a=WYMeditor.TH),this.switchTo(b,a),this.update())}else{c=[WYMeditor.P,WYMeditor.H1,WYMeditor.H2,WYMeditor.H3,WYMeditor.H4,WYMeditor.H5,WYMeditor.H6,WYMeditor.PRE,WYMeditor.BLOCKQUOTE],b=this.findUp(this.container(),c);if(b){if(a.toLowerCase()===WYMeditor.BLOCKQUOTE){e=this.findUp(this.container(),WYMeditor.BLOCKQUOTE);if(e===null)d=this._doc.createElement(a),b.parentNode.insertBefore(d,b),d.appendChild(b),this.setFocusToNode(d.firstChild);else{f=e.childNodes,g=f.length,g>0&&(h=f.item(0));for(i=0;i<g;i+=1)e.parentNode.insertBefore(f.item(0),e);e.parentNode.removeChild(e),h&&this.setFocusToNode(h)}}else this.switchTo(b,a);this.update()}}return!1},WYMeditor.editor.prototype.toggleClass=function(a,b){var c=null;this._selected_image?c=this._selected_image:c=jQuery(this.selected()),c=jQuery(c).parentsOrSelf(b),jQuery(c).toggleClass(a),jQuery(c).attr(WYMeditor.CLASS)||jQuery(c).removeAttr(this._class)},WYMeditor.editor.prototype.findUp=function(a,b){if(typeof a=="undefined"||a===null)return null;a.nodeName==="#text"&&(a=a.parentNode);var c=a.tagName.toLowerCase(),d,e;if(typeof b===WYMeditor.STRING)while(c!==b&&c!==WYMeditor.BODY)a=a.parentNode,c=a.tagName.toLowerCase();else{d=!1;while(!d&&c!==WYMeditor.BODY){for(e=0;e<b.length;e+=1)if(c===b[e]){d=!0;break}if(!d){a=a.parentNode;if(a===null)return null;c=a.tagName.toLowerCase()}}}return c===WYMeditor.BODY?null:a},WYMeditor.editor.prototype.switchTo=function(a,b){var c=this._doc.createElement(b),d=jQuery(a).html();a.parentNode.replaceChild(c,a),jQuery(c).html(d),this.setFocusToNode(c)},WYMeditor.editor.prototype.replaceStrings=function(sVal){var key;if(!WYMeditor.STRINGS[this._options.lang])try{eval(jQuery.ajax({url:this._options.langPath+this._options.lang+".js",async:!1}).responseText)}catch(e){return WYMeditor.console.error("WYMeditor: error while parsing language file."),sVal}for(key in WYMeditor.STRINGS[this._options.lang])WYMeditor.STRINGS[this._options.lang].hasOwnProperty(key)&&(sVal=WYMeditor.Helper.replaceAll(sVal,this._options.stringDelimiterLeft+key+this._options.stringDelimiterRight,WYMeditor.STRINGS[this._options.lang][key]));return sVal},WYMeditor.editor.prototype.encloseString=function(a){return this._options.stringDelimiterLeft+a+this._options.stringDelimiterRight},WYMeditor.editor.prototype.status=function(a){jQuery(this._box).find(this._options.statusSelector).html(a)},WYMeditor.editor.prototype.update=function(){var a;jQuery(this._doc.body).children(WYMeditor.BR).remove(),a=this.xhtml(),jQuery(this._element).val(a),jQuery(this._box).find(this._options.htmlValSelector).not(".hasfocus").val(a),this.fixBodyHtml()},WYMeditor.editor.prototype.fixBodyHtml=function(){this.fixDoubleBr(),this.spaceBlockingElements()},WYMeditor.editor.prototype.spaceBlockingElements=function(){var a=WYMeditor.BLOCKING_ELEMENTS.join(", "),b=$(this._doc).find("body.wym_iframe"),c=b.children(),d='<br _moz_editor_bogus_node="TRUE" _moz_dirty="">',e,f,g;c.length>0&&(e=$(c[0]),f=$(c[c.length-1]),e.is(a)&&e.before(d),f.is(a)&&f.after(d)),g=this._getBlockSepSelector(),b.find(g).before(d)},WYMeditor.editor.prototype._getBlockSepSelector=function(){if(typeof this._blockSpacersSel!="undefined")return this._blockSpacersSel;var a=[];return $.each(WYMeditor.BLOCKING_ELEMENTS,function(b,c){$.each(WYMeditor.BLOCKING_ELEMENTS,function(b,d){a.push(c+" + "+d)})}),$.each(WYMeditor.BLOCKING_ELEMENTS,function(b,c){$.each(WYMeditor.NON_BLOCKING_ELEMENTS,function(b,d){a.push(c+" + "+d),a.push(d+" + "+c)})}),this._blockSpacersSel=a.join(", "),this._blockSpacersSel},WYMeditor.editor.prototype.fixDoubleBr=function(){var a=$(this._doc).find("body.wym_iframe"),b;a.children("br + br").filter(":not(pre br)").remove(),a.find("p + br").next("p").prev("br").remove(),b=a.find("p + br").slice(-1),b.length>0&&b.next().length===0&&b.remove()},WYMeditor.editor.prototype.dialog=function(a,b,c){var d=b||this._wym._options.dialogFeatures,e=window.open("","dialog",d),f,g=WYMeditor.Helper,h,i;if(e){f="";switch(a){case WYMeditor.DIALOG_LINK:f=this._options.dialogLinkHtml;break;case WYMeditor.DIALOG_IMAGE:f=this._options.dialogImageHtml;break;case WYMeditor.DIALOG_TABLE:f=this._options.dialogTableHtml;break;case WYMeditor.DIALOG_PASTE:f=this._options.dialogPasteHtml;break;case WYMeditor.PREVIEW:f=this._options.dialogPreviewHtml;break;default:f=c}h=this._options.dialogHtml,h=g.replaceAll(h,WYMeditor.BASE_PATH,this._options.basePath),h=g.replaceAll(h,WYMeditor.DIRECTION,this._options.direction),h=g.replaceAll(h,WYMeditor.CSS_PATH,this._options.skinPath+WYMeditor.SKINS_DEFAULT_CSS),h=g.replaceAll(h,WYMeditor.WYM_PATH,this._options.wymPath),h=g.replaceAll(h,WYMeditor.JQUERY_PATH,this._options.jQueryPath),h=g.replaceAll(h,WYMeditor.DIALOG_TITLE,this.encloseString(a)),h=g.replaceAll(h,WYMeditor.DIALOG_BODY,f),h=g.replaceAll(h,WYMeditor.INDEX,this._index),h=this.replaceStrings(h),i=e.document,i.write(h),i.close()}},WYMeditor.editor.prototype.toggleHtml=function(){jQuery(this._box).find(this._options.htmlSelector).toggle()},WYMeditor.editor.prototype.uniqueStamp=function(){var a=new Date;return"wym-"+a.getTime()},WYMeditor.editor.prototype._handleMultilineBlockContainerPaste=function(a,b,c,d){var e,f,g,h,i,j,k,l,m,n;$insertAfter=$(m),f="p",b.is("li")&&(f="li"),c.splitBoundaries(),m=a.findUp(c.startContainer,["p","h1","h2","h3","h4","h5","h6","li"]),n=m.tagName,g=[],h=[],$(m).contents().each(function(a,b){i=c.compareNode(b),i===c.NODE_BEFORE||i===c.NODE_BEFORE_AND_AFTER&&c.startOffset===c.startContainer.length?g.push(b):h.push(b)});for(e=0;e<g.length;e++)$(g[e]).remove();for(e=0;e<h.length;e++)$(h[e]).remove();g.length>0&&$(m).prepend(g),h.length>0&&(j=$("<"+n+">"+"</"+n+">",a._doc),j.insertAfter($(m)),j.append(h)),k=d.splice(0,1)[0],l=k.split(WYMeditor.NEWLINE).join("<br />"),$(m).html($(m).html()+l),$insertAfter=$(m);for(e=0;e<d.length;e++)html="<"+f+">"+d[e].split(WYMeditor.NEWLINE).join("<br />")+"</"+f+">",$insertAfter=$(html,a._doc).insertAfter($insertAfter)},WYMeditor.editor.prototype.paste=function(a){var b=this.selected(),c,d="",e,f,g,h,i=!1,k,l,m,n,o;m=this,k=rangy.getIframeSelection(m._iframe),n=k.getRangeAt(0),c=$(b),n.collapse(!0),paragraphStrings=a.split(new RegExp(WYMeditor.NEWLINE+"{2,}","g")),paragraphStrings.length===1&&(i=!0);if(typeof b=="undefined"||b&&b.tagName.toLowerCase()===WYMeditor.BODY)if(i)e=jQuery("<p>"+paragraphStrings[0]+"</p>",this._doc).appendTo(this._doc.body);else{blockSplitter="p";for(g=paragraphStrings.length-1;g>=0;g-=1){d="<"+blockSplitter+">"+paragraphStrings[g].split(WYMeditor.NEWLINE).join("<br />")+"</"+blockSplitter+">",o=$(d,m._doc);for(j=o.length-1;j>=0;j--)n.insertNode(o[j])}}else if(i||c.is("pre"))l=this._doc.createTextNode(a),n.insertNode(l);else if(c.is("p,h1,h2,h3,h4,h5,h6,li"))m._handleMultilineBlockContainerPaste(m,c,n,paragraphStrings);else{textNodesToInsert=a.split(WYMeditor.NEWLINE);for(g=textNodesToInsert.length-1;g>=0;g-=1)l=this._doc.createTextNode(textNodesToInsert[g]),n.insertNode(l),g>0&&n.insertNode($("<br />",m._doc).get(0))}},WYMeditor.editor.prototype.insert=function(a){var b=this._iframe.contentWindow.getSelection(),c,d;b.focusNode!==null?(c=b.getRangeAt(0),d=c.createContextualFragment(a),c.deleteContents(),c.insertNode(d)):this.paste(a)},WYMeditor.editor.prototype.wrap=function(a,b){this.insert(a+this._iframe.contentWindow.getSelection().toString()+b)},WYMeditor.editor.prototype.unwrap=function(){this.insert(this._iframe.contentWindow.getSelection().toString())},WYMeditor.editor.prototype.setFocusToNode=function(a,b){var c=this._doc.createRange(),d=this._iframe.contentWindow.getSelection();b=b?0:1,c.selectNodeContents(a),d.addRange(c),d.collapse(a,b),this._iframe.contentWindow.focus()},WYMeditor.editor.prototype.addCssRules=function(a,b){var c=a.styleSheets[0],d,e;if(c)for(d=0;d<b.length;d+=1)e=b[d],e.name&&e.css&&this.addCssRule(c,e)},WYMeditor.editor.prototype.splitListItemContents=function(a){var b,c,d,e=!1,f={itemContents:[],sublistContents:[]};b=a.contents();for(c=0;c<b.length;c++)d=b.get(c),e||$(d).is("ol,ul")?(e=!0,f.sublistContents.push(d)):f.itemContents.push(d);return f},WYMeditor.editor.prototype.joinAdjacentLists=function(a,b){var c;if(typeof a=="undefined"||typeof b=="undefined")return;if(a.nextSibling!==b||a.tagName.toLowerCase()!==b.tagName.toLowerCase())return;c=$(b).contents(),c.unwrap(),c.detach(),$(a).append(c)},WYMeditor.editor.prototype._indentSingleItem=function(a){var b=this,c,d,e,f,g,h,i,j,k,l,m,n;c=$(a),d=c.parent()[0].tagName.toLowerCase(),g=b.splitListItemContents(c),i=$(g.sublistContents),h=$(g.itemContents),j=c.prev().filter("li"),j.length===0&&(e='<li class="spacer_li"></li>',c.before(e),j=c.prev()),k=j.contents().last().filter("ol,ul"),k.length>0?(k.append(c),i.detach(),j.append(i),l=i.first(),b.joinAdjacentLists(k.get(0),l.get(0))):(i.length>0?(i.detach(),j.append(i),k=i.first()):(f="<"+d+"></"+d+">",j.append(f),k=j.contents().last()),k.prepend(c)),c.next().is(".spacer_li")&&(m=c.next(".spacer_li"),n=m.contents(),n.detach(),c.append(n),m.remove())},WYMeditor.editor.prototype._outdentSingleItem=function(a){var b=this,c,d,e,f,g,h,i,j,k,l,m;c=$(a),d=c.parent()[0].tagName.toLowerCase();if(!c.parent().parent().is("ol,ul,li"))return;c.parent().parent().is("li")||(WYMeditor.console.log("Attempting to fix invalid list nesting before outdenting."),b.correctInvalidListNesting(a)),f=b.splitListItemContents(c),h=$(f.sublistContents),g=$(f.itemContents),i=c.parent().parent("li");if(i.length===0){WYMeditor.console.error("Invalid list. No parentLi found, so aborting outdent");return}j=c.parent(),k=c.nextAllContents(),l=j.nextAllContents(),c.detach(),i.after(c),h.length>0&&(e="<"+d+">"+'<li class="spacer_li"></li>'+"</"+d+">",c.append(e),m=c.children().last(),h.detach(),m.children("li").append(h)),k.length>0&&(typeof m=="undefined"&&(e="<"+d+"></"+d+">",c.append(e),m=c.children().last()),k.detach(),m.append(k)),l.length>0&&(l.detach(),c.contents().length>0&&c.contents().last()[0].nodeType===WYMeditor.NODE.TEXT&&l[0].nodeType===WYMeditor.NODE.TEXT&&c.append("<br />"),c.append(l)),j.contents().length===0&&j.remove(),i.contents().length===0&&i.remove()},WYMeditor.editor.prototype.correctInvalidListNesting=function(a){var b=a,c,d;if(!b)return;while(b.parentNode){c=b.parentNode;if(c.nodeType!==WYMeditor.NODE.ELEMENT)break;d=c.tagName.toLowerCase();if(d!=="ol"&&d!=="ul"&&d!=="li")break;b=c}if(!$(b).is("ol,ul")){WYMeditor.console.error("Can't correct invalid list nesting. No root list found");return}return this._correctInvalidListNesting(b)},WYMeditor.editor.prototype._correctInvalidListNesting=function(a){var b=a,c=a,d,e,f,g,h,i,j,k,l='<li class="spacer_li"></li>';while(c)if(c._wym_visited){c._wym_visited=!1;if(c===b)break;c.previousSibling?c=c.previousSibling:c=c.parentNode}else{if(c!==b&&!$(c).is("li")){h=c;while(h.parentNode){h=h.parentNode;if($(h).is("li"))break;if(h.nodeType!==WYMeditor.NODE.ELEMENT)break;g=h.tagName.toLowerCase();if(g==="ol"||g==="ul"){WYMeditor.console.log("Fixing orphaned list content"),i=[c],d=c,j=null;while(d.previousSibling){d=d.previousSibling;if($(d).is("li")){j=d;break}i.push(d)}i.reverse(),!j&&i.length===1&&$(c.nextSibling).is("li")&&(j=c.nextSibling),j||($(i[0]).before(l),j=$(i[0]).prev()[0]),k=$(j).contents().last(),k.length===1&&k[0].nodeType===WYMeditor.NODE.TEXT&&i[0].nodeType===WYMeditor.NODE.TEXT&&$(j).append("<br />"),$(j).append($(i));break}}}c.lastChild?(c._wym_visited=!0,c=c.lastChild):c.previousSibling?c=c.previousSibling:c=c.parentNode}},WYMeditor.editor.prototype.getCommonParentList=function(a){var b,c,d;return a=$(a).filter("li"),a.length===0?null:(b=a[0],c=$(b).parent("ol,ul"),c.length===0?null:(d=c[0],$(a).each(function(a,b){c=$(b).parent("ol,ul");if(c.length===0||c[0]!==d)return null}),d))},WYMeditor.editor.prototype._getSelectedListItems=function(a){var b=this,c,d,e,f=[],g=[],h,i,k,l,m;h=function(a){var b;if(rangy.dom.isCharacterDataNode(a))return a;try{b=d.containsNodeText(a)}catch(c){return!0}if(b===!0)return!0};for(c=0;c<a.rangeCount;c++){d=a.getRangeAt(c);if(d.collapsed===!0)e=b.findUp(d.startContainer,"li"),e&&(f=f.concat([e]));else{f=f.concat(d.getNodes([],h)),i=[];for(j=0;j<f.length;j++){k=f[j];if(!$(k).is("li,ol,ul"))while(k.parentNode){k=k.parentNode;if($(k).is("li")){i.push(k);break}}}for(j=0;j<i.length;j++)$.inArray(i[j],f)===-1&&f.push(i[j])}}for(c=0;c<f.length;c++)f[c].nodeType===WYMeditor.NODE.ELEMENT&&f[c].tagName.toLowerCase()===WYMeditor.LI&&g.push(f[c]);return g},WYMeditor.editor.prototype.indent=function(){var a=this._wym,b=rangy.getIframeSelection(this._iframe),c,d,e;e=function(){var b=a.selected(),c=a.findUp(b,["ol","ul","li"]);return a.correctInvalidListNesting(c),!0},a.restoreSelectionAfterManipulation(e),c=a._getSelectedListItems(b);if(c.length===0)return!1;d=a.getCommonParentList(c);if(d===null)return!1;e=function(){var b=!1;for(i=0;i<c.length;i++)a._indentSingleItem(c[i]),b=!0;return b},a.restoreSelectionAfterManipulation(e)},WYMeditor.editor.prototype.outdent=function(){var a=this._wym,b=rangy.getIframeSelection(this._iframe),c,d,e;e=function(){var b=a.selected(),c=a.findUp(b,["ol","ul","li"]);return a.correctInvalidListNesting(c),!0},a.restoreSelectionAfterManipulation(e),c=a._getSelectedListItems(b);if(c.length===0)return!1;d=a.getCommonParentList(c);if(d===null)return!1;e=function(){var b=!1;for(i=0;i<c.length;i++)a._outdentSingleItem(c[i]),b=!0;return b},a.restoreSelectionAfterManipulation(e)},WYMeditor.editor.prototype.restoreSelectionAfterManipulation=function(a){var b=rangy.getIframeSelection(this._iframe),c=rangy.saveSelection(rangy.dom.getIframeWindow(this._iframe));try{a()?rangy.restoreSelection(c):rangy.removeMarkers(c)}catch(d){WYMeditor.console.error("Error during manipulation"),WYMeditor.console.error(d),rangy.removeMarkers(c)}},WYMeditor.editor.prototype.insertOrderedlist=function(){var a=this,b;b=function(){return a._insertList("ol")},a.restoreSelectionAfterManipulation(b)},WYMeditor.editor.prototype.insertUnorderedlist=function(){var a=this,b;b=function(){return a._insertList("ul")},a.restoreSelectionAfterManipulation(b)},WYMeditor.editor.prototype._insertList=function(a){var b=this._wym,c=rangy.getIframeSelection(this._iframe),d,e,f,g;return d=b._getSelectedListItems(c),d.length!==0?(e=b.getCommonParentList(d),e?(this._changeListType(e,a),!0):!1):(f=this.selected(),g=this.findUp(f,WYMeditor.POTENTIAL_LIST_ELEMENTS),g?(this._convertToList(g,a),!0):!1)},WYMeditor.editor.prototype._changeListType=function(a,b){return WYMeditor.changeNodeType(a,b)},WYMeditor.editor.prototype._convertToList=function(a,b){var c=$(a),d,e;return d="<"+b+"><li></li></"+b+">",this.findUp(a,WYMeditor.MAIN_CONTAINERS)===a?(c.wrapInner(d),e=c.children(),e.unwrap(),e.get(0)):(c.wrapInner(d),e=c.children(),e.get(0))},WYMeditor.editor.prototype.insertTable=function(a,b,c,d){if(a<=0||b<=0)return;var e=this._doc.createElement(WYMeditor.TABLE),f=null,g=null,h,i,j,k;h=e.createCaption(),h.innerHTML=c;for(i=0;i<a;i+=1){f=e.insertRow(i);for(j=0;j<b;j+=1)f.insertCell(j)}return d!==""&&jQuery(e).attr("summary",d),k=jQuery(this.findUp(this.container(),WYMeditor.MAIN_CONTAINERS)).get(0),!k||!k.parentNode?jQuery(this._doc.body).append(e):jQuery(k).after(e),this.afterInsertTable(e),this.fixBodyHtml(),e},WYMeditor.editor.prototype.afterInsertTable=function(a){},WYMeditor.editor.prototype.configureEditorUsingRawCss=function(){var a=new WYMeditor.WymCssParser;this._options.stylesheet?a.parse(jQuery.ajax({url:this._options.stylesheet,async:!1}).responseText):a.parse(this._options.styles,!1),this._options.classesItems.length===0&&(this._options.classesItems=a.css_settings.classesItems),this._options.editorStyles.length===0&&(this._options.editorStyles=a.css_settings.editorStyles),this._options.dialogStyles.length===0&&(this._options.dialogStyles=a.css_settings.dialogStyles)},WYMeditor.editor.prototype.listen=function(){var a=this;jQuery(this._doc.body).bind("mousedown",function(b){a.mousedown(b)})},WYMeditor.editor.prototype.mousedown=function(a){this._selected_image=null,a.target.tagName.toLowerCase()===WYMeditor.IMG&&(this._selected_image=a.target)},WYMeditor.loadCss=function(a){var b=document.createElement("link"),c;b.rel="stylesheet",b.href=a,c=jQuery("head").get(0),c.appendChild(b)},WYMeditor.editor.prototype.loadSkin=function(){if(this._options.loadSkin&&!WYMeditor.SKINS[this._options.skin]){var found=!1,rExp=new RegExp(this._options.skin+"/"+WYMeditor.SKINS_DEFAULT_CSS+"$");jQuery("link").each(function(){this.href.match(rExp)&&(found=!0)}),found||WYMeditor.loadCss(this._options.skinPath+WYMeditor.SKINS_DEFAULT_CSS)}jQuery(this._box).addClass("wym_skin_"+this._options.skin),this._options.initSkin&&!WYMeditor.SKINS[this._options.skin]&&eval(jQuery.ajax({url:this._options.skinPath+WYMeditor.SKINS_DEFAULT_JS,async:!1}).responseText),WYMeditor.SKINS[this._options.skin]&&WYMeditor.SKINS[this._options.skin].init&&WYMeditor.SKINS[this._options.skin].init(this)},WYMeditor.WymClassExplorer=function(a){this._wym=a,this._class="className"},WYMeditor.WymClassExplorer.PLACEHOLDER_NODE="<br>",WYMeditor.WymClassExplorer.prototype.initIframe=function(iframe){this._iframe=iframe,this._doc=iframe.contentWindow.document;var styles=this._doc.styleSheets[0],aCss=eval(this._options.editorStyles);this.addCssRules(this._doc,aCss),this._doc.title=this._wym._index,jQuery("html",this._doc).attr("dir",this._options.direction),jQuery(this._doc.body).html(this._wym._html);var wym=this;this._doc.body.onfocus=function(){wym._doc.designMode="on",wym._doc=iframe.contentWindow.document},this._doc.onbeforedeactivate=function(){wym.saveCaret()},$(this._doc).bind("keyup",wym.keyup);var ieVersion=parseInt($.browser.version,10);ieVersion>=8&&ieVersion<9&&$(this._doc).bind("keydown",function(){wym.fixBluescreenOfDeath()}),this._doc.onkeyup=function(){wym.saveCaret()},this._doc.onclick=function(){wym.saveCaret()},this._doc.body.onbeforepaste=function(){wym._iframe.contentWindow.event.returnValue=!1},this._doc.body.onpaste=function(){wym._iframe.contentWindow.event.returnValue=!1,wym.paste(window.clipboardData.getData("Text"))},this._initialized&&(jQuery.isFunction(this._options.preBind)&&this._options.preBind(this),this._wym.bindEvents(),jQuery.isFunction(this._options.postInit)&&this._options.postInit(this),this.listen()),this._initialized=!0,this._doc.designMode="on";try{this._doc=iframe.contentWindow.document}catch(e){}},function(a){WYMeditor.WymClassExplorer.prototype.loadSkin=function(){jQuery(this._box).find(this._options.containerSelector).attr("unselectable","on"),a.call(this)}}(WYMeditor.editor.prototype.loadSkin),WYMeditor.WymClassExplorer.prototype.fixBluescreenOfDeath=function(){var a=$(this._doc).find("p").eq(0).position();a!==null&&typeof a!="undefined"&&a.left<0&&($(this._box).append('<br id="wym-bluescreen-bug-fix" />'),$(this._box).find("#wym-bluescreen-bug-fix").remove())},WYMeditor.WymClassExplorer.prototype._exec=function(a,b){b?this._doc.execCommand(a,!1,b):this._doc.execCommand(a)},WYMeditor.WymClassExplorer.prototype.selected=function(){var a=this._iframe.contentWindow.document.caretPos;if(a&&a.parentElement)return a.parentElement()},WYMeditor.WymClassExplorer.prototype.saveCaret=function(){this._doc.caretPos=this._doc.selection.createRange()},WYMeditor.WymClassExplorer.prototype.addCssRule=function(a,b){var c=b.name.split(","),d;for(d=0;d<c.length;d++)a.addRule(c[d],b.css)},WYMeditor.WymClassExplorer.prototype.insert=function(a){var b=this._doc.selection.createRange();if(jQuery(b.parentElement()).parents().is(this._options.iframeBodySelector))try{b.pasteHTML(a)}catch(c){}else this.paste(a)},WYMeditor.WymClassExplorer.prototype.wrap=function(a,b){var c=this._doc.selection.createRange();if(jQuery(c.parentElement()).parents().is(this._options.iframeBodySelector))try{c.pasteHTML(a+c.text+b)}catch(d){}},WYMeditor.WymClassExplorer.prototype.unwrap=function(){var a=this._doc.selection.createRange();if(jQuery(a.parentElement()).parents().is(this._options.iframeBodySelector))try{var b=a.text;this._exec("Cut"),a.pasteHTML(b)}catch(c){}},WYMeditor.WymClassExplorer.prototype.keyup=function(a){var b=WYMeditor.INSTANCES[this.title];this._selected_image=null;var c=null;if(a.keyCode!==WYMeditor.KEY.BACKSPACE&&a.keyCode!==WYMeditor.KEY.CTRL&&a.keyCode!==WYMeditor.KEY.DELETE&&a.keyCode!==WYMeditor.KEY.COMMAND&&a.keyCode!==WYMeditor.KEY.UP&&a.keyCode!==WYMeditor.KEY.DOWN&&a.keyCode!==WYMeditor.KEY.ENTER&&!a.metaKey&&!a.ctrlKey){c=b.selected();var d="";c!==null&&(d=c.tagName.toLowerCase());if(d==="strong"||d==="b"||d==="em"||d==="i"||d==="sub"||d==="sup"||d==="a")d=c.parentNode.tagName.toLowerCase();d===WYMeditor.BODY&&(b._exec(WYMeditor.FORMAT_BLOCK,WYMeditor.P),b.fixBodyHtml())}(a.keyCode===WYMeditor.KEY.UP||a.keyCode===WYMeditor.KEY.DOWN||a.keyCode===WYMeditor.KEY.BACKSPACE||a.keyCode===WYMeditor.KEY.ENTER)&&b.fixBodyHtml()},WYMeditor.WymClassExplorer.prototype.setFocusToNode=function(a,b){var c=this._doc.selection.createRange();b=b?!0:!1,c.moveToElementText(a),c.collapse(b),c.select(),a.focus()},WYMeditor.WymClassExplorer.prototype.spaceBlockingElements=function(){var a=WYMeditor.BLOCKING_ELEMENTS.join(", "),b=$(this._doc).find("body.wym_iframe"),c=b.children(),d=WYMeditor.WymClassExplorer.PLACEHOLDER_NODE;if(c.length>0){var e=$(c[0]),f=$(c[c.length-1]);e.is(a)&&e.before(d),$.browser.version>="7.0"&&f.is(a)&&f.after(d)}var g=this._getBlockSepSelector();b.find(g).before(d)},WYMeditor.WymClassMozilla=function(a){this._wym=a,this._class="class"},WYMeditor.WymClassMozilla.CELL_PLACEHOLDER='<br _moz_dirty="">',WYMeditor.WymClassMozilla.NEEDS_CELL_FIX=$.browser.version>="1.9.1"&&$.browser.version<"2.0",WYMeditor.WymClassMozilla.prototype.initIframe=function(iframe){var wym=this,styles,aCss;this._iframe=iframe,this._doc=iframe.contentDocument,styles=this._doc.styleSheets[0],aCss=eval(this._options.editorStyles),this.addCssRules(this._doc,aCss),this._doc.title=this._wym._index,jQuery("html",this._doc).attr("dir",this._options.direction),this.html(this._wym._html),this.enableDesignMode(),jQuery.isFunction(this._options.preBind)&&this._options.preBind(this),this._wym.bindEvents(),jQuery(this._doc).bind("keydown",this.keydown),jQuery(this._doc).bind("keyup",this.keyup),jQuery(this._doc).bind("click",this.click),jQuery(this._doc).bind("focus",function(){wym.enableDesignMode.call(wym)}),jQuery.isFunction(this._options.postInit)&&this._options.postInit(this),this.listen()},WYMeditor.WymClassMozilla.prototype.html=function(a){if(typeof a!="string")return jQuery(this._doc.body).html();try{this._doc.designMode="off"}catch(b){}return a=a.replace(/<em(\b[^>]*)>/gi,"<i$1>"),a=a.replace(/<\/em>/gi,"</i>"),a=a.replace(/<strong(\b[^>]*)>/gi,"<b$1>"),a=a.replace(/<\/strong>/gi,"</b>"),jQuery(this._doc.body).html(a),this._wym.fixBodyHtml(),this.enableDesignMode(),!1},WYMeditor.WymClassMozilla.prototype._exec=function(a,b){if(!this.selected())return!1;b?this._doc.execCommand(a,"",b):this._doc.execCommand(a,"",null);var c=this.selected();return c.tagName.toLowerCase()===WYMeditor.BODY&&this._exec(WYMeditor.FORMAT_BLOCK,WYMeditor.P),!0},WYMeditor.WymClassMozilla.prototype.addCssRule=function(a,b){a.insertRule(b.name+" {"+b.css+"}",a.cssRules.length)},WYMeditor.WymClassMozilla.prototype.keydown=function(a){var b=WYMeditor.INSTANCES[this.title];if(a.ctrlKey){if(a.keyCode===66)return b._exec(WYMeditor.BOLD),!1;if(a.keyCode===73)return b._exec(WYMeditor.ITALIC),!1}return!0},WYMeditor.WymClassMozilla.prototype.keyup=function(a){var b=WYMeditor.INSTANCES[this.title],c,d;b._selected_image=null,c=null;if(a.keyCode!==WYMeditor.KEY.BACKSPACE&&a.keyCode!==WYMeditor.KEY.CTRL&&a.keyCode!==WYMeditor.KEY.DELETE&&a.keyCode!==WYMeditor.KEY.COMMAND&&a.keyCode!==WYMeditor.KEY.UP&&a.keyCode!==WYMeditor.KEY.DOWN&&a.keyCode!==WYMeditor.KEY.LEFT&&a.keyCode!==WYMeditor.KEY.RIGHT&&a.keyCode!==WYMeditor.KEY.ENTER&&!a.metaKey&&!a.ctrlKey){c=b.selected(),d=c.tagName.toLowerCase();if(d==="strong"||d==="b"||d==="em"||d==="i"||d==="sub"||d==="sup"||d==="a")d=c.parentNode.tagName.toLowerCase();d===WYMeditor.BODY&&(b._exec(WYMeditor.FORMAT_BLOCK,WYMeditor.P),b.fixBodyHtml())}(a.keyCode===WYMeditor.KEY.UP||a.keyCode===WYMeditor.KEY.DOWN||a.keyCode===WYMeditor.KEY.LEFT||a.keyCode===WYMeditor.KEY.RIGHT||a.keyCode===WYMeditor.KEY.BACKSPACE||a.keyCode===WYMeditor.KEY.ENTER)&&b.fixBodyHtml()},WYMeditor.WymClassMozilla.prototype.click=function(a){var b=WYMeditor.INSTANCES[this.title],c=b.selected(),d;WYMeditor.WymClassMozilla.NEEDS_CELL_FIX===!0&&c&&c.tagName.toLowerCase()===WYMeditor.TR&&jQuery(WYMeditor.TD,b._doc.body).append(WYMeditor.WymClassMozilla.CELL_PLACEHOLDER),c&&c.tagName.toLowerCase()===WYMeditor.BODY&&(d=b._iframe.contentWindow.getSelection(),d.isCollapsed===!0&&b._exec(WYMeditor.FORMAT_BLOCK,WYMeditor.P))},WYMeditor.WymClassMozilla.prototype.enableDesignMode=function(){if(this._doc.designMode==="off")try{this._doc.designMode="on",this._doc.execCommand("styleWithCSS","",!1),this._doc.execCommand("enableObjectResizing",!1,!0)}catch(a){}},WYMeditor.WymClassMozilla.prototype.openBlockTag=function(a,b){b=this.validator.getValidTagAttributes(a,b);if(a==="span"&&b.style){var c=this.getTagForStyle(b.style);c&&(a=c,this._tag_stack.pop(),this._tag_stack.push(a),b.style="")}this.output+=this.helper.tag(a,b,!0)},WYMeditor.WymClassMozilla.prototype.getTagForStyle=function(a){return/bold/.test(a)?"strong":/italic/.test(a)?"em":/sub/.test(a)?"sub":/super/.test(a)?"sup":!1},WYMeditor.WymClassMozilla.prototype.afterInsertTable=function(a){WYMeditor.WymClassMozilla.NEEDS_CELL_FIX===!0&&$(a).find("td").each(function(a,b){$(b).append(WYMeditor.WymClassMozilla.CELL_PLACEHOLDER)})},WYMeditor.WymClassOpera=function(a){this._wym=a,this._class="class"},WYMeditor.WymClassOpera.prototype.initIframe=function(iframe){this._iframe=iframe,this._doc=iframe.contentWindow.document;var styles=this._doc.styleSheets[0],aCss=eval(this._options.editorStyles);this.addCssRules(this._doc,aCss),this._doc.title=this._wym._index,jQuery("html",this._doc).attr("dir",this._options.direction),this._doc.designMode="on",this.html(this._wym._html),jQuery.isFunction(this._options.preBind)&&this._options.preBind(this),this._wym.bindEvents(),jQuery(this._doc).bind("keydown",this.keydown),jQuery(this._doc).bind("keyup",this.keyup),jQuery.isFunction(this._options.postInit)&&this._options.postInit(this),this.listen()},WYMeditor.WymClassOpera.prototype._exec=function(a,b){b?this._doc.execCommand(a,!1,b):this._doc.execCommand(a)},WYMeditor.WymClassOpera.prototype.selected=function(){var a=this._iframe.contentWindow.getSelection(),b=a.focusNode;return b?b.nodeName=="#text"?b.parentNode:b:null},WYMeditor.WymClassOpera.prototype.addCssRule=function(a,b){a.insertRule(b.name+" {"+b.css+"}",a.cssRules.length)},WYMeditor.WymClassOpera.prototype.keydown=function(a){var b=WYMeditor.INSTANCES[this.title],c=b._iframe.contentWindow.getSelection();startNode=c.getRangeAt(0).startContainer,!jQuery(startNode).parentsOrSelf(WYMeditor.MAIN_CONTAINERS.join(","))[0]&&!jQuery(startNode).parentsOrSelf("li")&&a.keyCode!=WYMeditor.KEY.ENTER&&a.keyCode!=WYMeditor.KEY.LEFT&&a.keyCode!=WYMeditor.KEY.UP&&a.keyCode!=WYMeditor.KEY.RIGHT&&a.keyCode!=WYMeditor.KEY.DOWN&&a.keyCode!=WYMeditor.KEY.BACKSPACE&&a.keyCode!=WYMeditor.KEY.DELETE&&b._exec(WYMeditor.FORMAT_BLOCK,WYMeditor.P)},WYMeditor.WymClassOpera.prototype.keyup=function(a){var b=WYMeditor.INSTANCES[this.title];b._selected_image=null},WYMeditor.WymClassSafari=function(a){this._wym=a,this._class="class"},WYMeditor.WymClassSafari.prototype.initIframe=function(iframe){var wym=this,styles,aCss;this._iframe=iframe,this._doc=iframe.contentDocument,styles=this._doc.styleSheets[0],aCss=eval(this._options.editorStyles),this.addCssRules(this._doc,aCss),this._doc.title=this._wym._index,jQuery("html",this._doc).attr("dir",this._options.direction),this._doc.designMode="on",this.html(this._wym._html),jQuery.isFunction(this._options.preBind)&&this._options.preBind(this),this._wym.bindEvents(),jQuery(this._doc).bind("keydown",this.keydown),jQuery(this._doc).bind("keyup",this.keyup),jQuery.isFunction(this._options.postInit)&&this._options.postInit(this),this.listen()},WYMeditor.WymClassSafari.prototype._exec=function(a,b){if(!this.selected())return!1;var c=this.selected(),d;return b?this._doc.execCommand(a,"",b):this._doc.execCommand(a,"",null),d=this.selected(),d&&d.tagName.toLowerCase()===WYMeditor.BODY&&this._exec(WYMeditor.FORMAT_BLOCK,WYMeditor.P),!0},WYMeditor.WymClassSafari.prototype.addCssRule=function(a,b){a.insertRule(b.name+" {"+b.css+"}",a.cssRules.length)},WYMeditor.WymClassSafari
33
+ .prototype.keydown=function(a){var b=WYMeditor.INSTANCES[this.title];a.ctrlKey?(a.keyCode===WYMeditor.KEY.B&&(b._exec(WYMeditor.BOLD),a.preventDefault()),a.keyCode===WYMeditor.KEY.I&&(b._exec(WYMeditor.ITALIC),a.preventDefault())):a.shiftKey&&a.keyCode===WYMeditor.KEY.ENTER&&(b._exec("InsertLineBreak"),a.preventDefault())},WYMeditor.WymClassSafari.prototype.keyup=function(a){var b=WYMeditor.INSTANCES[this.title],c,d;b._selected_image=null,$.browser.version<534.1&&a.keyCode===WYMeditor.KEY.ENTER&&a.shiftKey&&b._exec("InsertLineBreak");if(a.keyCode!==WYMeditor.KEY.BACKSPACE&&a.keyCode!==WYMeditor.KEY.CTRL&&a.keyCode!==WYMeditor.KEY.DELETE&&a.keyCode!==WYMeditor.KEY.COMMAND&&a.keyCode!==WYMeditor.KEY.UP&&a.keyCode!==WYMeditor.KEY.DOWN&&a.keyCode!==WYMeditor.KEY.LEFT&&a.keyCode!==WYMeditor.KEY.RIGHT&&a.keyCode!==WYMeditor.KEY.ENTER&&!a.metaKey&&!a.ctrlKey){c=b.selected(),d=c.tagName.toLowerCase();if(d==="strong"||d==="b"||d==="em"||d==="i"||d==="sub"||d==="sup"||d==="a"||d==="span")d=c.parentNode.tagName.toLowerCase();if(d===WYMeditor.BODY||d===WYMeditor.DIV)b._exec(WYMeditor.FORMAT_BLOCK,WYMeditor.P),b.fixBodyHtml()}(a.keyCode===WYMeditor.KEY.UP||a.keyCode===WYMeditor.KEY.DOWN||a.keyCode===WYMeditor.KEY.LEFT||a.keyCode===WYMeditor.KEY.RIGHT||a.keyCode===WYMeditor.KEY.BACKSPACE||a.keyCode===WYMeditor.KEY.ENTER)&&b.fixBodyHtml()},WYMeditor.WymClassSafari.prototype.openBlockTag=function(a,b){var c;b=this.validator.getValidTagAttributes(a,b),a==="span"&&b.style&&(c=this.getTagForStyle(b.style),c&&(a=c,this._tag_stack.pop(),this._tag_stack.push(a),b.style="",typeof b["class"]=="string"&&(b["class"]=b["class"].replace(/apple-style-span/gi,"")))),this.output+=this.helper.tag(a,b,!0)},WYMeditor.WymClassSafari.prototype.getTagForStyle=function(a){return/bold/.test(a)?"strong":/italic/.test(a)?"em":/sub/.test(a)?"sub":/super/.test(a)?"sup":!1},WYMeditor.XmlHelper=function(){return this._entitiesDiv=document.createElement("div"),this},WYMeditor.XmlHelper.prototype.tag=function(a,b,c){return b=b||!1,c=c||!1,"<"+a+(b?this.tagOptions(b):"")+(c?">":" />")},WYMeditor.XmlHelper.prototype.contentTag=function(a,b,c){return c=c||!1,"<"+a+(c?this.tagOptions(c):"")+">"+b+"</"+a+">"},WYMeditor.XmlHelper.prototype.cdataSection=function(a){return"<![CDATA["+a+"]]>"},WYMeditor.XmlHelper.prototype.escapeOnce=function(a){return this._fixDoubleEscape(this.escapeEntities(a))},WYMeditor.XmlHelper.prototype._fixDoubleEscape=function(a){return a.replace(/&amp;([a-z]+|(#\d+));/ig,"&$1;")},WYMeditor.XmlHelper.prototype.tagOptions=function(a){var b=this;b._formated_options="";for(var c in a){var d="",e=a[c];typeof e!="function"&&e.length>0&&(parseInt(c,10)==c&&typeof e=="object"&&(c=e.shift(),e=e.pop()),c!==""&&e!==""&&(b._formated_options+=" "+c+'="'+b.escapeOnce(e)+'"'))}return b._formated_options},WYMeditor.XmlHelper.prototype.escapeEntities=function(a,b){this._entitiesDiv.innerHTML=a,this._entitiesDiv.textContent=a;var c=this._entitiesDiv.innerHTML;return typeof b=="undefined"&&(b!==!1&&(c=c.replace('"',"&quot;")),b===!0&&(c=c.replace('"',"&#039;"))),c},WYMeditor.XmlHelper.prototype.parseAttributes=function(a){var b=[],c=a.split(/((=\s*")(")("))|((=\s*\')(\')(\'))|((=\s*[^>\s]*))/g);if(c.toString()!=a)for(var d in c){var e=c[d];if(typeof e!="function"&&e.length!==0){var f=new RegExp("(\\w+)\\s*"+e),g=a.match(f);if(g){var h=e.replace(/^[\s=]+/,""),i=h.charAt(0);i=i=='"'?'"':i=="'"?"'":"",i!==""&&(h=i=='"'?h.replace(/^"|"+$/g,""):h.replace(/^'|'+$/g,"")),a=a.replace(g[0],""),b.push([g[1],h])}}}return b},WYMeditor.XhtmlValidator={_attributes:{core:{except:["base","head","html","meta","param","script","style","title"],attributes:["class","id","style","title","accesskey","tabindex","/^data-.*/"]},language:{except:["base","br","hr","iframe","param","script"],attributes:{dir:["ltr","rtl"],0:"lang",1:"xml:lang"}},keyboard:{attributes:{accesskey:/^(\w){1}$/,tabindex:/^(\d)+$/}}},_events:{window:{only:["body"],attributes:["onload","onunload"]},form:{only:["form","input","textarea","select","a","label","button"],attributes:["onchange","onsubmit","onreset","onselect","onblur","onfocus"]},keyboard:{except:["base","bdo","br","frame","frameset","head","html","iframe","meta","param","script","style","title"],attributes:["onkeydown","onkeypress","onkeyup"]},mouse:{except:["base","bdo","br","head","html","meta","param","script","style","title"],attributes:["onclick","ondblclick","onmousedown","onmousemove","onmouseover","onmouseout","onmouseup"]}},_tags:{a:{attributes:{0:"charset",1:"coords",2:"href",3:"hreflang",4:"name",5:"rel",6:"rev",shape:/^(rect|rectangle|circ|circle|poly|polygon)$/,7:"type"}},0:"abbr",1:"acronym",2:"address",area:{attributes:{0:"alt",1:"coords",2:"href",nohref:/^(true|false)$/,shape:/^(rect|rectangle|circ|circle|poly|polygon)$/},required:["alt"]},3:"b",base:{attributes:["href"],required:["href"]},bdo:{attributes:{dir:/^(ltr|rtl)$/},required:["dir"]},4:"big",blockquote:{attributes:["cite"]},5:"body",6:"br",button:{attributes:{disabled:/^(disabled)$/,type:/^(button|reset|submit)$/,0:"value"},inside:"form"},7:"caption",8:"cite",9:"code",col:{attributes:{align:/^(right|left|center|justify)$/,0:"char",1:"charoff",span:/^(\d)+$/,valign:/^(top|middle|bottom|baseline)$/,2:"width"},inside:"colgroup"},colgroup:{attributes:{align:/^(right|left|center|justify)$/,0:"char",1:"charoff",span:/^(\d)+$/,valign:/^(top|middle|bottom|baseline)$/,2:"width"}},10:"dd",del:{attributes:{0:"cite",datetime:/^([0-9]){8}/}},11:"div",12:"dfn",13:"dl",14:"dt",15:"em",fieldset:{inside:"form"},form:{attributes:{0:"action",1:"accept",2:"accept-charset",3:"enctype",method:/^(get|post)$/},required:["action"]},head:{attributes:["profile"]},16:"h1",17:"h2",18:"h3",19:"h4",20:"h5",21:"h6",22:"hr",html:{attributes:["xmlns"]},23:"i",img:{attributes:["alt","src","height","ismap","longdesc","usemap","width"],required:["alt","src"]},input:{attributes:{0:"accept",1:"alt",checked:/^(checked)$/,disabled:/^(disabled)$/,maxlength:/^(\d)+$/,2:"name",readonly:/^(readonly)$/,size:/^(\d)+$/,3:"src",type:/^(button|checkbox|file|hidden|image|password|radio|reset|submit|text)$/,4:"value"},inside:"form"},ins:{attributes:{0:"cite",datetime:/^([0-9]){8}/}},24:"kbd",label:{attributes:["for"],inside:"form"},25:"legend",26:"li",link:{attributes:{0:"charset",1:"href",2:"hreflang",media:/^(all|braille|print|projection|screen|speech|,|;| )+$/i,rel:/^(alternate|appendix|bookmark|chapter|contents|copyright|glossary|help|home|index|next|prev|section|start|stylesheet|subsection| |shortcut|icon)+$/i,rev:/^(alternate|appendix|bookmark|chapter|contents|copyright|glossary|help|home|index|next|prev|section|start|stylesheet|subsection| |shortcut|icon)+$/i,3:"type"},inside:"head"},map:{attributes:["id","name"],required:["id"]},meta:{attributes:{0:"content","http-equiv":/^(content\-type|expires|refresh|set\-cookie)$/i,1:"name",2:"scheme"},required:["content"]},27:"noscript",object:{attributes:["archive","classid","codebase","codetype","data","declare","height","name","standby","type","usemap","width"]},28:"ol",optgroup:{attributes:{0:"label",disabled:/^(disabled)$/},required:["label"]},option:{attributes:{0:"label",disabled:/^(disabled)$/,selected:/^(selected)$/,1:"value"},inside:"select"},29:"p",param:{attributes:{0:"type",valuetype:/^(data|ref|object)$/,1:"valuetype",2:"value"},required:["name"]},30:"pre",q:{attributes:["cite"]},31:"samp",script:{attributes:{type:/^(text\/ecmascript|text\/javascript|text\/jscript|text\/vbscript|text\/vbs|text\/xml)$/,0:"charset",defer:/^(defer)$/,1:"src"},required:["type"]},select:{attributes:{disabled:/^(disabled)$/,multiple:/^(multiple)$/,0:"name",1:"size"},inside:"form"},32:"small",33:"span",34:"strong",style:{attributes:{0:"type",media:/^(screen|tty|tv|projection|handheld|print|braille|aural|all)$/},required:["type"]},35:"sub",36:"sup",table:{attributes:{0:"border",1:"cellpadding",2:"cellspacing",frame:/^(void|above|below|hsides|lhs|rhs|vsides|box|border)$/,rules:/^(none|groups|rows|cols|all)$/,3:"summary",4:"width"}},tbody:{attributes:{align:/^(right|left|center|justify)$/,0:"char",1:"charoff",valign:/^(top|middle|bottom|baseline)$/}},td:{attributes:{0:"abbr",align:/^(left|right|center|justify|char)$/,1:"axis",2:"char",3:"charoff",colspan:/^(\d)+$/,4:"headers",rowspan:/^(\d)+$/,scope:/^(col|colgroup|row|rowgroup)$/,valign:/^(top|middle|bottom|baseline)$/}},textarea:{attributes:["cols","rows","disabled","name","readonly"],required:["cols","rows"],inside:"form"},tfoot:{attributes:{align:/^(right|left|center|justify)$/,0:"char",1:"charoff",valign:/^(top|middle|bottom)$/,2:"baseline"}},th:{attributes:{0:"abbr",align:/^(left|right|center|justify|char)$/,1:"axis",2:"char",3:"charoff",colspan:/^(\d)+$/,4:"headers",rowspan:/^(\d)+$/,scope:/^(col|colgroup|row|rowgroup)$/,valign:/^(top|middle|bottom|baseline)$/}},thead:{attributes:{align:/^(right|left|center|justify)$/,0:"char",1:"charoff",valign:/^(top|middle|bottom|baseline)$/}},37:"title",tr:{attributes:{align:/^(right|left|center|justify|char)$/,0:"char",1:"charoff",valign:/^(top|middle|bottom|baseline)$/}},38:"tt",39:"ul",40:"var"},skiped_attributes:[],skiped_attribute_values:[],getValidTagAttributes:function(a,b){var c={},d=this.getPossibleTagAttributes(a);for(var e in b){var f=b[e];e=e.toLowerCase();var g=WYMeditor.Helper;!g.contains(this.skiped_attributes,e)&&!g.contains(this.skiped_attribute_values,f)&&(typeof f!="function"&&g.contains(d,e)?this.doesAttributeNeedsValidation(a,e)?this.validateAttribute(a,e,f)&&(c[e]=f):c[e]=f:jQuery.each(d,function(){this.match(/\/(.*)\//)&&(regex=new RegExp(this.match(/\/(.*)\//)[1]),regex.test(e)&&(c[e]=f))}))}return c},getUniqueAttributesAndEventsForTag:function(a){var b=[];if(this._tags[a]&&this._tags[a].attributes)for(var c in this._tags[a].attributes)b.push(parseInt(c,10)==c?this._tags[a].attributes[c]:c);return b},getDefaultAttributesAndEventsForTags:function(){var a=[];for(var b in this._events)a.push(this._events[b]);for(b in this._attributes)a.push(this._attributes[b]);return a},isValidTag:function(a){if(this._tags[a])return!0;for(var b in this._tags)if(this._tags[b]==a)return!0;return!1},getDefaultAttributesAndEventsForTag:function(a){var b=[];if(this.isValidTag(a)){var c=this.getDefaultAttributesAndEventsForTags();for(var d in c){var e=c[d];if(typeof e=="object"){var f=WYMeditor.Helper;if(e.except&&f.contains(e.except,a)||e.only&&!f.contains(e.only,a))continue;var g=e.attributes?e.attributes:e.events;for(var h in g)b.push(typeof g[h]!="string"?h:g[h])}}}return b},doesAttributeNeedsValidation:function(a,b){return this._tags[a]&&(this._tags[a].attributes&&this._tags[a].attributes[b]||this._tags[a].required&&WYMeditor.Helper.contains(this._tags[a].required,b))},validateAttribute:function(a,b,c){return this._tags[a]&&this._tags[a].attributes&&this._tags[a].attributes[b]&&c.length>0&&!c.match(this._tags[a].attributes[b])||this._tags[a]&&this._tags[a].required&&WYMeditor.Helper.contains(this._tags[a].required,b)&&c.length===0?!1:typeof this._tags[a]!="undefined"},getPossibleTagAttributes:function(a){return this._possible_tag_attributes||(this._possible_tag_attributes={}),this._possible_tag_attributes[a]||(this._possible_tag_attributes[a]=this.getUniqueAttributesAndEventsForTag(a).concat(this.getDefaultAttributesAndEventsForTag(a))),this._possible_tag_attributes[a]}},WYMeditor.ParallelRegex=function(a){return this._case=a,this._patterns=[],this._labels=[],this._regex=null,this},WYMeditor.ParallelRegex.prototype.addPattern=function(a,b){b=b||!0;var c=this._patterns.length;this._patterns[c]=a,this._labels[c]=b,this._regex=null},WYMeditor.ParallelRegex.prototype.match=function(a){if(this._patterns.length===0)return[!1,""];var b=a.match(this._getCompoundedRegex());if(!b)return[!1,""];var c=b[0];for(var d=1;d<b.length;d++)if(b[d])return[this._labels[d-1],c];return[!0,b[0]]},WYMeditor.ParallelRegex.prototype._getCompoundedRegex=function(){if(this._regex===null){for(var a=0,b=this._patterns.length;a<b;a++)this._patterns[a]="("+this._untokenizeRegex(this._tokenizeRegex(this._patterns[a]).replace(/([\/\(\)])/g,"\\$1"))+")";this._regex=new RegExp(this._patterns.join("|"),this._getPerlMatchingFlags())}return this._regex},WYMeditor.ParallelRegex.prototype._tokenizeRegex=function(a){return a.replace(/\(\?(i|m|s|x|U)\)/,"~~~~~~Tk1$1~~~~~~").replace(/\(\?(\-[i|m|s|x|U])\)/,"~~~~~~Tk2$1~~~~~~").replace(/\(\?\=(.*)\)/,"~~~~~~Tk3$1~~~~~~").replace(/\(\?\!(.*)\)/,"~~~~~~Tk4$1~~~~~~").replace(/\(\?\<\=(.*)\)/,"~~~~~~Tk5$1~~~~~~").replace(/\(\?\<\!(.*)\)/,"~~~~~~Tk6$1~~~~~~").replace(/\(\?\:(.*)\)/,"~~~~~~Tk7$1~~~~~~")},WYMeditor.ParallelRegex.prototype._untokenizeRegex=function(a){return a.replace(/~~~~~~Tk1(.{1})~~~~~~/,"(?$1)").replace(/~~~~~~Tk2(.{2})~~~~~~/,"(?$1)").replace(/~~~~~~Tk3(.*)~~~~~~/,"(?=$1)").replace(/~~~~~~Tk4(.*)~~~~~~/,"(?!$1)").replace(/~~~~~~Tk5(.*)~~~~~~/,"(?<=$1)").replace(/~~~~~~Tk6(.*)~~~~~~/,"(?<!$1)").replace(/~~~~~~Tk7(.*)~~~~~~/,"(?:$1)")},WYMeditor.ParallelRegex.prototype._getPerlMatchingFlags=function(){return this._case?"m":"mi"},WYMeditor.StateStack=function(a){return this._stack=[a],this},WYMeditor.StateStack.prototype.getCurrent=function(){return this._stack[this._stack.length-1]},WYMeditor.StateStack.prototype.enter=function(a){this._stack.push(a)},WYMeditor.StateStack.prototype.leave=function(){return this._stack.length==1?!1:(this._stack.pop(),!0)},WYMeditor.LEXER_ENTER=1,WYMeditor.LEXER_MATCHED=2,WYMeditor.LEXER_UNMATCHED=3,WYMeditor.LEXER_EXIT=4,WYMeditor.LEXER_SPECIAL=5,WYMeditor.Lexer=function(a,b,c){return b=b||"accept",this._case=c||!1,this._regexes={},this._parser=a,this._mode=new WYMeditor.StateStack(b),this._mode_handlers={},this._mode_handlers[b]=b,this},WYMeditor.Lexer.prototype.addPattern=function(a,b){b=b||"accept",typeof this._regexes[b]=="undefined"&&(this._regexes[b]=new WYMeditor.ParallelRegex(this._case)),this._regexes[b].addPattern(a),typeof this._mode_handlers[b]=="undefined"&&(this._mode_handlers[b]=b)},WYMeditor.Lexer.prototype.addEntryPattern=function(a,b,c){typeof this._regexes[b]=="undefined"&&(this._regexes[b]=new WYMeditor.ParallelRegex(this._case)),this._regexes[b].addPattern(a,c),typeof this._mode_handlers[c]=="undefined"&&(this._mode_handlers[c]=c)},WYMeditor.Lexer.prototype.addExitPattern=function(a,b){typeof this._regexes[b]=="undefined"&&(this._regexes[b]=new WYMeditor.ParallelRegex(this._case)),this._regexes[b].addPattern(a,"__exit"),typeof this._mode_handlers[b]=="undefined"&&(this._mode_handlers[b]=b)},WYMeditor.Lexer.prototype.addSpecialPattern=function(a,b,c){typeof this._regexes[b]=="undefined"&&(this._regexes[b]=new WYMeditor.ParallelRegex(this._case)),this._regexes[b].addPattern(a,"_"+c),typeof this._mode_handlers[c]=="undefined"&&(this._mode_handlers[c]=c)},WYMeditor.Lexer.prototype.mapHandler=function(a,b){this._mode_handlers[a]=b},WYMeditor.Lexer.prototype.parse=function(a){if(typeof this._parser=="undefined")return!1;var b=a.length,c;while(typeof (c=this._reduce(a))=="object"){a=c[0];var d=c[1],e=c[2],f=c[3];if(!this._dispatchTokens(d,e,f))return!1;if(a==="")return!0;if(a.length==b)return!1;b=a.length}return c?this._invokeParser(a,WYMeditor.LEXER_UNMATCHED):!1},WYMeditor.Lexer.prototype._dispatchTokens=function(a,b,c){return c=c||!1,this._invokeParser(a,WYMeditor.LEXER_UNMATCHED)?typeof c=="boolean"?this._invokeParser(b,WYMeditor.LEXER_MATCHED):this._isModeEnd(c)?this._invokeParser(b,WYMeditor.LEXER_EXIT)?this._mode.leave():!1:this._isSpecialMode(c)?(this._mode.enter(this._decodeSpecial(c)),this._invokeParser(b,WYMeditor.LEXER_SPECIAL)?this._mode.leave():!1):(this._mode.enter(c),this._invokeParser(b,WYMeditor.LEXER_ENTER)):!1},WYMeditor.Lexer.prototype._isModeEnd=function(a){return a==="__exit"},WYMeditor.Lexer.prototype._isSpecialMode=function(a){return a.substring(0,1)=="_"},WYMeditor.Lexer.prototype._decodeSpecial=function(a){return a.substring(1)},WYMeditor.Lexer.prototype._invokeParser=function(a,b){if(a==="")return!0;var c=this._mode.getCurrent(),d=this._mode_handlers[c],e=this._parser[d](a,b);return e},WYMeditor.Lexer.prototype._reduce=function(a){var b=this._regexes[this._mode.getCurrent()].match(a),c=b[1],d=b[0];if(d){var e=a.indexOf(c),f=a.substr(0,e);return a=a.substring(e+c.length),[a,f,c,d]}return!0},WYMeditor.XhtmlLexer=function(a){return jQuery.extend(this,new WYMeditor.Lexer(a,"Text")),this.mapHandler("Text","Text"),this.addTokens(),this.init(),this},WYMeditor.XhtmlLexer.prototype.init=function(){},WYMeditor.XhtmlLexer.prototype.addTokens=function(){this.addCommentTokens("Text"),this.addScriptTokens("Text"),this.addCssTokens("Text"),this.addTagTokens("Text")},WYMeditor.XhtmlLexer.prototype.addCommentTokens=function(a){this.addEntryPattern("<!--",a,"Comment"),this.addExitPattern("-->","Comment")},WYMeditor.XhtmlLexer.prototype.addScriptTokens=function(a){this.addEntryPattern("<script",a,"Script"),this.addExitPattern("</script>","Script")},WYMeditor.XhtmlLexer.prototype.addCssTokens=function(a){this.addEntryPattern("<style",a,"Css"),this.addExitPattern("</style>","Css")},WYMeditor.XhtmlLexer.prototype.addTagTokens=function(a){this.addSpecialPattern("<\\s*[a-z0-9:-]+\\s*>",a,"OpeningTag"),this.addEntryPattern("<[a-z0-9:-]+[\\/ \\>]+",a,"OpeningTag"),this.addInTagDeclarationTokens("OpeningTag"),this.addSpecialPattern("</\\s*[a-z0-9:-]+\\s*>",a,"ClosingTag")},WYMeditor.XhtmlLexer.prototype.addInTagDeclarationTokens=function(a){this.addSpecialPattern("\\s+",a,"Ignore"),this.addAttributeTokens(a),this.addExitPattern("/>",a),this.addExitPattern(">",a)},WYMeditor.XhtmlLexer.prototype.addAttributeTokens=function(a){this.addSpecialPattern("\\s*[a-z-_0-9]*:?[a-z-_0-9]+\\s*(?==)\\s*",a,"TagAttributes"),this.addEntryPattern('=\\s*"',a,"DoubleQuotedAttribute"),this.addPattern('\\\\"',"DoubleQuotedAttribute"),this.addExitPattern('"',"DoubleQuotedAttribute"),this.addEntryPattern("=\\s*'",a,"SingleQuotedAttribute"),this.addPattern("\\\\'","SingleQuotedAttribute"),this.addExitPattern("'","SingleQuotedAttribute"),this.addSpecialPattern("=\\s*[^>\\s]*",a,"UnquotedAttribute")},WYMeditor.XhtmlParser=function(a,b){return b=b||"Text",this._Lexer=new WYMeditor.XhtmlLexer(this),this._Listener=a,this._mode=b,this._matches=[],this._last_match="",this._current_match="",this},WYMeditor.XhtmlParser.prototype.parse=function(a){return this._Lexer.parse(this.beforeParsing(a)),this.afterParsing(this._Listener.getResult())},WYMeditor.XhtmlParser.prototype.beforeParsing=function(a){return(a.match(/class="MsoNormal"/)||a.match(/ns = "urn:schemas-microsoft-com/))&&this._Listener.avoidStylingTagsAndAttributes(),this._Listener.beforeParsing(a)},WYMeditor.XhtmlParser.prototype.afterParsing=function(a){return this._Listener._avoiding_tags_implicitly&&this._Listener.allowStylingTagsAndAttributes(),this._Listener.afterParsing(a)},WYMeditor.XhtmlParser.prototype.Ignore=function(a,b){return!0},WYMeditor.XhtmlParser.prototype.Text=function(a){return this._Listener.addContent(a),!0},WYMeditor.XhtmlParser.prototype.Comment=function(a,b){return this._addNonTagBlock(a,b,"addComment")},WYMeditor.XhtmlParser.prototype.Script=function(a,b){return this._addNonTagBlock(a,b,"addScript")},WYMeditor.XhtmlParser.prototype.Css=function(a,b){return this._addNonTagBlock(a,b,"addCss")},WYMeditor.XhtmlParser.prototype._addNonTagBlock=function(a,b,c){switch(b){case WYMeditor.LEXER_ENTER:this._non_tag=a;break;case WYMeditor.LEXER_UNMATCHED:this._non_tag+=a;break;case WYMeditor.LEXER_EXIT:switch(c){case"addComment":this._Listener.addComment(this._non_tag+a);break;case"addScript":this._Listener.addScript(this._non_tag+a);break;case"addCss":this._Listener.addCss(this._non_tag+a);break;default:}break;default:}return!0},WYMeditor.XhtmlParser.prototype.OpeningTag=function(a,b){switch(b){case WYMeditor.LEXER_ENTER:this._tag=this.normalizeTag(a),this._tag_attributes={};break;case WYMeditor.LEXER_SPECIAL:this._callOpenTagListener(this.normalizeTag(a));break;case WYMeditor.LEXER_EXIT:this._callOpenTagListener(this._tag,this._tag_attributes);break;default:}return!0},WYMeditor.XhtmlParser.prototype.ClosingTag=function(a,b){return this._callCloseTagListener(this.normalizeTag(a)),!0},WYMeditor.XhtmlParser.prototype._callOpenTagListener=function(a,b){b=b||{},this.autoCloseUnclosedBeforeNewOpening(a),this._Listener.isBlockTag(a)?(this._Listener._tag_stack.push(a),this._Listener.fixNestingBeforeOpeningBlockTag(a,b),this._Listener.openBlockTag(a,b),this._increaseOpenTagCounter(a)):this._Listener.isInlineTag(a)?this._Listener.inlineTag(a,b):(this._Listener.openUnknownTag(a,b),this._increaseOpenTagCounter(a)),this._Listener.last_tag=a,this._Listener.last_tag_opened=!0,this._Listener.last_tag_attributes=b},WYMeditor.XhtmlParser.prototype._callCloseTagListener=function(a){if(this._decreaseOpenTagCounter(a)){this.autoCloseUnclosedBeforeTagClosing(a);if(this._Listener.isBlockTag(a)){var b=this._Listener._tag_stack.pop();if(b===!1)return;b!=a&&(a=b),this._Listener.closeBlockTag(a)}else this._Listener.closeUnknownTag(a)}else this._Listener.closeUnopenedTag(a);this._Listener.last_tag=a,this._Listener.last_tag_opened=!1},WYMeditor.XhtmlParser.prototype._increaseOpenTagCounter=function(a){this._Listener._open_tags[a]=this._Listener._open_tags[a]||0,this._Listener._open_tags[a]++},WYMeditor.XhtmlParser.prototype._decreaseOpenTagCounter=function(a){return this._Listener._open_tags[a]?(this._Listener._open_tags[a]--,this._Listener._open_tags[a]===0&&(this._Listener._open_tags[a]=undefined),!0):!1},WYMeditor.XhtmlParser.prototype.autoCloseUnclosedBeforeNewOpening=function(a){this._autoCloseUnclosed(a,!1)},WYMeditor.XhtmlParser.prototype.autoCloseUnclosedBeforeTagClosing=function(a){this._autoCloseUnclosed(a,!0)},WYMeditor.XhtmlParser.prototype._autoCloseUnclosed=function(a,b){b=b||!1;if(this._Listener._open_tags)for(var c in this._Listener._open_tags){var d=this._Listener._open_tags[c];d>0&&this._Listener.shouldCloseTagAutomatically(c,a,b)&&this._callCloseTagListener(c,!0)}},WYMeditor.XhtmlParser.prototype.getTagReplacements=function(){return this._Listener.getTagReplacements()},WYMeditor.XhtmlParser.prototype.normalizeTag=function(a){a=a.replace(/^([\s<\/>]*)|([\s<\/>]*)$/gm,"").toLowerCase();var b=this._Listener.getTagReplacements();return b[a]?b[a]:a},WYMeditor.XhtmlParser.prototype.TagAttributes=function(a,b){return WYMeditor.LEXER_SPECIAL==b&&(this._current_attribute=a),!0},WYMeditor.XhtmlParser.prototype.DoubleQuotedAttribute=function(a,b){return WYMeditor.LEXER_UNMATCHED==b&&(this._tag_attributes[this._current_attribute]=a),!0},WYMeditor.XhtmlParser.prototype.SingleQuotedAttribute=function(a,b){return WYMeditor.LEXER_UNMATCHED==b&&(this._tag_attributes[this._current_attribute]=a),!0},WYMeditor.XhtmlParser.prototype.UnquotedAttribute=function(a,b){return this._tag_attributes[this._current_attribute]=a.replace(/^=/,""),!0},WYMeditor.XhtmlSaxListener=function(){return this.output="",this.helper=new WYMeditor.XmlHelper,this._open_tags={},this.validator=WYMeditor.XhtmlValidator,this._tag_stack=[],this.avoided_tags=[],this.entities={"&nbsp;":"&#160;","&iexcl;":"&#161;","&cent;":"&#162;","&pound;":"&#163;","&curren;":"&#164;","&yen;":"&#165;","&brvbar;":"&#166;","&sect;":"&#167;","&uml;":"&#168;","&copy;":"&#169;","&ordf;":"&#170;","&laquo;":"&#171;","&not;":"&#172;","&shy;":"&#173;","&reg;":"&#174;","&macr;":"&#175;","&deg;":"&#176;","&plusmn;":"&#177;","&sup2;":"&#178;","&sup3;":"&#179;","&acute;":"&#180;","&micro;":"&#181;","&para;":"&#182;","&middot;":"&#183;","&cedil;":"&#184;","&sup1;":"&#185;","&ordm;":"&#186;","&raquo;":"&#187;","&frac14;":"&#188;","&frac12;":"&#189;","&frac34;":"&#190;","&iquest;":"&#191;","&Agrave;":"&#192;","&Aacute;":"&#193;","&Acirc;":"&#194;","&Atilde;":"&#195;","&Auml;":"&#196;","&Aring;":"&#197;","&AElig;":"&#198;","&Ccedil;":"&#199;","&Egrave;":"&#200;","&Eacute;":"&#201;","&Ecirc;":"&#202;","&Euml;":"&#203;","&Igrave;":"&#204;","&Iacute;":"&#205;","&Icirc;":"&#206;","&Iuml;":"&#207;","&ETH;":"&#208;","&Ntilde;":"&#209;","&Ograve;":"&#210;","&Oacute;":"&#211;","&Ocirc;":"&#212;","&Otilde;":"&#213;","&Ouml;":"&#214;","&times;":"&#215;","&Oslash;":"&#216;","&Ugrave;":"&#217;","&Uacute;":"&#218;","&Ucirc;":"&#219;","&Uuml;":"&#220;","&Yacute;":"&#221;","&THORN;":"&#222;","&szlig;":"&#223;","&agrave;":"&#224;","&aacute;":"&#225;","&acirc;":"&#226;","&atilde;":"&#227;","&auml;":"&#228;","&aring;":"&#229;","&aelig;":"&#230;","&ccedil;":"&#231;","&egrave;":"&#232;","&eacute;":"&#233;","&ecirc;":"&#234;","&euml;":"&#235;","&igrave;":"&#236;","&iacute;":"&#237;","&icirc;":"&#238;","&iuml;":"&#239;","&eth;":"&#240;","&ntilde;":"&#241;","&ograve;":"&#242;","&oacute;":"&#243;","&ocirc;":"&#244;","&otilde;":"&#245;","&ouml;":"&#246;","&divide;":"&#247;","&oslash;":"&#248;","&ugrave;":"&#249;","&uacute;":"&#250;","&ucirc;":"&#251;","&uuml;":"&#252;","&yacute;":"&#253;","&thorn;":"&#254;","&yuml;":"&#255;","&OElig;":"&#338;","&oelig;":"&#339;","&Scaron;":"&#352;","&scaron;":"&#353;","&Yuml;":"&#376;","&fnof;":"&#402;","&circ;":"&#710;","&tilde;":"&#732;","&Alpha;":"&#913;","&Beta;":"&#914;","&Gamma;":"&#915;","&Delta;":"&#916;","&Epsilon;":"&#917;","&Zeta;":"&#918;","&Eta;":"&#919;","&Theta;":"&#920;","&Iota;":"&#921;","&Kappa;":"&#922;","&Lambda;":"&#923;","&Mu;":"&#924;","&Nu;":"&#925;","&Xi;":"&#926;","&Omicron;":"&#927;","&Pi;":"&#928;","&Rho;":"&#929;","&Sigma;":"&#931;","&Tau;":"&#932;","&Upsilon;":"&#933;","&Phi;":"&#934;","&Chi;":"&#935;","&Psi;":"&#936;","&Omega;":"&#937;","&alpha;":"&#945;","&beta;":"&#946;","&gamma;":"&#947;","&delta;":"&#948;","&epsilon;":"&#949;","&zeta;":"&#950;","&eta;":"&#951;","&theta;":"&#952;","&iota;":"&#953;","&kappa;":"&#954;","&lambda;":"&#955;","&mu;":"&#956;","&nu;":"&#957;","&xi;":"&#958;","&omicron;":"&#959;","&pi;":"&#960;","&rho;":"&#961;","&sigmaf;":"&#962;","&sigma;":"&#963;","&tau;":"&#964;","&upsilon;":"&#965;","&phi;":"&#966;","&chi;":"&#967;","&psi;":"&#968;","&omega;":"&#969;","&thetasym;":"&#977;","&upsih;":"&#978;","&piv;":"&#982;","&ensp;":"&#8194;","&emsp;":"&#8195;","&thinsp;":"&#8201;","&zwnj;":"&#8204;","&zwj;":"&#8205;","&lrm;":"&#8206;","&rlm;":"&#8207;","&ndash;":"&#8211;","&mdash;":"&#8212;","&lsquo;":"&#8216;","&rsquo;":"&#8217;","&sbquo;":"&#8218;","&ldquo;":"&#8220;","&rdquo;":"&#8221;","&bdquo;":"&#8222;","&dagger;":"&#8224;","&Dagger;":"&#8225;","&bull;":"&#8226;","&hellip;":"&#8230;","&permil;":"&#8240;","&prime;":"&#8242;","&Prime;":"&#8243;","&lsaquo;":"&#8249;","&rsaquo;":"&#8250;","&oline;":"&#8254;","&frasl;":"&#8260;","&euro;":"&#8364;","&image;":"&#8465;","&weierp;":"&#8472;","&real;":"&#8476;","&trade;":"&#8482;","&alefsym;":"&#8501;","&larr;":"&#8592;","&uarr;":"&#8593;","&rarr;":"&#8594;","&darr;":"&#8595;","&harr;":"&#8596;","&crarr;":"&#8629;","&lArr;":"&#8656;","&uArr;":"&#8657;","&rArr;":"&#8658;","&dArr;":"&#8659;","&hArr;":"&#8660;","&forall;":"&#8704;","&part;":"&#8706;","&exist;":"&#8707;","&empty;":"&#8709;","&nabla;":"&#8711;","&isin;":"&#8712;","&notin;":"&#8713;","&ni;":"&#8715;","&prod;":"&#8719;","&sum;":"&#8721;","&minus;":"&#8722;","&lowast;":"&#8727;","&radic;":"&#8730;","&prop;":"&#8733;","&infin;":"&#8734;","&ang;":"&#8736;","&and;":"&#8743;","&or;":"&#8744;","&cap;":"&#8745;","&cup;":"&#8746;","&int;":"&#8747;","&there4;":"&#8756;","&sim;":"&#8764;","&cong;":"&#8773;","&asymp;":"&#8776;","&ne;":"&#8800;","&equiv;":"&#8801;","&le;":"&#8804;","&ge;":"&#8805;","&sub;":"&#8834;","&sup;":"&#8835;","&nsub;":"&#8836;","&sube;":"&#8838;","&supe;":"&#8839;","&oplus;":"&#8853;","&otimes;":"&#8855;","&perp;":"&#8869;","&sdot;":"&#8901;","&lceil;":"&#8968;","&rceil;":"&#8969;","&lfloor;":"&#8970;","&rfloor;":"&#8971;","&lang;":"&#9001;","&rang;":"&#9002;","&loz;":"&#9674;","&spades;":"&#9824;","&clubs;":"&#9827;","&hearts;":"&#9829;","&diams;":"&#9830;"},this.block_tags=["a","abbr","acronym","address","area","b","base","bdo","big","blockquote","body","button","caption","cite","code","col","colgroup","dd","del","div","dfn","dl","dt","em","fieldset","form","head","h1","h2","h3","h4","h5","h6","html","i","ins","kbd","label","legend","li","map","noscript","object","ol","optgroup","option","p","param","pre","q","samp","script","select","small","span","strong","style","sub","sup","table","tbody","td","textarea","tfoot","th","thead","title","tr","tt","ul","var","extends"],this.inline_tags=["br","hr","img","input"],this},WYMeditor.XhtmlSaxListener.prototype.shouldCloseTagAutomatically=function(a,b,c){c=c||!1;if(a=="td"){if(c&&b=="tr"||!c&&b=="td")return!0}else if(a=="option")if(c&&b=="select"||!c&&b=="option")return!0;return!1},WYMeditor.XhtmlSaxListener.prototype.beforeParsing=function(a){return this.output="",a},WYMeditor.XhtmlSaxListener.prototype.afterParsing=function(a){return a=this.replaceNamedEntities(a),a=this.joinRepeatedEntities(a),a=this.removeEmptyTags(a),a=this.removeBrInPre(a),a},WYMeditor.XhtmlSaxListener.prototype.replaceNamedEntities=function(a){for(var b in this.entities)a=a.replace(new RegExp(b,"g"),this.entities[b]);return a},WYMeditor.XhtmlSaxListener.prototype.joinRepeatedEntities=function(a){var b="em|strong|sub|sup|acronym|pre|del|address";return a.replace(new RegExp("</("+b+")><\\1>",""),"").replace(new RegExp("(s*<("+b+")>s*){2}(.*)(s*</\\2>s*){2}",""),"<$2>$3<$2>")},WYMeditor.XhtmlSaxListener.prototype.removeEmptyTags=function(a){return a.replace(new RegExp("<("+this.block_tags.join("|").replace(/\|td/,"").replace(/\|th/,"")+")>(<br />|&#160;|&nbsp;|\\s)*</\\1>","g"),"")},WYMeditor.XhtmlSaxListener.prototype.removeBrInPre=function(a){var b=a.match(new RegExp("<pre[^>]*>(.*?)</pre>","gmi"));if(b)for(var c=0;c<b.length;c++)a=a.replace(b[c],b[c].replace(new RegExp("<br />","g"),String.fromCharCode(13,10)));return a},WYMeditor.XhtmlSaxListener.prototype.getResult=function(){return this.output},WYMeditor.XhtmlSaxListener.prototype.getTagReplacements=function(){return{b:"strong",i:"em"}},WYMeditor.XhtmlSaxListener.prototype.addContent=function(a){this.last_tag&&this.last_tag=="li"&&(a=a.replace(/\n/,""),a=a.replace(/\r/,"")),this.output+=a},WYMeditor.XhtmlSaxListener.prototype.addComment=function(a){this.remove_comments&&(this.output+=a)},WYMeditor.XhtmlSaxListener.prototype.addScript=function(a){this.remove_scripts||(this.output+=a)},WYMeditor.XhtmlSaxListener.prototype.addCss=function(a){this.remove_embeded_styles||(this.output+=a)},WYMeditor.XhtmlSaxListener.prototype.openBlockTag=function(a,b){this.output+=this.helper.tag(a,this.validator.getValidTagAttributes(a,b),!0)},WYMeditor.XhtmlSaxListener.prototype.inlineTag=function(a,b){this.output+=this.helper.tag(a,this.validator.getValidTagAttributes(a,b))},WYMeditor.XhtmlSaxListener.prototype.openUnknownTag=function(a,b){},WYMeditor.XhtmlSaxListener.prototype.closeBlockTag=function(a){this.output=this.output.replace(/<br \/>$/,"")+this._getClosingTagContent("before",a)+"</"+a+">"+this._getClosingTagContent("after",a)},WYMeditor.XhtmlSaxListener.prototype.closeUnknownTag=function(a){},WYMeditor.XhtmlSaxListener.prototype.closeUnopenedTag=function(a){this.output+="</"+a+">"},WYMeditor.XhtmlSaxListener.prototype.avoidStylingTagsAndAttributes=function(){this.avoided_tags=["div","span"],this.validator.skiped_attributes=["style"],this.validator.skiped_attribute_values=["MsoNormal","main1"],this._avoiding_tags_implicitly=!0},WYMeditor.XhtmlSaxListener.prototype.allowStylingTagsAndAttributes=function(){this.avoided_tags=[],this.validator.skiped_attributes=[],this.validator.skiped_attribute_values=[],this._avoiding_tags_implicitly=!1},WYMeditor.XhtmlSaxListener.prototype.isBlockTag=function(a){return!WYMeditor.Helper.contains(this.avoided_tags,a)&&WYMeditor.Helper.contains(this.block_tags,a)},WYMeditor.XhtmlSaxListener.prototype.isInlineTag=function(a){return!WYMeditor.Helper.contains(this.avoided_tags,a)&&WYMeditor.Helper.contains(this.inline_tags,a)},WYMeditor.XhtmlSaxListener.prototype.insertContentAfterClosingTag=function(a,b){this._insertContentWhenClosingTag("after",a,b)},WYMeditor.XhtmlSaxListener.prototype.insertContentBeforeClosingTag=function(a,b){this._insertContentWhenClosingTag("before",a,b)},WYMeditor.XhtmlSaxListener.prototype.fixNestingBeforeOpeningBlockTag=function(a,b){if((a=="ul"||a=="ol")&&this.last_tag&&!this.last_tag_opened&&this.last_tag=="li")this.output=this.output.replace(/<\/li>\s*$/,""),this.insertContentAfterClosingTag(a,"</li>");else if(a!="ul"&&a!="ol"||!this.last_tag||!this.last_tag_opened||this.last_tag!="ul"&&this.last_tag!="ol"){if(a=="li"&&!this.last_tag_opened&&this._tag_stack.length>=2){var c=this._tag_stack[this._tag_stack.length-2];c=="li"&&(this._open_tags.li--,this._open_tags.li===0&&(this._open_tags.li=undefined),this._tag_stack.pop(this._tag_stack.length-2),this.output+="</li>")}}else this.output+=this.helper.tag("li",{},!0),this.insertContentAfterClosingTag(a,"</li>")},WYMeditor.XhtmlSaxListener.prototype._insertContentWhenClosingTag=
34
+ function(a,b,c){this["_insert_"+a+"_closing"]||(this["_insert_"+a+"_closing"]=[]),this["_insert_"+a+"_closing"][b]||(this["_insert_"+a+"_closing"][b]=[]),this["_insert_"+a+"_closing"][b].push(c)},WYMeditor.XhtmlSaxListener.prototype._getClosingTagContent=function(a,b){return this["_insert_"+a+"_closing"]&&this["_insert_"+a+"_closing"][b]&&this["_insert_"+a+"_closing"][b].length>0?this["_insert_"+a+"_closing"][b].pop():""},WYMeditor.WymCssLexer=function(a,b){return b=typeof b=="undefined"?!0:b,jQuery.extend(this,new WYMeditor.Lexer(a,b?"Ignore":"WymCss")),this.mapHandler("WymCss","Ignore"),b===!0&&(this.addEntryPattern("/\\*[<\\s]*WYMeditor[>\\s]*\\*/","Ignore","WymCss"),this.addExitPattern("/\\*[</\\s]*WYMeditor[>\\s]*\\*/","WymCss")),this.addSpecialPattern("[\\sa-z1-6]*\\.[a-z-_0-9]+","WymCss","WymCssStyleDeclaration"),this.addEntryPattern("/\\*","WymCss","WymCssComment"),this.addExitPattern("\\*/","WymCssComment"),this.addEntryPattern("{","WymCss","WymCssStyle"),this.addExitPattern("}","WymCssStyle"),this.addEntryPattern("/\\*","WymCssStyle","WymCssFeedbackStyle"),this.addExitPattern("\\*/","WymCssFeedbackStyle"),this},WYMeditor.WymCssParser=function(){return this._in_style=!1,this._has_title=!1,this.only_wym_blocks=!0,this.css_settings={classesItems:[],editorStyles:[],dialogStyles:[]},this},WYMeditor.WymCssParser.prototype.parse=function(a,b){b=typeof b=="undefined"?this.only_wym_blocks:b,this._Lexer=new WYMeditor.WymCssLexer(this,b),this._Lexer.parse(a)},WYMeditor.WymCssParser.prototype.Ignore=function(a,b){return!0},WYMeditor.WymCssParser.prototype.WymCssComment=function(a,b){return a.match(/end[a-z0-9\s]*wym[a-z0-9\s]*/mi)?!1:(b==WYMeditor.LEXER_UNMATCHED&&(this._in_style?this._current_item[this._current_element]&&(this._current_item[this._current_element].expressions?this._current_item[this._current_element].expressions.push(a):this._current_item[this._current_element].expressions=[a]):(this._has_title=!0,this._current_item={title:WYMeditor.Helper.trim(a)}),this._in_style=!0),!0)},WYMeditor.WymCssParser.prototype.WymCssStyle=function(a,b){return b==WYMeditor.LEXER_UNMATCHED?(a=WYMeditor.Helper.trim(a),a!==""&&(this._current_item[this._current_element].style=a)):b==WYMeditor.LEXER_EXIT&&(this._in_style=!1,this._has_title=!1,this.addStyleSetting(this._current_item)),!0},WYMeditor.WymCssParser.prototype.WymCssFeedbackStyle=function(a,b){return b==WYMeditor.LEXER_UNMATCHED&&(this._current_item[this._current_element].feedback_style=a.replace(/^([\s\/\*]*)|([\s\/\*]*)$/gm,"")),!0},WYMeditor.WymCssParser.prototype.WymCssStyleDeclaration=function(a){a=a.replace(/^([\s\.]*)|([\s\.*]*)$/gm,"");var b="";if(a.indexOf(".")>0){var c=a.split(".");this._current_element=c[1],b=c[0]}else this._current_element=a;return this._has_title||(this._current_item={title:(b?b.toUpperCase()+": ":"")+this._current_element},this._has_title=!0),this._current_item[this._current_element]||(this._current_item[this._current_element]={name:this._current_element}),b&&(this._current_item[this._current_element].tags?this._current_item[this._current_element].tags.push(b):this._current_item[this._current_element].tags=[b]),!0},WYMeditor.WymCssParser.prototype.addStyleSetting=function(a){for(var b in a){var c=a[b];typeof c=="object"&&b!="title"&&(this.css_settings.classesItems.push({name:WYMeditor.Helper.trim(c.name),title:a.title,expr:WYMeditor.Helper.trim((c.expressions||c.tags).join(", "))}),c.feedback_style&&this.css_settings.editorStyles.push({name:"."+WYMeditor.Helper.trim(c.name),css:c.feedback_style}),c.style&&this.css_settings.dialogStyles.push({name:"."+WYMeditor.Helper.trim(c.name),css:c.style}))}};
@@ -0,0 +1,45 @@
1
+ WYMeditor.STRINGS.bg = {
2
+ Strong: 'Получер',
3
+ Emphasis: 'Курсив',
4
+ Superscript: 'Горен индекс',
5
+ Subscript: 'Долен индекс',
6
+ Ordered_List: 'Подреден списък',
7
+ Unordered_List: 'Неподреден списък',
8
+ Indent: 'Блок навътре',
9
+ Outdent: 'Блок навън',
10
+ Undo: 'Стъпка назад',
11
+ Redo: 'Стъпка напред',
12
+ Link: 'Създай хипервръзка',
13
+ Unlink: 'Премахни хипервръзката',
14
+ Image: 'Изображение',
15
+ Table: 'Таблица',
16
+ HTML: 'HTML',
17
+ Paragraph: 'Абзац',
18
+ Heading_1: 'Заглавие 1',
19
+ Heading_2: 'Заглавие 2',
20
+ Heading_3: 'Заглавие 3',
21
+ Heading_4: 'Заглавие 4',
22
+ Heading_5: 'Заглавие 5',
23
+ Heading_6: 'Заглавие 6',
24
+ Preformatted: 'Преформатиран',
25
+ Blockquote: 'Цитат',
26
+ Table_Header: 'Заглавие на таблицата',
27
+ URL: 'URL',
28
+ Title: 'Заглавие',
29
+ Alternative_Text: 'Алтернативен текст',
30
+ Caption: 'Етикет',
31
+ Summary: 'Общо',
32
+ Number_Of_Rows: 'Брой редове',
33
+ Number_Of_Cols: 'Брой колони',
34
+ Submit: 'Изпрати',
35
+ Cancel: 'Отмени',
36
+ Choose: 'Затвори',
37
+ Preview: 'Предварителен преглед',
38
+ Paste_From_Word: 'Вмъкни от MS WORD',
39
+ Tools: 'Инструменти',
40
+ Containers: 'Контейнери',
41
+ Classes: 'Класове',
42
+ Status: 'Статус',
43
+ Source_Code: 'Източник, код'
44
+ };
45
+
@@ -0,0 +1,45 @@
1
+ WYMeditor.STRINGS.ca = {
2
+ Strong: 'Ressaltar',
3
+ Emphasis: 'Emfatitzar',
4
+ Superscript: 'Superindex',
5
+ Subscript: 'Subindex',
6
+ Ordered_List: 'Llistat ordenat',
7
+ Unordered_List: 'Llistat sense ordenar',
8
+ Indent: 'Indentat',
9
+ Outdent: 'Sense indentar',
10
+ Undo: 'Desfer',
11
+ Redo: 'Refer',
12
+ Link: 'Enllaçar',
13
+ Unlink: 'Eliminar enllaç',
14
+ Image: 'Imatge',
15
+ Table: 'Taula',
16
+ HTML: 'HTML',
17
+ Paragraph: 'Paràgraf',
18
+ Heading_1: 'Capçalera 1',
19
+ Heading_2: 'Capçalera 2',
20
+ Heading_3: 'Capçalera 3',
21
+ Heading_4: 'Capçalera 4',
22
+ Heading_5: 'Capçalera 5',
23
+ Heading_6: 'Capçalera 6',
24
+ Preformatted: 'Pre-formatejat',
25
+ Blockquote: 'Cita',
26
+ Table_Header: 'Capçalera de la taula',
27
+ URL: 'URL',
28
+ Title: 'Títol',
29
+ Alternative_Text: 'Text alternatiu',
30
+ Caption: 'Llegenda',
31
+ Summary: 'Summary',
32
+ Number_Of_Rows: 'Nombre de files',
33
+ Number_Of_Cols: 'Nombre de columnes',
34
+ Submit: 'Enviar',
35
+ Cancel: 'Cancel·lar',
36
+ Choose: 'Triar',
37
+ Preview: 'Vista prèvia',
38
+ Paste_From_Word: 'Pegar des de Word',
39
+ Tools: 'Eines',
40
+ Containers: 'Contenidors',
41
+ Classes: 'Classes',
42
+ Status: 'Estat',
43
+ Source_Code: 'Codi font'
44
+ };
45
+
@@ -0,0 +1,45 @@
1
+ WYMeditor.STRINGS.cs = {
2
+ Strong: 'Tučné',
3
+ Emphasis: 'Kurzíva',
4
+ Superscript: 'Horní index',
5
+ Subscript: 'Dolní index',
6
+ Ordered_List: 'Číslovaný seznam',
7
+ Unordered_List: 'Nečíslovaný seznam',
8
+ Indent: 'Zvětšit odsazení',
9
+ Outdent: 'Zmenšit odsazení',
10
+ Undo: 'Zpět',
11
+ Redo: 'Znovu',
12
+ Link: 'Vytvořit odkaz',
13
+ Unlink: 'Zrušit odkaz',
14
+ Image: 'Obrázek',
15
+ Table: 'Tabulka',
16
+ HTML: 'HTML',
17
+ Paragraph: 'Odstavec',
18
+ Heading_1: 'Nadpis 1. úrovně',
19
+ Heading_2: 'Nadpis 2. úrovně',
20
+ Heading_3: 'Nadpis 3. úrovně',
21
+ Heading_4: 'Nadpis 4. úrovně',
22
+ Heading_5: 'Nadpis 5. úrovně',
23
+ Heading_6: 'Nadpis 6. úrovně',
24
+ Preformatted: 'Předformátovaný text',
25
+ Blockquote: 'Citace',
26
+ Table_Header: 'Hlavičková buňka tabulky',
27
+ URL: 'Adresa',
28
+ Title: 'Text po najetí myší',
29
+ Alternative_Text: 'Text pro případ nezobrazení obrázku',
30
+ Caption: 'Titulek tabulky',
31
+ Summary: 'Shrnutí obsahu',
32
+ Number_Of_Rows: 'Počet řádek',
33
+ Number_Of_Cols: 'Počet sloupců',
34
+ Submit: 'Vytvořit',
35
+ Cancel: 'Zrušit',
36
+ Choose: 'Vybrat',
37
+ Preview: 'Náhled',
38
+ Paste_From_Word: 'Vložit z Wordu',
39
+ Tools: 'Nástroje',
40
+ Containers: 'Typy obsahu',
41
+ Classes: 'Třídy',
42
+ Status: 'Stav',
43
+ Source_Code: 'Zdrojový kód'
44
+ };
45
+
@@ -0,0 +1,45 @@
1
+ WYMeditor.STRINGS.cy = {
2
+ Strong: 'Bras',
3
+ Emphasis: 'Italig',
4
+ Superscript: 'Uwchsgript',
5
+ Subscript: 'Is-sgript',
6
+ Ordered_List: 'Rhestr mewn Trefn',
7
+ Unordered_List: 'Pwyntiau Bwled',
8
+ Indent: 'Mewnoli',
9
+ Outdent: 'Alloli',
10
+ Undo: 'Dadwneud',
11
+ Redo: 'Ailwneud',
12
+ Link: 'Cysylltu',
13
+ Unlink: 'Datgysylltu',
14
+ Image: 'Delwedd',
15
+ Table: 'Tabl',
16
+ HTML: 'HTML',
17
+ Paragraph: 'Paragraff',
18
+ Heading_1: 'Pennawd 1',
19
+ Heading_2: 'Pennawd 2',
20
+ Heading_3: 'Pennawd 3',
21
+ Heading_4: 'Pennawd 4',
22
+ Heading_5: 'Pennawd 5',
23
+ Heading_6: 'Pennawd 6',
24
+ Preformatted: 'Rhagfformat',
25
+ Blockquote: 'Bloc Dyfyniad',
26
+ Table_Header: 'Pennyn Tabl',
27
+ URL: 'URL',
28
+ Title: 'Teitl',
29
+ Alternative_Text: 'Testun Amgen',
30
+ Caption: 'Pennawd',
31
+ Summary: 'Crynodeb',
32
+ Number_Of_Rows: 'Nifer y rhesi',
33
+ Number_Of_Cols: 'Nifer y colofnau',
34
+ Submit: 'Anfon',
35
+ Cancel: 'Diddymu',
36
+ Choose: 'Dewis',
37
+ Preview: 'Rhagolwg',
38
+ Paste_From_Word: 'Gludo o Word',
39
+ Tools: 'Offer',
40
+ Containers: 'Cynhwysyddion',
41
+ Classes: 'Dosbarthiadau',
42
+ Status: 'Statws',
43
+ Source_Code: 'Cod ffynhonnell'
44
+ };
45
+