/* automatically generated by JSCoverage - do not edit */
try {
  if (typeof top === 'object' && top !== null && typeof top.opener === 'object' && top.opener !== null) {
    // this is a browser window that was opened from another window

    if (! top.opener._$jscoverage) {
      top.opener._$jscoverage = {};
    }
  }
}
catch (e) {}

try {
  if (typeof top === 'object' && top !== null) {
    // this is a browser window

    try {
      if (typeof top.opener === 'object' && top.opener !== null && top.opener._$jscoverage) {
        top._$jscoverage = top.opener._$jscoverage;
      }
    }
    catch (e) {}

    if (! top._$jscoverage) {
      top._$jscoverage = {};
    }
  }
}
catch (e) {}

try {
  if (typeof top === 'object' && top !== null && top._$jscoverage) {
    _$jscoverage = top._$jscoverage;
  }
}
catch (e) {}
if (typeof _$jscoverage !== 'object') {
  _$jscoverage = {};
}
if (! _$jscoverage['ui/editorui.js']) {
  _$jscoverage['ui/editorui.js'] = [];
  _$jscoverage['ui/editorui.js'][4] = 0;
  _$jscoverage['ui/editorui.js'][5] = 0;
  _$jscoverage['ui/editorui.js'][6] = 0;
  _$jscoverage['ui/editorui.js'][7] = 0;
  _$jscoverage['ui/editorui.js'][8] = 0;
  _$jscoverage['ui/editorui.js'][10] = 0;
  _$jscoverage['ui/editorui.js'][11] = 0;
  _$jscoverage['ui/editorui.js'][12] = 0;
  _$jscoverage['ui/editorui.js'][14] = 0;
  _$jscoverage['ui/editorui.js'][15] = 0;
  _$jscoverage['ui/editorui.js'][16] = 0;
  _$jscoverage['ui/editorui.js'][17] = 0;
  _$jscoverage['ui/editorui.js'][18] = 0;
  _$jscoverage['ui/editorui.js'][20] = 0;
  _$jscoverage['ui/editorui.js'][21] = 0;
  _$jscoverage['ui/editorui.js'][23] = 0;
  _$jscoverage['ui/editorui.js'][31] = 0;
  _$jscoverage['ui/editorui.js'][34] = 0;
  _$jscoverage['ui/editorui.js'][60] = 0;
  _$jscoverage['ui/editorui.js'][68] = 0;
  _$jscoverage['ui/editorui.js'][69] = 0;
  _$jscoverage['ui/editorui.js'][70] = 0;
  _$jscoverage['ui/editorui.js'][71] = 0;
  _$jscoverage['ui/editorui.js'][72] = 0;
  _$jscoverage['ui/editorui.js'][76] = 0;
  _$jscoverage['ui/editorui.js'][81] = 0;
  _$jscoverage['ui/editorui.js'][82] = 0;
  _$jscoverage['ui/editorui.js'][83] = 0;
  _$jscoverage['ui/editorui.js'][84] = 0;
  _$jscoverage['ui/editorui.js'][85] = 0;
  _$jscoverage['ui/editorui.js'][86] = 0;
  _$jscoverage['ui/editorui.js'][88] = 0;
  _$jscoverage['ui/editorui.js'][89] = 0;
  _$jscoverage['ui/editorui.js'][90] = 0;
  _$jscoverage['ui/editorui.js'][94] = 0;
  _$jscoverage['ui/editorui.js'][100] = 0;
  _$jscoverage['ui/editorui.js'][101] = 0;
  _$jscoverage['ui/editorui.js'][106] = 0;
  _$jscoverage['ui/editorui.js'][107] = 0;
  _$jscoverage['ui/editorui.js'][111] = 0;
  _$jscoverage['ui/editorui.js'][112] = 0;
  _$jscoverage['ui/editorui.js'][113] = 0;
  _$jscoverage['ui/editorui.js'][115] = 0;
  _$jscoverage['ui/editorui.js'][119] = 0;
  _$jscoverage['ui/editorui.js'][125] = 0;
  _$jscoverage['ui/editorui.js'][127] = 0;
  _$jscoverage['ui/editorui.js'][128] = 0;
  _$jscoverage['ui/editorui.js'][129] = 0;
  _$jscoverage['ui/editorui.js'][130] = 0;
  _$jscoverage['ui/editorui.js'][131] = 0;
  _$jscoverage['ui/editorui.js'][136] = 0;
  _$jscoverage['ui/editorui.js'][139] = 0;
  _$jscoverage['ui/editorui.js'][140] = 0;
  _$jscoverage['ui/editorui.js'][141] = 0;
  _$jscoverage['ui/editorui.js'][142] = 0;
  _$jscoverage['ui/editorui.js'][144] = 0;
  _$jscoverage['ui/editorui.js'][152] = 0;
  _$jscoverage['ui/editorui.js'][153] = 0;
  _$jscoverage['ui/editorui.js'][154] = 0;
  _$jscoverage['ui/editorui.js'][155] = 0;
  _$jscoverage['ui/editorui.js'][161] = 0;
  _$jscoverage['ui/editorui.js'][164] = 0;
  _$jscoverage['ui/editorui.js'][165] = 0;
  _$jscoverage['ui/editorui.js'][166] = 0;
  _$jscoverage['ui/editorui.js'][169] = 0;
  _$jscoverage['ui/editorui.js'][172] = 0;
  _$jscoverage['ui/editorui.js'][173] = 0;
  _$jscoverage['ui/editorui.js'][174] = 0;
  _$jscoverage['ui/editorui.js'][176] = 0;
  _$jscoverage['ui/editorui.js'][182] = 0;
  _$jscoverage['ui/editorui.js'][189] = 0;
  _$jscoverage['ui/editorui.js'][190] = 0;
  _$jscoverage['ui/editorui.js'][191] = 0;
  _$jscoverage['ui/editorui.js'][193] = 0;
  _$jscoverage['ui/editorui.js'][194] = 0;
  _$jscoverage['ui/editorui.js'][196] = 0;
  _$jscoverage['ui/editorui.js'][197] = 0;
  _$jscoverage['ui/editorui.js'][198] = 0;
  _$jscoverage['ui/editorui.js'][199] = 0;
  _$jscoverage['ui/editorui.js'][201] = 0;
  _$jscoverage['ui/editorui.js'][203] = 0;
  _$jscoverage['ui/editorui.js'][204] = 0;
  _$jscoverage['ui/editorui.js'][218] = 0;
  _$jscoverage['ui/editorui.js'][226] = 0;
  _$jscoverage['ui/editorui.js'][232] = 0;
  _$jscoverage['ui/editorui.js'][235] = 0;
  _$jscoverage['ui/editorui.js'][239] = 0;
  _$jscoverage['ui/editorui.js'][240] = 0;
  _$jscoverage['ui/editorui.js'][242] = 0;
  _$jscoverage['ui/editorui.js'][243] = 0;
  _$jscoverage['ui/editorui.js'][244] = 0;
  _$jscoverage['ui/editorui.js'][245] = 0;
  _$jscoverage['ui/editorui.js'][247] = 0;
  _$jscoverage['ui/editorui.js'][249] = 0;
  _$jscoverage['ui/editorui.js'][250] = 0;
  _$jscoverage['ui/editorui.js'][251] = 0;
  _$jscoverage['ui/editorui.js'][254] = 0;
  _$jscoverage['ui/editorui.js'][256] = 0;
  _$jscoverage['ui/editorui.js'][257] = 0;
  _$jscoverage['ui/editorui.js'][264] = 0;
  _$jscoverage['ui/editorui.js'][265] = 0;
  _$jscoverage['ui/editorui.js'][267] = 0;
  _$jscoverage['ui/editorui.js'][268] = 0;
  _$jscoverage['ui/editorui.js'][270] = 0;
  _$jscoverage['ui/editorui.js'][271] = 0;
  _$jscoverage['ui/editorui.js'][272] = 0;
  _$jscoverage['ui/editorui.js'][273] = 0;
  _$jscoverage['ui/editorui.js'][278] = 0;
  _$jscoverage['ui/editorui.js'][285] = 0;
  _$jscoverage['ui/editorui.js'][286] = 0;
  _$jscoverage['ui/editorui.js'][287] = 0;
  _$jscoverage['ui/editorui.js'][291] = 0;
  _$jscoverage['ui/editorui.js'][296] = 0;
  _$jscoverage['ui/editorui.js'][297] = 0;
  _$jscoverage['ui/editorui.js'][298] = 0;
  _$jscoverage['ui/editorui.js'][299] = 0;
  _$jscoverage['ui/editorui.js'][310] = 0;
  _$jscoverage['ui/editorui.js'][318] = 0;
  _$jscoverage['ui/editorui.js'][324] = 0;
  _$jscoverage['ui/editorui.js'][325] = 0;
  _$jscoverage['ui/editorui.js'][327] = 0;
  _$jscoverage['ui/editorui.js'][328] = 0;
  _$jscoverage['ui/editorui.js'][330] = 0;
  _$jscoverage['ui/editorui.js'][333] = 0;
  _$jscoverage['ui/editorui.js'][334] = 0;
  _$jscoverage['ui/editorui.js'][335] = 0;
  _$jscoverage['ui/editorui.js'][337] = 0;
  _$jscoverage['ui/editorui.js'][338] = 0;
  _$jscoverage['ui/editorui.js'][339] = 0;
  _$jscoverage['ui/editorui.js'][344] = 0;
  _$jscoverage['ui/editorui.js'][349] = 0;
  _$jscoverage['ui/editorui.js'][353] = 0;
  _$jscoverage['ui/editorui.js'][356] = 0;
  _$jscoverage['ui/editorui.js'][362] = 0;
  _$jscoverage['ui/editorui.js'][363] = 0;
  _$jscoverage['ui/editorui.js'][364] = 0;
  _$jscoverage['ui/editorui.js'][365] = 0;
  _$jscoverage['ui/editorui.js'][369] = 0;
  _$jscoverage['ui/editorui.js'][372] = 0;
  _$jscoverage['ui/editorui.js'][373] = 0;
  _$jscoverage['ui/editorui.js'][374] = 0;
  _$jscoverage['ui/editorui.js'][375] = 0;
  _$jscoverage['ui/editorui.js'][376] = 0;
  _$jscoverage['ui/editorui.js'][377] = 0;
  _$jscoverage['ui/editorui.js'][379] = 0;
  _$jscoverage['ui/editorui.js'][380] = 0;
  _$jscoverage['ui/editorui.js'][381] = 0;
  _$jscoverage['ui/editorui.js'][382] = 0;
  _$jscoverage['ui/editorui.js'][383] = 0;
  _$jscoverage['ui/editorui.js'][386] = 0;
  _$jscoverage['ui/editorui.js'][387] = 0;
  _$jscoverage['ui/editorui.js'][393] = 0;
  _$jscoverage['ui/editorui.js'][395] = 0;
  _$jscoverage['ui/editorui.js'][397] = 0;
  _$jscoverage['ui/editorui.js'][398] = 0;
  _$jscoverage['ui/editorui.js'][399] = 0;
  _$jscoverage['ui/editorui.js'][400] = 0;
  _$jscoverage['ui/editorui.js'][401] = 0;
  _$jscoverage['ui/editorui.js'][402] = 0;
  _$jscoverage['ui/editorui.js'][403] = 0;
  _$jscoverage['ui/editorui.js'][408] = 0;
  _$jscoverage['ui/editorui.js'][414] = 0;
  _$jscoverage['ui/editorui.js'][418] = 0;
  _$jscoverage['ui/editorui.js'][421] = 0;
  _$jscoverage['ui/editorui.js'][427] = 0;
  _$jscoverage['ui/editorui.js'][428] = 0;
  _$jscoverage['ui/editorui.js'][429] = 0;
  _$jscoverage['ui/editorui.js'][430] = 0;
  _$jscoverage['ui/editorui.js'][434] = 0;
  _$jscoverage['ui/editorui.js'][437] = 0;
  _$jscoverage['ui/editorui.js'][438] = 0;
  _$jscoverage['ui/editorui.js'][439] = 0;
  _$jscoverage['ui/editorui.js'][440] = 0;
  _$jscoverage['ui/editorui.js'][441] = 0;
  _$jscoverage['ui/editorui.js'][442] = 0;
  _$jscoverage['ui/editorui.js'][444] = 0;
  _$jscoverage['ui/editorui.js'][445] = 0;
  _$jscoverage['ui/editorui.js'][447] = 0;
  _$jscoverage['ui/editorui.js'][448] = 0;
  _$jscoverage['ui/editorui.js'][454] = 0;
  _$jscoverage['ui/editorui.js'][457] = 0;
  _$jscoverage['ui/editorui.js'][458] = 0;
  _$jscoverage['ui/editorui.js'][459] = 0;
  _$jscoverage['ui/editorui.js'][460] = 0;
  _$jscoverage['ui/editorui.js'][461] = 0;
  _$jscoverage['ui/editorui.js'][462] = 0;
  _$jscoverage['ui/editorui.js'][463] = 0;
  _$jscoverage['ui/editorui.js'][464] = 0;
  _$jscoverage['ui/editorui.js'][469] = 0;
  _$jscoverage['ui/editorui.js'][474] = 0;
  _$jscoverage['ui/editorui.js'][480] = 0;
  _$jscoverage['ui/editorui.js'][483] = 0;
  _$jscoverage['ui/editorui.js'][487] = 0;
  _$jscoverage['ui/editorui.js'][488] = 0;
  _$jscoverage['ui/editorui.js'][489] = 0;
  _$jscoverage['ui/editorui.js'][490] = 0;
  _$jscoverage['ui/editorui.js'][491] = 0;
  _$jscoverage['ui/editorui.js'][492] = 0;
  _$jscoverage['ui/editorui.js'][494] = 0;
  _$jscoverage['ui/editorui.js'][495] = 0;
  _$jscoverage['ui/editorui.js'][500] = 0;
  _$jscoverage['ui/editorui.js'][503] = 0;
  _$jscoverage['ui/editorui.js'][504] = 0;
  _$jscoverage['ui/editorui.js'][505] = 0;
  _$jscoverage['ui/editorui.js'][506] = 0;
  _$jscoverage['ui/editorui.js'][507] = 0;
  _$jscoverage['ui/editorui.js'][508] = 0;
  _$jscoverage['ui/editorui.js'][509] = 0;
  _$jscoverage['ui/editorui.js'][514] = 0;
  _$jscoverage['ui/editorui.js'][518] = 0;
  _$jscoverage['ui/editorui.js'][525] = 0;
  _$jscoverage['ui/editorui.js'][528] = 0;
  _$jscoverage['ui/editorui.js'][531] = 0;
  _$jscoverage['ui/editorui.js'][532] = 0;
  _$jscoverage['ui/editorui.js'][533] = 0;
  _$jscoverage['ui/editorui.js'][534] = 0;
  _$jscoverage['ui/editorui.js'][535] = 0;
  _$jscoverage['ui/editorui.js'][536] = 0;
  _$jscoverage['ui/editorui.js'][538] = 0;
  _$jscoverage['ui/editorui.js'][539] = 0;
  _$jscoverage['ui/editorui.js'][540] = 0;
  _$jscoverage['ui/editorui.js'][541] = 0;
  _$jscoverage['ui/editorui.js'][542] = 0;
  _$jscoverage['ui/editorui.js'][544] = 0;
  _$jscoverage['ui/editorui.js'][550] = 0;
  _$jscoverage['ui/editorui.js'][555] = 0;
  _$jscoverage['ui/editorui.js'][556] = 0;
  _$jscoverage['ui/editorui.js'][558] = 0;
  _$jscoverage['ui/editorui.js'][559] = 0;
  _$jscoverage['ui/editorui.js'][560] = 0;
  _$jscoverage['ui/editorui.js'][561] = 0;
  _$jscoverage['ui/editorui.js'][562] = 0;
  _$jscoverage['ui/editorui.js'][563] = 0;
  _$jscoverage['ui/editorui.js'][564] = 0;
  _$jscoverage['ui/editorui.js'][565] = 0;
  _$jscoverage['ui/editorui.js'][566] = 0;
  _$jscoverage['ui/editorui.js'][567] = 0;
  _$jscoverage['ui/editorui.js'][572] = 0;
  _$jscoverage['ui/editorui.js'][580] = 0;
  _$jscoverage['ui/editorui.js'][587] = 0;
  _$jscoverage['ui/editorui.js'][590] = 0;
  _$jscoverage['ui/editorui.js'][593] = 0;
  _$jscoverage['ui/editorui.js'][594] = 0;
  _$jscoverage['ui/editorui.js'][595] = 0;
  _$jscoverage['ui/editorui.js'][598] = 0;
  _$jscoverage['ui/editorui.js'][601] = 0;
  _$jscoverage['ui/editorui.js'][602] = 0;
  _$jscoverage['ui/editorui.js'][603] = 0;
  _$jscoverage['ui/editorui.js'][604] = 0;
  _$jscoverage['ui/editorui.js'][605] = 0;
  _$jscoverage['ui/editorui.js'][606] = 0;
  _$jscoverage['ui/editorui.js'][608] = 0;
  _$jscoverage['ui/editorui.js'][609] = 0;
  _$jscoverage['ui/editorui.js'][610] = 0;
  _$jscoverage['ui/editorui.js'][611] = 0;
  _$jscoverage['ui/editorui.js'][612] = 0;
  _$jscoverage['ui/editorui.js'][614] = 0;
  _$jscoverage['ui/editorui.js'][620] = 0;
  _$jscoverage['ui/editorui.js'][622] = 0;
  _$jscoverage['ui/editorui.js'][623] = 0;
  _$jscoverage['ui/editorui.js'][624] = 0;
  _$jscoverage['ui/editorui.js'][629] = 0;
  _$jscoverage['ui/editorui.js'][632] = 0;
  _$jscoverage['ui/editorui.js'][635] = 0;
  _$jscoverage['ui/editorui.js'][636] = 0;
  _$jscoverage['ui/editorui.js'][637] = 0;
  _$jscoverage['ui/editorui.js'][639] = 0;
  _$jscoverage['ui/editorui.js'][642] = 0;
  _$jscoverage['ui/editorui.js'][643] = 0;
  _$jscoverage['ui/editorui.js'][644] = 0;
  _$jscoverage['ui/editorui.js'][645] = 0;
  _$jscoverage['ui/editorui.js'][646] = 0;
  _$jscoverage['ui/editorui.js'][652] = 0;
  _$jscoverage['ui/editorui.js'][656] = 0;
  _$jscoverage['ui/editorui.js'][662] = 0;
  _$jscoverage['ui/editorui.js'][663] = 0;
  _$jscoverage['ui/editorui.js'][666] = 0;
  _$jscoverage['ui/editorui.js'][667] = 0;
  _$jscoverage['ui/editorui.js'][668] = 0;
  _$jscoverage['ui/editorui.js'][669] = 0;
  _$jscoverage['ui/editorui.js'][670] = 0;
  _$jscoverage['ui/editorui.js'][672] = 0;
  _$jscoverage['ui/editorui.js'][673] = 0;
  _$jscoverage['ui/editorui.js'][674] = 0;
  _$jscoverage['ui/editorui.js'][675] = 0;
  _$jscoverage['ui/editorui.js'][678] = 0;
  _$jscoverage['ui/editorui.js'][681] = 0;
  _$jscoverage['ui/editorui.js'][682] = 0;
  _$jscoverage['ui/editorui.js'][683] = 0;
  _$jscoverage['ui/editorui.js'][684] = 0;
  _$jscoverage['ui/editorui.js'][685] = 0;
  _$jscoverage['ui/editorui.js'][686] = 0;
  _$jscoverage['ui/editorui.js'][687] = 0;
  _$jscoverage['ui/editorui.js'][688] = 0;
  _$jscoverage['ui/editorui.js'][693] = 0;
  _$jscoverage['ui/editorui.js'][697] = 0;
  _$jscoverage['ui/editorui.js'][703] = 0;
  _$jscoverage['ui/editorui.js'][704] = 0;
  _$jscoverage['ui/editorui.js'][707] = 0;
  _$jscoverage['ui/editorui.js'][708] = 0;
  _$jscoverage['ui/editorui.js'][709] = 0;
  _$jscoverage['ui/editorui.js'][710] = 0;
  _$jscoverage['ui/editorui.js'][711] = 0;
  _$jscoverage['ui/editorui.js'][713] = 0;
  _$jscoverage['ui/editorui.js'][714] = 0;
  _$jscoverage['ui/editorui.js'][715] = 0;
  _$jscoverage['ui/editorui.js'][716] = 0;
  _$jscoverage['ui/editorui.js'][719] = 0;
  _$jscoverage['ui/editorui.js'][724] = 0;
  _$jscoverage['ui/editorui.js'][725] = 0;
  _$jscoverage['ui/editorui.js'][726] = 0;
  _$jscoverage['ui/editorui.js'][727] = 0;
  _$jscoverage['ui/editorui.js'][728] = 0;
  _$jscoverage['ui/editorui.js'][730] = 0;
  _$jscoverage['ui/editorui.js'][732] = 0;
  _$jscoverage['ui/editorui.js'][733] = 0;
  _$jscoverage['ui/editorui.js'][740] = 0;
  _$jscoverage['ui/editorui.js'][746] = 0;
  _$jscoverage['ui/editorui.js'][747] = 0;
  _$jscoverage['ui/editorui.js'][750] = 0;
  _$jscoverage['ui/editorui.js'][751] = 0;
  _$jscoverage['ui/editorui.js'][752] = 0;
  _$jscoverage['ui/editorui.js'][753] = 0;
  _$jscoverage['ui/editorui.js'][754] = 0;
  _$jscoverage['ui/editorui.js'][756] = 0;
  _$jscoverage['ui/editorui.js'][757] = 0;
  _$jscoverage['ui/editorui.js'][758] = 0;
  _$jscoverage['ui/editorui.js'][759] = 0;
  _$jscoverage['ui/editorui.js'][762] = 0;
  _$jscoverage['ui/editorui.js'][767] = 0;
  _$jscoverage['ui/editorui.js'][768] = 0;
  _$jscoverage['ui/editorui.js'][769] = 0;
  _$jscoverage['ui/editorui.js'][774] = 0;
  _$jscoverage['ui/editorui.js'][775] = 0;
  _$jscoverage['ui/editorui.js'][777] = 0;
  _$jscoverage['ui/editorui.js'][780] = 0;
  _$jscoverage['ui/editorui.js'][781] = 0;
  _$jscoverage['ui/editorui.js'][782] = 0;
  _$jscoverage['ui/editorui.js'][783] = 0;
  _$jscoverage['ui/editorui.js'][784] = 0;
  _$jscoverage['ui/editorui.js'][786] = 0;
  _$jscoverage['ui/editorui.js'][790] = 0;
  _$jscoverage['ui/editorui.js'][791] = 0;
  _$jscoverage['ui/editorui.js'][792] = 0;
  _$jscoverage['ui/editorui.js'][798] = 0;
  _$jscoverage['ui/editorui.js'][800] = 0;
  _$jscoverage['ui/editorui.js'][801] = 0;
  _$jscoverage['ui/editorui.js'][803] = 0;
  _$jscoverage['ui/editorui.js'][806] = 0;
  _$jscoverage['ui/editorui.js'][807] = 0;
  _$jscoverage['ui/editorui.js'][812] = 0;
  _$jscoverage['ui/editorui.js'][815] = 0;
  _$jscoverage['ui/editorui.js'][816] = 0;
  _$jscoverage['ui/editorui.js'][817] = 0;
  _$jscoverage['ui/editorui.js'][819] = 0;
}
_$jscoverage['ui/editorui.js'].source = ["<span class=\"c\">//ui&#36319;&#32534;&#36753;&#22120;&#30340;&#36866;&#37197;&#23652;</span>","<span class=\"c\">//&#37027;&#20010;&#25353;&#38062;&#24377;&#20986;&#26159;dialog&#65292;&#26159;&#19979;&#25289;&#31568;&#31561;&#37117;&#26159;&#22312;&#36825;&#20010;js&#20013;&#37197;&#32622;</span>","<span class=\"c\">//&#33258;&#24049;&#20889;&#30340;ui&#20063;&#35201;&#22312;&#36825;&#37324;&#37197;&#32622;&#65292;&#25918;&#21040;baidu.editor.ui&#19979;&#36793;&#65292;&#24403;&#32534;&#36753;&#22120;&#23454;&#20363;&#21270;&#30340;&#26102;&#20505;&#20250;&#26681;&#25454;ueditor.config&#20013;&#30340;toolbars&#25214;&#21040;&#30456;&#24212;&#30340;&#36827;&#34892;&#23454;&#20363;&#21270;</span>","<span class=\"k\">(</span><span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","    <span class=\"k\">var</span> utils <span class=\"k\">=</span> baidu<span class=\"k\">.</span>editor<span class=\"k\">.</span>utils<span class=\"k\">;</span>","    <span class=\"k\">var</span> editorui <span class=\"k\">=</span> baidu<span class=\"k\">.</span>editor<span class=\"k\">.</span>ui<span class=\"k\">;</span>","    <span class=\"k\">var</span> _Dialog <span class=\"k\">=</span> editorui<span class=\"k\">.</span>Dialog<span class=\"k\">;</span>","    editorui<span class=\"k\">.</span>buttons <span class=\"k\">=</span> <span class=\"k\">{}</span><span class=\"k\">;</span>","","    editorui<span class=\"k\">.</span>Dialog <span class=\"k\">=</span> <span class=\"k\">function</span> <span class=\"k\">(</span>options<span class=\"k\">)</span> <span class=\"k\">{</span>","        <span class=\"k\">var</span> dialog <span class=\"k\">=</span> <span class=\"k\">new</span> _Dialog<span class=\"k\">(</span>options<span class=\"k\">);</span>","        dialog<span class=\"k\">.</span>addListener<span class=\"k\">(</span><span class=\"s\">'hide'</span><span class=\"k\">,</span> <span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","","            <span class=\"k\">if</span> <span class=\"k\">(</span>dialog<span class=\"k\">.</span>editor<span class=\"k\">)</span> <span class=\"k\">{</span>","                <span class=\"k\">var</span> editor <span class=\"k\">=</span> dialog<span class=\"k\">.</span>editor<span class=\"k\">;</span>","                <span class=\"k\">try</span> <span class=\"k\">{</span>","                    <span class=\"k\">if</span> <span class=\"k\">(</span>browser<span class=\"k\">.</span>gecko<span class=\"k\">)</span> <span class=\"k\">{</span>","                        <span class=\"k\">var</span> y <span class=\"k\">=</span> editor<span class=\"k\">.</span>window<span class=\"k\">.</span>scrollY<span class=\"k\">,</span>","                            x <span class=\"k\">=</span> editor<span class=\"k\">.</span>window<span class=\"k\">.</span>scrollX<span class=\"k\">;</span>","                        editor<span class=\"k\">.</span>body<span class=\"k\">.</span>focus<span class=\"k\">();</span>","                        editor<span class=\"k\">.</span>window<span class=\"k\">.</span>scrollTo<span class=\"k\">(</span>x<span class=\"k\">,</span> y<span class=\"k\">);</span>","                    <span class=\"k\">}</span> <span class=\"k\">else</span> <span class=\"k\">{</span>","                        editor<span class=\"k\">.</span>focus<span class=\"k\">();</span>","                    <span class=\"k\">}</span>","","","                <span class=\"k\">}</span> <span class=\"k\">catch</span> <span class=\"k\">(</span>ex<span class=\"k\">)</span> <span class=\"k\">{</span>","                <span class=\"k\">}</span>","            <span class=\"k\">}</span>","        <span class=\"k\">}</span><span class=\"k\">);</span>","        <span class=\"k\">return</span> dialog<span class=\"k\">;</span>","    <span class=\"k\">}</span><span class=\"k\">;</span>","","    <span class=\"k\">var</span> iframeUrlMap <span class=\"k\">=</span> <span class=\"k\">{</span>","        <span class=\"s\">'anchor'</span><span class=\"k\">:</span><span class=\"s\">'~/dialogs/anchor/anchor.html'</span><span class=\"k\">,</span>","        <span class=\"s\">'insertimage'</span><span class=\"k\">:</span><span class=\"s\">'~/dialogs/image/image.html'</span><span class=\"k\">,</span>","        <span class=\"s\">'link'</span><span class=\"k\">:</span><span class=\"s\">'~/dialogs/link/link.html'</span><span class=\"k\">,</span>","        <span class=\"s\">'spechars'</span><span class=\"k\">:</span><span class=\"s\">'~/dialogs/spechars/spechars.html'</span><span class=\"k\">,</span>","        <span class=\"s\">'searchreplace'</span><span class=\"k\">:</span><span class=\"s\">'~/dialogs/searchreplace/searchreplace.html'</span><span class=\"k\">,</span>","        <span class=\"s\">'map'</span><span class=\"k\">:</span><span class=\"s\">'~/dialogs/map/map.html'</span><span class=\"k\">,</span>","        <span class=\"s\">'gmap'</span><span class=\"k\">:</span><span class=\"s\">'~/dialogs/gmap/gmap.html'</span><span class=\"k\">,</span>","        <span class=\"s\">'insertvideo'</span><span class=\"k\">:</span><span class=\"s\">'~/dialogs/video/video.html'</span><span class=\"k\">,</span>","        <span class=\"s\">'help'</span><span class=\"k\">:</span><span class=\"s\">'~/dialogs/help/help.html'</span><span class=\"k\">,</span>","       <span class=\"c\">//'highlightcode':'~/dialogs/highlightcode/highlightcode.html',</span>","        <span class=\"s\">'emotion'</span><span class=\"k\">:</span><span class=\"s\">'~/dialogs/emotion/emotion.html'</span><span class=\"k\">,</span>","        <span class=\"s\">'wordimage'</span><span class=\"k\">:</span><span class=\"s\">'~/dialogs/wordimage/wordimage.html'</span><span class=\"k\">,</span>","        <span class=\"s\">'attachment'</span><span class=\"k\">:</span><span class=\"s\">'~/dialogs/attachment/attachment.html'</span><span class=\"k\">,</span>","        <span class=\"s\">'insertframe'</span><span class=\"k\">:</span><span class=\"s\">'~/dialogs/insertframe/insertframe.html'</span><span class=\"k\">,</span>","        <span class=\"s\">'edittip'</span><span class=\"k\">:</span><span class=\"s\">'~/dialogs/table/edittip.html'</span><span class=\"k\">,</span>","        <span class=\"s\">'edittable'</span><span class=\"k\">:</span><span class=\"s\">'~/dialogs/table/edittable.html'</span><span class=\"k\">,</span>","        <span class=\"s\">'edittd'</span><span class=\"k\">:</span><span class=\"s\">'~/dialogs/table/edittd.html'</span><span class=\"k\">,</span>","        <span class=\"s\">'webapp'</span><span class=\"k\">:</span><span class=\"s\">'~/dialogs/webapp/webapp.html'</span><span class=\"k\">,</span>","        <span class=\"s\">'snapscreen'</span><span class=\"k\">:</span><span class=\"s\">'~/dialogs/snapscreen/snapscreen.html'</span><span class=\"k\">,</span>","        <span class=\"s\">'scrawl'</span><span class=\"k\">:</span><span class=\"s\">'~/dialogs/scrawl/scrawl.html'</span><span class=\"k\">,</span>","        <span class=\"s\">'music'</span><span class=\"k\">:</span><span class=\"s\">'~/dialogs/music/music.html'</span><span class=\"k\">,</span>","        <span class=\"s\">'template'</span><span class=\"k\">:</span><span class=\"s\">'~/dialogs/template/template.html'</span><span class=\"k\">,</span>","        <span class=\"s\">'background'</span><span class=\"k\">:</span><span class=\"s\">'~/dialogs/background/background.html'</span>","    <span class=\"k\">}</span><span class=\"k\">;</span>","    <span class=\"c\">//&#20026;&#24037;&#20855;&#26639;&#28155;&#21152;&#25353;&#38062;&#65292;&#20197;&#19979;&#37117;&#26159;&#32479;&#19968;&#30340;&#25353;&#38062;&#35302;&#21457;&#21629;&#20196;&#65292;&#25152;&#20197;&#20889;&#22312;&#19968;&#36215;</span>","    <span class=\"k\">var</span> btnCmds <span class=\"k\">=</span> <span class=\"k\">[</span><span class=\"s\">'undo'</span><span class=\"k\">,</span> <span class=\"s\">'redo'</span><span class=\"k\">,</span> <span class=\"s\">'formatmatch'</span><span class=\"k\">,</span>","        <span class=\"s\">'bold'</span><span class=\"k\">,</span> <span class=\"s\">'italic'</span><span class=\"k\">,</span> <span class=\"s\">'underline'</span><span class=\"k\">,</span> <span class=\"s\">'fontborder'</span><span class=\"k\">,</span> <span class=\"s\">'touppercase'</span><span class=\"k\">,</span> <span class=\"s\">'tolowercase'</span><span class=\"k\">,</span>","        <span class=\"s\">'strikethrough'</span><span class=\"k\">,</span> <span class=\"s\">'subscript'</span><span class=\"k\">,</span> <span class=\"s\">'superscript'</span><span class=\"k\">,</span> <span class=\"s\">'source'</span><span class=\"k\">,</span> <span class=\"s\">'indent'</span><span class=\"k\">,</span> <span class=\"s\">'outdent'</span><span class=\"k\">,</span>","        <span class=\"s\">'blockquote'</span><span class=\"k\">,</span> <span class=\"s\">'pasteplain'</span><span class=\"k\">,</span> <span class=\"s\">'pagebreak'</span><span class=\"k\">,</span>","        <span class=\"s\">'selectall'</span><span class=\"k\">,</span> <span class=\"s\">'print'</span><span class=\"k\">,</span> <span class=\"s\">'preview'</span><span class=\"k\">,</span> <span class=\"s\">'horizontal'</span><span class=\"k\">,</span> <span class=\"s\">'removeformat'</span><span class=\"k\">,</span> <span class=\"s\">'time'</span><span class=\"k\">,</span> <span class=\"s\">'date'</span><span class=\"k\">,</span> <span class=\"s\">'unlink'</span><span class=\"k\">,</span>","        <span class=\"s\">'insertparagraphbeforetable'</span><span class=\"k\">,</span> <span class=\"s\">'insertrow'</span><span class=\"k\">,</span> <span class=\"s\">'insertcol'</span><span class=\"k\">,</span> <span class=\"s\">'mergeright'</span><span class=\"k\">,</span> <span class=\"s\">'mergedown'</span><span class=\"k\">,</span> <span class=\"s\">'deleterow'</span><span class=\"k\">,</span>","        <span class=\"s\">'deletecol'</span><span class=\"k\">,</span> <span class=\"s\">'splittorows'</span><span class=\"k\">,</span> <span class=\"s\">'splittocols'</span><span class=\"k\">,</span> <span class=\"s\">'splittocells'</span><span class=\"k\">,</span> <span class=\"s\">'mergecells'</span><span class=\"k\">,</span> <span class=\"s\">'deletetable'</span><span class=\"k\">];</span>","","    <span class=\"k\">for</span> <span class=\"k\">(</span><span class=\"k\">var</span> i <span class=\"k\">=</span> <span class=\"s\">0</span><span class=\"k\">,</span> ci<span class=\"k\">;</span> ci <span class=\"k\">=</span> btnCmds<span class=\"k\">[</span>i<span class=\"k\">++];)</span> <span class=\"k\">{</span>","        ci <span class=\"k\">=</span> ci<span class=\"k\">.</span>toLowerCase<span class=\"k\">();</span>","        editorui<span class=\"k\">[</span>ci<span class=\"k\">]</span> <span class=\"k\">=</span> <span class=\"k\">function</span> <span class=\"k\">(</span>cmd<span class=\"k\">)</span> <span class=\"k\">{</span>","            <span class=\"k\">return</span> <span class=\"k\">function</span> <span class=\"k\">(</span>editor<span class=\"k\">)</span> <span class=\"k\">{</span>","                <span class=\"k\">var</span> ui <span class=\"k\">=</span> <span class=\"k\">new</span> editorui<span class=\"k\">.</span>Button<span class=\"k\">(</span><span class=\"k\">{</span>","                    className<span class=\"k\">:</span><span class=\"s\">'edui-for-'</span> <span class=\"k\">+</span> cmd<span class=\"k\">,</span>","                    title<span class=\"k\">:</span>editor<span class=\"k\">.</span>options<span class=\"k\">.</span>labelMap<span class=\"k\">[</span>cmd<span class=\"k\">]</span> <span class=\"k\">||</span> editor<span class=\"k\">.</span>getLang<span class=\"k\">(</span><span class=\"s\">\"labelMap.\"</span> <span class=\"k\">+</span> cmd<span class=\"k\">)</span> <span class=\"k\">||</span> <span class=\"s\">''</span><span class=\"k\">,</span>","                    onclick<span class=\"k\">:</span><span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","                        editor<span class=\"k\">.</span>execCommand<span class=\"k\">(</span>cmd<span class=\"k\">);</span>","                    <span class=\"k\">}</span><span class=\"k\">,</span>","                    theme<span class=\"k\">:</span>editor<span class=\"k\">.</span>options<span class=\"k\">.</span>theme<span class=\"k\">,</span>","                    showText<span class=\"k\">:</span><span class=\"k\">false</span>","                <span class=\"k\">}</span><span class=\"k\">);</span>","                editorui<span class=\"k\">.</span>buttons<span class=\"k\">[</span>cmd<span class=\"k\">]</span> <span class=\"k\">=</span> ui<span class=\"k\">;</span>","                editor<span class=\"k\">.</span>addListener<span class=\"k\">(</span><span class=\"s\">'selectionchange'</span><span class=\"k\">,</span> <span class=\"k\">function</span> <span class=\"k\">(</span>type<span class=\"k\">,</span> causeByUi<span class=\"k\">,</span> uiReady<span class=\"k\">)</span> <span class=\"k\">{</span>","                    <span class=\"k\">var</span> state <span class=\"k\">=</span> editor<span class=\"k\">.</span>queryCommandState<span class=\"k\">(</span>cmd<span class=\"k\">);</span>","                    <span class=\"k\">if</span> <span class=\"k\">(</span>state <span class=\"k\">==</span> <span class=\"k\">-</span><span class=\"s\">1</span><span class=\"k\">)</span> <span class=\"k\">{</span>","                        ui<span class=\"k\">.</span>setDisabled<span class=\"k\">(</span><span class=\"k\">true</span><span class=\"k\">);</span>","                        ui<span class=\"k\">.</span>setChecked<span class=\"k\">(</span><span class=\"k\">false</span><span class=\"k\">);</span>","                    <span class=\"k\">}</span> <span class=\"k\">else</span> <span class=\"k\">{</span>","                        <span class=\"k\">if</span> <span class=\"k\">(!</span>uiReady<span class=\"k\">)</span> <span class=\"k\">{</span>","                            ui<span class=\"k\">.</span>setDisabled<span class=\"k\">(</span><span class=\"k\">false</span><span class=\"k\">);</span>","                            ui<span class=\"k\">.</span>setChecked<span class=\"k\">(</span>state<span class=\"k\">);</span>","                        <span class=\"k\">}</span>","                    <span class=\"k\">}</span>","                <span class=\"k\">}</span><span class=\"k\">);</span>","                <span class=\"k\">return</span> ui<span class=\"k\">;</span>","            <span class=\"k\">}</span><span class=\"k\">;</span>","        <span class=\"k\">}</span><span class=\"k\">(</span>ci<span class=\"k\">);</span>","    <span class=\"k\">}</span>","","    <span class=\"c\">//&#28165;&#38500;&#25991;&#26723;</span>","    editorui<span class=\"k\">.</span>cleardoc <span class=\"k\">=</span> <span class=\"k\">function</span> <span class=\"k\">(</span>editor<span class=\"k\">)</span> <span class=\"k\">{</span>","        <span class=\"k\">var</span> ui <span class=\"k\">=</span> <span class=\"k\">new</span> editorui<span class=\"k\">.</span>Button<span class=\"k\">(</span><span class=\"k\">{</span>","            className<span class=\"k\">:</span><span class=\"s\">'edui-for-cleardoc'</span><span class=\"k\">,</span>","            title<span class=\"k\">:</span>editor<span class=\"k\">.</span>options<span class=\"k\">.</span>labelMap<span class=\"k\">.</span>cleardoc <span class=\"k\">||</span> editor<span class=\"k\">.</span>getLang<span class=\"k\">(</span><span class=\"s\">\"labelMap.cleardoc\"</span><span class=\"k\">)</span> <span class=\"k\">||</span> <span class=\"s\">''</span><span class=\"k\">,</span>","            theme<span class=\"k\">:</span>editor<span class=\"k\">.</span>options<span class=\"k\">.</span>theme<span class=\"k\">,</span>","            onclick<span class=\"k\">:</span><span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","                <span class=\"k\">if</span> <span class=\"k\">(</span>confirm<span class=\"k\">(</span>editor<span class=\"k\">.</span>getLang<span class=\"k\">(</span><span class=\"s\">\"confirmClear\"</span><span class=\"k\">)))</span> <span class=\"k\">{</span>","                    editor<span class=\"k\">.</span>execCommand<span class=\"k\">(</span><span class=\"s\">'cleardoc'</span><span class=\"k\">);</span>","                <span class=\"k\">}</span>","            <span class=\"k\">}</span>","        <span class=\"k\">}</span><span class=\"k\">);</span>","        editorui<span class=\"k\">.</span>buttons<span class=\"k\">[</span><span class=\"s\">\"cleardoc\"</span><span class=\"k\">]</span> <span class=\"k\">=</span> ui<span class=\"k\">;</span>","        editor<span class=\"k\">.</span>addListener<span class=\"k\">(</span><span class=\"s\">'selectionchange'</span><span class=\"k\">,</span> <span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","            ui<span class=\"k\">.</span>setDisabled<span class=\"k\">(</span>editor<span class=\"k\">.</span>queryCommandState<span class=\"k\">(</span><span class=\"s\">'cleardoc'</span><span class=\"k\">)</span> <span class=\"k\">==</span> <span class=\"k\">-</span><span class=\"s\">1</span><span class=\"k\">);</span>","        <span class=\"k\">}</span><span class=\"k\">);</span>","        <span class=\"k\">return</span> ui<span class=\"k\">;</span>","    <span class=\"k\">}</span><span class=\"k\">;</span>","","    <span class=\"c\">//&#25490;&#29256;&#65292;&#22270;&#29255;&#25490;&#29256;&#65292;&#25991;&#23383;&#26041;&#21521;</span>","    <span class=\"k\">var</span> typeset <span class=\"k\">=</span> <span class=\"k\">{</span>","        <span class=\"s\">'justify'</span><span class=\"k\">:[</span><span class=\"s\">'left'</span><span class=\"k\">,</span> <span class=\"s\">'right'</span><span class=\"k\">,</span> <span class=\"s\">'center'</span><span class=\"k\">,</span> <span class=\"s\">'justify'</span><span class=\"k\">],</span>","        <span class=\"s\">'imagefloat'</span><span class=\"k\">:[</span><span class=\"s\">'none'</span><span class=\"k\">,</span> <span class=\"s\">'left'</span><span class=\"k\">,</span> <span class=\"s\">'center'</span><span class=\"k\">,</span> <span class=\"s\">'right'</span><span class=\"k\">],</span>","        <span class=\"s\">'directionality'</span><span class=\"k\">:[</span><span class=\"s\">'ltr'</span><span class=\"k\">,</span> <span class=\"s\">'rtl'</span><span class=\"k\">]</span>","    <span class=\"k\">}</span><span class=\"k\">;</span>","","    <span class=\"k\">for</span> <span class=\"k\">(</span><span class=\"k\">var</span> p <span class=\"k\">in</span> typeset<span class=\"k\">)</span> <span class=\"k\">{</span>","","        <span class=\"k\">(</span><span class=\"k\">function</span> <span class=\"k\">(</span>cmd<span class=\"k\">,</span> val<span class=\"k\">)</span> <span class=\"k\">{</span>","            <span class=\"k\">for</span> <span class=\"k\">(</span><span class=\"k\">var</span> i <span class=\"k\">=</span> <span class=\"s\">0</span><span class=\"k\">,</span> ci<span class=\"k\">;</span> ci <span class=\"k\">=</span> val<span class=\"k\">[</span>i<span class=\"k\">++];)</span> <span class=\"k\">{</span>","                <span class=\"k\">(</span><span class=\"k\">function</span> <span class=\"k\">(</span>cmd2<span class=\"k\">)</span> <span class=\"k\">{</span>","                    editorui<span class=\"k\">[</span>cmd<span class=\"k\">.</span>replace<span class=\"k\">(</span><span class=\"s\">'float'</span><span class=\"k\">,</span> <span class=\"s\">''</span><span class=\"k\">)</span> <span class=\"k\">+</span> cmd2<span class=\"k\">]</span> <span class=\"k\">=</span> <span class=\"k\">function</span> <span class=\"k\">(</span>editor<span class=\"k\">)</span> <span class=\"k\">{</span>","                        <span class=\"k\">var</span> ui <span class=\"k\">=</span> <span class=\"k\">new</span> editorui<span class=\"k\">.</span>Button<span class=\"k\">(</span><span class=\"k\">{</span>","                            className<span class=\"k\">:</span><span class=\"s\">'edui-for-'</span> <span class=\"k\">+</span> cmd<span class=\"k\">.</span>replace<span class=\"k\">(</span><span class=\"s\">'float'</span><span class=\"k\">,</span> <span class=\"s\">''</span><span class=\"k\">)</span> <span class=\"k\">+</span> cmd2<span class=\"k\">,</span>","                            title<span class=\"k\">:</span>editor<span class=\"k\">.</span>options<span class=\"k\">.</span>labelMap<span class=\"k\">[</span>cmd<span class=\"k\">.</span>replace<span class=\"k\">(</span><span class=\"s\">'float'</span><span class=\"k\">,</span> <span class=\"s\">''</span><span class=\"k\">)</span> <span class=\"k\">+</span> cmd2<span class=\"k\">]</span> <span class=\"k\">||</span> editor<span class=\"k\">.</span>getLang<span class=\"k\">(</span><span class=\"s\">\"labelMap.\"</span> <span class=\"k\">+</span> cmd<span class=\"k\">.</span>replace<span class=\"k\">(</span><span class=\"s\">'float'</span><span class=\"k\">,</span> <span class=\"s\">''</span><span class=\"k\">)</span> <span class=\"k\">+</span> cmd2<span class=\"k\">)</span> <span class=\"k\">||</span> <span class=\"s\">''</span><span class=\"k\">,</span>","                            theme<span class=\"k\">:</span>editor<span class=\"k\">.</span>options<span class=\"k\">.</span>theme<span class=\"k\">,</span>","                            onclick<span class=\"k\">:</span><span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","                                editor<span class=\"k\">.</span>execCommand<span class=\"k\">(</span>cmd<span class=\"k\">,</span> cmd2<span class=\"k\">);</span>","                            <span class=\"k\">}</span>","                        <span class=\"k\">}</span><span class=\"k\">);</span>","                        editorui<span class=\"k\">.</span>buttons<span class=\"k\">[</span>cmd<span class=\"k\">]</span> <span class=\"k\">=</span> ui<span class=\"k\">;</span>","                        editor<span class=\"k\">.</span>addListener<span class=\"k\">(</span><span class=\"s\">'selectionchange'</span><span class=\"k\">,</span> <span class=\"k\">function</span> <span class=\"k\">(</span>type<span class=\"k\">,</span> causeByUi<span class=\"k\">,</span> uiReady<span class=\"k\">)</span> <span class=\"k\">{</span>","                            ui<span class=\"k\">.</span>setDisabled<span class=\"k\">(</span>editor<span class=\"k\">.</span>queryCommandState<span class=\"k\">(</span>cmd<span class=\"k\">)</span> <span class=\"k\">==</span> <span class=\"k\">-</span><span class=\"s\">1</span><span class=\"k\">);</span>","                            ui<span class=\"k\">.</span>setChecked<span class=\"k\">(</span>editor<span class=\"k\">.</span>queryCommandValue<span class=\"k\">(</span>cmd<span class=\"k\">)</span> <span class=\"k\">==</span> cmd2 <span class=\"k\">&amp;&amp;</span> <span class=\"k\">!</span>uiReady<span class=\"k\">);</span>","                        <span class=\"k\">}</span><span class=\"k\">);</span>","                        <span class=\"k\">return</span> ui<span class=\"k\">;</span>","                    <span class=\"k\">}</span><span class=\"k\">;</span>","                <span class=\"k\">}</span><span class=\"k\">)(</span>ci<span class=\"k\">)</span>","            <span class=\"k\">}</span>","        <span class=\"k\">}</span><span class=\"k\">)(</span>p<span class=\"k\">,</span> typeset<span class=\"k\">[</span>p<span class=\"k\">])</span>","    <span class=\"k\">}</span>","","    <span class=\"c\">//&#23383;&#20307;&#39068;&#33394;&#21644;&#32972;&#26223;&#39068;&#33394;</span>","    <span class=\"k\">for</span> <span class=\"k\">(</span><span class=\"k\">var</span> i <span class=\"k\">=</span> <span class=\"s\">0</span><span class=\"k\">,</span> ci<span class=\"k\">;</span> ci <span class=\"k\">=</span> <span class=\"k\">[</span><span class=\"s\">'backcolor'</span><span class=\"k\">,</span> <span class=\"s\">'forecolor'</span><span class=\"k\">][</span>i<span class=\"k\">++];)</span> <span class=\"k\">{</span>","        editorui<span class=\"k\">[</span>ci<span class=\"k\">]</span> <span class=\"k\">=</span> <span class=\"k\">function</span> <span class=\"k\">(</span>cmd<span class=\"k\">)</span> <span class=\"k\">{</span>","            <span class=\"k\">return</span> <span class=\"k\">function</span> <span class=\"k\">(</span>editor<span class=\"k\">)</span> <span class=\"k\">{</span>","                <span class=\"k\">var</span> ui <span class=\"k\">=</span> <span class=\"k\">new</span> editorui<span class=\"k\">.</span>ColorButton<span class=\"k\">(</span><span class=\"k\">{</span>","                    className<span class=\"k\">:</span><span class=\"s\">'edui-for-'</span> <span class=\"k\">+</span> cmd<span class=\"k\">,</span>","                    color<span class=\"k\">:</span><span class=\"s\">'default'</span><span class=\"k\">,</span>","                    title<span class=\"k\">:</span>editor<span class=\"k\">.</span>options<span class=\"k\">.</span>labelMap<span class=\"k\">[</span>cmd<span class=\"k\">]</span> <span class=\"k\">||</span> editor<span class=\"k\">.</span>getLang<span class=\"k\">(</span><span class=\"s\">\"labelMap.\"</span> <span class=\"k\">+</span> cmd<span class=\"k\">)</span> <span class=\"k\">||</span> <span class=\"s\">''</span><span class=\"k\">,</span>","                    editor<span class=\"k\">:</span>editor<span class=\"k\">,</span>","                    onpickcolor<span class=\"k\">:</span><span class=\"k\">function</span> <span class=\"k\">(</span>t<span class=\"k\">,</span> color<span class=\"k\">)</span> <span class=\"k\">{</span>","                        editor<span class=\"k\">.</span>execCommand<span class=\"k\">(</span>cmd<span class=\"k\">,</span> color<span class=\"k\">);</span>","                    <span class=\"k\">}</span><span class=\"k\">,</span>","                    onpicknocolor<span class=\"k\">:</span><span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","                        editor<span class=\"k\">.</span>execCommand<span class=\"k\">(</span>cmd<span class=\"k\">,</span> <span class=\"s\">'default'</span><span class=\"k\">);</span>","                        <span class=\"k\">this</span><span class=\"k\">.</span>setColor<span class=\"k\">(</span><span class=\"s\">'transparent'</span><span class=\"k\">);</span>","                        <span class=\"k\">this</span><span class=\"k\">.</span>color <span class=\"k\">=</span> <span class=\"s\">'default'</span><span class=\"k\">;</span>","                    <span class=\"k\">}</span><span class=\"k\">,</span>","                    onbuttonclick<span class=\"k\">:</span><span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","                        editor<span class=\"k\">.</span>execCommand<span class=\"k\">(</span>cmd<span class=\"k\">,</span> <span class=\"k\">this</span><span class=\"k\">.</span>color<span class=\"k\">);</span>","                    <span class=\"k\">}</span>","                <span class=\"k\">}</span><span class=\"k\">);</span>","                editorui<span class=\"k\">.</span>buttons<span class=\"k\">[</span>cmd<span class=\"k\">]</span> <span class=\"k\">=</span> ui<span class=\"k\">;</span>","                editor<span class=\"k\">.</span>addListener<span class=\"k\">(</span><span class=\"s\">'selectionchange'</span><span class=\"k\">,</span> <span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","                    ui<span class=\"k\">.</span>setDisabled<span class=\"k\">(</span>editor<span class=\"k\">.</span>queryCommandState<span class=\"k\">(</span>cmd<span class=\"k\">)</span> <span class=\"k\">==</span> <span class=\"k\">-</span><span class=\"s\">1</span><span class=\"k\">);</span>","                <span class=\"k\">}</span><span class=\"k\">);</span>","                <span class=\"k\">return</span> ui<span class=\"k\">;</span>","            <span class=\"k\">}</span><span class=\"k\">;</span>","        <span class=\"k\">}</span><span class=\"k\">(</span>ci<span class=\"k\">);</span>","    <span class=\"k\">}</span>","","","    <span class=\"k\">var</span> dialogBtns <span class=\"k\">=</span> <span class=\"k\">{</span>","        noOk<span class=\"k\">:[</span><span class=\"s\">'searchreplace'</span><span class=\"k\">,</span> <span class=\"s\">'help'</span><span class=\"k\">,</span> <span class=\"s\">'spechars'</span><span class=\"k\">,</span> <span class=\"s\">'webapp'</span><span class=\"k\">],</span>","        ok<span class=\"k\">:[</span><span class=\"s\">'attachment'</span><span class=\"k\">,</span> <span class=\"s\">'anchor'</span><span class=\"k\">,</span> <span class=\"s\">'link'</span><span class=\"k\">,</span> <span class=\"s\">'insertimage'</span><span class=\"k\">,</span> <span class=\"s\">'map'</span><span class=\"k\">,</span> <span class=\"s\">'gmap'</span><span class=\"k\">,</span> <span class=\"s\">'insertframe'</span><span class=\"k\">,</span> <span class=\"s\">'wordimage'</span><span class=\"k\">,</span>","            <span class=\"s\">'insertvideo'</span><span class=\"k\">,</span> <span class=\"s\">'insertframe'</span><span class=\"k\">,</span> <span class=\"s\">'edittip'</span><span class=\"k\">,</span> <span class=\"s\">'edittable'</span><span class=\"k\">,</span> <span class=\"s\">'edittd'</span><span class=\"k\">,</span> <span class=\"s\">'scrawl'</span><span class=\"k\">,</span> <span class=\"s\">'template'</span><span class=\"k\">,</span> <span class=\"s\">'music'</span><span class=\"k\">,</span> <span class=\"s\">'background'</span><span class=\"k\">]</span>","","    <span class=\"k\">}</span><span class=\"k\">;</span>","","    <span class=\"k\">for</span> <span class=\"k\">(</span><span class=\"k\">var</span> p <span class=\"k\">in</span> dialogBtns<span class=\"k\">)</span> <span class=\"k\">{</span>","        <span class=\"k\">(</span><span class=\"k\">function</span> <span class=\"k\">(</span>type<span class=\"k\">,</span> vals<span class=\"k\">)</span> <span class=\"k\">{</span>","            <span class=\"k\">for</span> <span class=\"k\">(</span><span class=\"k\">var</span> i <span class=\"k\">=</span> <span class=\"s\">0</span><span class=\"k\">,</span> ci<span class=\"k\">;</span> ci <span class=\"k\">=</span> vals<span class=\"k\">[</span>i<span class=\"k\">++];)</span> <span class=\"k\">{</span>","                <span class=\"c\">//todo opera&#19979;&#23384;&#22312;&#38382;&#39064;</span>","                <span class=\"k\">if</span> <span class=\"k\">(</span>browser<span class=\"k\">.</span>opera <span class=\"k\">&amp;&amp;</span> ci <span class=\"k\">===</span> <span class=\"s\">\"searchreplace\"</span><span class=\"k\">)</span> <span class=\"k\">{</span>","                    <span class=\"k\">continue</span><span class=\"k\">;</span>","                <span class=\"k\">}</span>","                <span class=\"k\">(</span><span class=\"k\">function</span> <span class=\"k\">(</span>cmd<span class=\"k\">)</span> <span class=\"k\">{</span>","                    editorui<span class=\"k\">[</span>cmd<span class=\"k\">]</span> <span class=\"k\">=</span> <span class=\"k\">function</span> <span class=\"k\">(</span>editor<span class=\"k\">,</span> iframeUrl<span class=\"k\">,</span> title<span class=\"k\">)</span> <span class=\"k\">{</span>","                        iframeUrl <span class=\"k\">=</span> iframeUrl <span class=\"k\">||</span> <span class=\"k\">(</span>editor<span class=\"k\">.</span>options<span class=\"k\">.</span>iframeUrlMap <span class=\"k\">||</span> <span class=\"k\">{}</span><span class=\"k\">)[</span>cmd<span class=\"k\">]</span> <span class=\"k\">||</span> iframeUrlMap<span class=\"k\">[</span>cmd<span class=\"k\">];</span>","                        title <span class=\"k\">=</span> editor<span class=\"k\">.</span>options<span class=\"k\">.</span>labelMap<span class=\"k\">[</span>cmd<span class=\"k\">]</span> <span class=\"k\">||</span> editor<span class=\"k\">.</span>getLang<span class=\"k\">(</span><span class=\"s\">\"labelMap.\"</span> <span class=\"k\">+</span> cmd<span class=\"k\">)</span> <span class=\"k\">||</span> <span class=\"s\">''</span><span class=\"k\">;</span>","","                        <span class=\"k\">var</span> dialog<span class=\"k\">;</span>","                        <span class=\"c\">//&#27809;&#26377;iframeUrl&#19981;&#21019;&#24314;dialog</span>","                        <span class=\"k\">if</span> <span class=\"k\">(</span>iframeUrl<span class=\"k\">)</span> <span class=\"k\">{</span>","                            dialog <span class=\"k\">=</span> <span class=\"k\">new</span> editorui<span class=\"k\">.</span>Dialog<span class=\"k\">(</span>utils<span class=\"k\">.</span>extend<span class=\"k\">(</span><span class=\"k\">{</span>","                                iframeUrl<span class=\"k\">:</span>editor<span class=\"k\">.</span>ui<span class=\"k\">.</span>mapUrl<span class=\"k\">(</span>iframeUrl<span class=\"k\">),</span>","                                editor<span class=\"k\">:</span>editor<span class=\"k\">,</span>","                                className<span class=\"k\">:</span><span class=\"s\">'edui-for-'</span> <span class=\"k\">+</span> cmd<span class=\"k\">,</span>","                                title<span class=\"k\">:</span>title<span class=\"k\">,</span>","                                holdScroll<span class=\"k\">:</span> cmd <span class=\"k\">===</span> <span class=\"s\">'insertimage'</span><span class=\"k\">,</span>","                                closeDialog<span class=\"k\">:</span>editor<span class=\"k\">.</span>getLang<span class=\"k\">(</span><span class=\"s\">\"closeDialog\"</span><span class=\"k\">)</span>","                            <span class=\"k\">}</span><span class=\"k\">,</span> type <span class=\"k\">==</span> <span class=\"s\">'ok'</span> <span class=\"k\">?</span> <span class=\"k\">{</span>","                                buttons<span class=\"k\">:[</span>","                                    <span class=\"k\">{</span>","                                        className<span class=\"k\">:</span><span class=\"s\">'edui-okbutton'</span><span class=\"k\">,</span>","                                        label<span class=\"k\">:</span>editor<span class=\"k\">.</span>getLang<span class=\"k\">(</span><span class=\"s\">\"ok\"</span><span class=\"k\">),</span>","                                        editor<span class=\"k\">:</span>editor<span class=\"k\">,</span>","                                        onclick<span class=\"k\">:</span><span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","                                            dialog<span class=\"k\">.</span>close<span class=\"k\">(</span><span class=\"k\">true</span><span class=\"k\">);</span>","                                        <span class=\"k\">}</span>","                                    <span class=\"k\">}</span><span class=\"k\">,</span>","                                    <span class=\"k\">{</span>","                                        className<span class=\"k\">:</span><span class=\"s\">'edui-cancelbutton'</span><span class=\"k\">,</span>","                                        label<span class=\"k\">:</span>editor<span class=\"k\">.</span>getLang<span class=\"k\">(</span><span class=\"s\">\"cancel\"</span><span class=\"k\">),</span>","                                        editor<span class=\"k\">:</span>editor<span class=\"k\">,</span>","                                        onclick<span class=\"k\">:</span><span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","                                            dialog<span class=\"k\">.</span>close<span class=\"k\">(</span><span class=\"k\">false</span><span class=\"k\">);</span>","                                        <span class=\"k\">}</span>","                                    <span class=\"k\">}</span>","                                <span class=\"k\">]</span>","                            <span class=\"k\">}</span> <span class=\"k\">:</span> <span class=\"k\">{}</span><span class=\"k\">));</span>","","                            editor<span class=\"k\">.</span>ui<span class=\"k\">.</span>_dialogs<span class=\"k\">[</span>cmd <span class=\"k\">+</span> <span class=\"s\">\"Dialog\"</span><span class=\"k\">]</span> <span class=\"k\">=</span> dialog<span class=\"k\">;</span>","                        <span class=\"k\">}</span>","","                        <span class=\"k\">var</span> ui <span class=\"k\">=</span> <span class=\"k\">new</span> editorui<span class=\"k\">.</span>Button<span class=\"k\">(</span><span class=\"k\">{</span>","                            className<span class=\"k\">:</span><span class=\"s\">'edui-for-'</span> <span class=\"k\">+</span> cmd<span class=\"k\">,</span>","                            title<span class=\"k\">:</span>title<span class=\"k\">,</span>","                            onclick<span class=\"k\">:</span><span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","                                <span class=\"k\">if</span> <span class=\"k\">(</span>dialog<span class=\"k\">)</span> <span class=\"k\">{</span>","                                    <span class=\"k\">switch</span> <span class=\"k\">(</span>cmd<span class=\"k\">)</span> <span class=\"k\">{</span>","                                        <span class=\"k\">case</span> <span class=\"s\">\"wordimage\"</span><span class=\"k\">:</span>","                                            editor<span class=\"k\">.</span>execCommand<span class=\"k\">(</span><span class=\"s\">\"wordimage\"</span><span class=\"k\">,</span> <span class=\"s\">\"word_img\"</span><span class=\"k\">);</span>","                                            <span class=\"k\">if</span> <span class=\"k\">(</span>editor<span class=\"k\">.</span>word_img<span class=\"k\">)</span> <span class=\"k\">{</span>","                                                dialog<span class=\"k\">.</span>render<span class=\"k\">();</span>","                                                dialog<span class=\"k\">.</span>open<span class=\"k\">();</span>","                                            <span class=\"k\">}</span>","                                            <span class=\"k\">break</span><span class=\"k\">;</span>","                                        <span class=\"k\">case</span> <span class=\"s\">\"scrawl\"</span><span class=\"k\">:</span>","                                            <span class=\"k\">if</span> <span class=\"k\">(</span>editor<span class=\"k\">.</span>queryCommandState<span class=\"k\">(</span><span class=\"s\">\"scrawl\"</span><span class=\"k\">)</span> <span class=\"k\">!=</span> <span class=\"k\">-</span><span class=\"s\">1</span><span class=\"k\">)</span> <span class=\"k\">{</span>","                                                dialog<span class=\"k\">.</span>render<span class=\"k\">();</span>","                                                dialog<span class=\"k\">.</span>open<span class=\"k\">();</span>","                                            <span class=\"k\">}</span>","","                                            <span class=\"k\">break</span><span class=\"k\">;</span>","                                        <span class=\"k\">default</span><span class=\"k\">:</span>","                                            dialog<span class=\"k\">.</span>render<span class=\"k\">();</span>","                                            dialog<span class=\"k\">.</span>open<span class=\"k\">();</span>","                                    <span class=\"k\">}</span>","                                <span class=\"k\">}</span>","                            <span class=\"k\">}</span><span class=\"k\">,</span>","                            theme<span class=\"k\">:</span>editor<span class=\"k\">.</span>options<span class=\"k\">.</span>theme<span class=\"k\">,</span>","                            disabled<span class=\"k\">:</span>cmd <span class=\"k\">==</span> <span class=\"s\">'scrawl'</span> <span class=\"k\">&amp;&amp;</span> editor<span class=\"k\">.</span>queryCommandState<span class=\"k\">(</span><span class=\"s\">\"scrawl\"</span><span class=\"k\">)</span> <span class=\"k\">==</span> <span class=\"k\">-</span><span class=\"s\">1</span>","                        <span class=\"k\">}</span><span class=\"k\">);</span>","                        editorui<span class=\"k\">.</span>buttons<span class=\"k\">[</span>cmd<span class=\"k\">]</span> <span class=\"k\">=</span> ui<span class=\"k\">;</span>","                        editor<span class=\"k\">.</span>addListener<span class=\"k\">(</span><span class=\"s\">'selectionchange'</span><span class=\"k\">,</span> <span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","                            <span class=\"c\">//&#21482;&#23384;&#22312;&#20110;&#21491;&#38190;&#33756;&#21333;&#32780;&#26080;&#24037;&#20855;&#26639;&#25353;&#38062;&#30340;ui&#19981;&#38656;&#35201;&#26816;&#27979;&#29366;&#24577;</span>","                            <span class=\"k\">var</span> unNeedCheckState <span class=\"k\">=</span> <span class=\"k\">{</span><span class=\"s\">'edittable'</span><span class=\"k\">:</span><span class=\"s\">1</span><span class=\"k\">}</span><span class=\"k\">;</span>","                            <span class=\"k\">if</span> <span class=\"k\">(</span>cmd <span class=\"k\">in</span> unNeedCheckState<span class=\"k\">)</span><span class=\"k\">return</span><span class=\"k\">;</span>","","                            <span class=\"k\">var</span> state <span class=\"k\">=</span> editor<span class=\"k\">.</span>queryCommandState<span class=\"k\">(</span>cmd<span class=\"k\">);</span>","                            <span class=\"k\">if</span> <span class=\"k\">(</span>ui<span class=\"k\">.</span>getDom<span class=\"k\">())</span> <span class=\"k\">{</span>","                                ui<span class=\"k\">.</span>setDisabled<span class=\"k\">(</span>state <span class=\"k\">==</span> <span class=\"k\">-</span><span class=\"s\">1</span><span class=\"k\">);</span>","                                ui<span class=\"k\">.</span>setChecked<span class=\"k\">(</span>state<span class=\"k\">);</span>","                            <span class=\"k\">}</span>","","                        <span class=\"k\">}</span><span class=\"k\">);</span>","","                        <span class=\"k\">return</span> ui<span class=\"k\">;</span>","                    <span class=\"k\">}</span><span class=\"k\">;</span>","                <span class=\"k\">}</span><span class=\"k\">)(</span>ci<span class=\"k\">.</span>toLowerCase<span class=\"k\">())</span>","            <span class=\"k\">}</span>","        <span class=\"k\">}</span><span class=\"k\">)(</span>p<span class=\"k\">,</span> dialogBtns<span class=\"k\">[</span>p<span class=\"k\">])</span>","    <span class=\"k\">}</span>","","    editorui<span class=\"k\">.</span>snapscreen <span class=\"k\">=</span> <span class=\"k\">function</span> <span class=\"k\">(</span>editor<span class=\"k\">,</span> iframeUrl<span class=\"k\">,</span> title<span class=\"k\">)</span> <span class=\"k\">{</span>","        title <span class=\"k\">=</span> editor<span class=\"k\">.</span>options<span class=\"k\">.</span>labelMap<span class=\"k\">[</span><span class=\"s\">'snapscreen'</span><span class=\"k\">]</span> <span class=\"k\">||</span> editor<span class=\"k\">.</span>getLang<span class=\"k\">(</span><span class=\"s\">\"labelMap.snapscreen\"</span><span class=\"k\">)</span> <span class=\"k\">||</span> <span class=\"s\">''</span><span class=\"k\">;</span>","        <span class=\"k\">var</span> ui <span class=\"k\">=</span> <span class=\"k\">new</span> editorui<span class=\"k\">.</span>Button<span class=\"k\">(</span><span class=\"k\">{</span>","            className<span class=\"k\">:</span><span class=\"s\">'edui-for-snapscreen'</span><span class=\"k\">,</span>","            title<span class=\"k\">:</span>title<span class=\"k\">,</span>","            onclick<span class=\"k\">:</span><span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","                editor<span class=\"k\">.</span>execCommand<span class=\"k\">(</span><span class=\"s\">\"snapscreen\"</span><span class=\"k\">);</span>","            <span class=\"k\">}</span><span class=\"k\">,</span>","            theme<span class=\"k\">:</span>editor<span class=\"k\">.</span>options<span class=\"k\">.</span>theme","","        <span class=\"k\">}</span><span class=\"k\">);</span>","        editorui<span class=\"k\">.</span>buttons<span class=\"k\">[</span><span class=\"s\">'snapscreen'</span><span class=\"k\">]</span> <span class=\"k\">=</span> ui<span class=\"k\">;</span>","        iframeUrl <span class=\"k\">=</span> iframeUrl <span class=\"k\">||</span> <span class=\"k\">(</span>editor<span class=\"k\">.</span>options<span class=\"k\">.</span>iframeUrlMap <span class=\"k\">||</span> <span class=\"k\">{}</span><span class=\"k\">)[</span><span class=\"s\">\"snapscreen\"</span><span class=\"k\">]</span> <span class=\"k\">||</span> iframeUrlMap<span class=\"k\">[</span><span class=\"s\">\"snapscreen\"</span><span class=\"k\">];</span>","        <span class=\"k\">if</span> <span class=\"k\">(</span>iframeUrl<span class=\"k\">)</span> <span class=\"k\">{</span>","            <span class=\"k\">var</span> dialog <span class=\"k\">=</span> <span class=\"k\">new</span> editorui<span class=\"k\">.</span>Dialog<span class=\"k\">(</span><span class=\"k\">{</span>","                iframeUrl<span class=\"k\">:</span>editor<span class=\"k\">.</span>ui<span class=\"k\">.</span>mapUrl<span class=\"k\">(</span>iframeUrl<span class=\"k\">),</span>","                editor<span class=\"k\">:</span>editor<span class=\"k\">,</span>","                className<span class=\"k\">:</span><span class=\"s\">'edui-for-snapscreen'</span><span class=\"k\">,</span>","                title<span class=\"k\">:</span>title<span class=\"k\">,</span>","                buttons<span class=\"k\">:[</span>","                    <span class=\"k\">{</span>","                        className<span class=\"k\">:</span><span class=\"s\">'edui-okbutton'</span><span class=\"k\">,</span>","                        label<span class=\"k\">:</span>editor<span class=\"k\">.</span>getLang<span class=\"k\">(</span><span class=\"s\">\"ok\"</span><span class=\"k\">),</span>","                        editor<span class=\"k\">:</span>editor<span class=\"k\">,</span>","                        onclick<span class=\"k\">:</span><span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","                            dialog<span class=\"k\">.</span>close<span class=\"k\">(</span><span class=\"k\">true</span><span class=\"k\">);</span>","                        <span class=\"k\">}</span>","                    <span class=\"k\">}</span><span class=\"k\">,</span>","                    <span class=\"k\">{</span>","                        className<span class=\"k\">:</span><span class=\"s\">'edui-cancelbutton'</span><span class=\"k\">,</span>","                        label<span class=\"k\">:</span>editor<span class=\"k\">.</span>getLang<span class=\"k\">(</span><span class=\"s\">\"cancel\"</span><span class=\"k\">),</span>","                        editor<span class=\"k\">:</span>editor<span class=\"k\">,</span>","                        onclick<span class=\"k\">:</span><span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","                            dialog<span class=\"k\">.</span>close<span class=\"k\">(</span><span class=\"k\">false</span><span class=\"k\">);</span>","                        <span class=\"k\">}</span>","                    <span class=\"k\">}</span>","                <span class=\"k\">]</span>","","            <span class=\"k\">}</span><span class=\"k\">);</span>","            dialog<span class=\"k\">.</span>render<span class=\"k\">();</span>","            editor<span class=\"k\">.</span>ui<span class=\"k\">.</span>_dialogs<span class=\"k\">[</span><span class=\"s\">\"snapscreenDialog\"</span><span class=\"k\">]</span> <span class=\"k\">=</span> dialog<span class=\"k\">;</span>","        <span class=\"k\">}</span>","        editor<span class=\"k\">.</span>addListener<span class=\"k\">(</span><span class=\"s\">'selectionchange'</span><span class=\"k\">,</span> <span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","            ui<span class=\"k\">.</span>setDisabled<span class=\"k\">(</span>editor<span class=\"k\">.</span>queryCommandState<span class=\"k\">(</span><span class=\"s\">'snapscreen'</span><span class=\"k\">)</span> <span class=\"k\">==</span> <span class=\"k\">-</span><span class=\"s\">1</span><span class=\"k\">);</span>","        <span class=\"k\">}</span><span class=\"k\">);</span>","        <span class=\"k\">return</span> ui<span class=\"k\">;</span>","    <span class=\"k\">}</span><span class=\"k\">;</span>","","    editorui<span class=\"k\">.</span>insertcode <span class=\"k\">=</span> <span class=\"k\">function</span> <span class=\"k\">(</span>editor<span class=\"k\">,</span> list<span class=\"k\">,</span> title<span class=\"k\">)</span> <span class=\"k\">{</span>","        list <span class=\"k\">=</span> editor<span class=\"k\">.</span>options<span class=\"k\">[</span><span class=\"s\">'insertcode'</span><span class=\"k\">]</span> <span class=\"k\">||</span> <span class=\"k\">[];</span>","        title <span class=\"k\">=</span> editor<span class=\"k\">.</span>options<span class=\"k\">.</span>labelMap<span class=\"k\">[</span><span class=\"s\">'insertcode'</span><span class=\"k\">]</span> <span class=\"k\">||</span> editor<span class=\"k\">.</span>getLang<span class=\"k\">(</span><span class=\"s\">\"labelMap.insertcode\"</span><span class=\"k\">)</span> <span class=\"k\">||</span> <span class=\"s\">''</span><span class=\"k\">;</span>","       <span class=\"c\">// if (!list.length) return;</span>","        <span class=\"k\">var</span> items <span class=\"k\">=</span> <span class=\"k\">[];</span>","        utils<span class=\"k\">.</span>each<span class=\"k\">(</span>list<span class=\"k\">,</span><span class=\"k\">function</span><span class=\"k\">(</span>key<span class=\"k\">,</span>val<span class=\"k\">)</span><span class=\"k\">{</span>","            items<span class=\"k\">.</span>push<span class=\"k\">(</span><span class=\"k\">{</span>","                label<span class=\"k\">:</span>key<span class=\"k\">,</span>","                value<span class=\"k\">:</span>val<span class=\"k\">,</span>","                theme<span class=\"k\">:</span>editor<span class=\"k\">.</span>options<span class=\"k\">.</span>theme<span class=\"k\">,</span>","                renderLabelHtml<span class=\"k\">:</span><span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","                    <span class=\"k\">return</span> <span class=\"s\">'&lt;div class=\"edui-label %%-label\" &gt;'</span> <span class=\"k\">+</span> <span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">.</span>label <span class=\"k\">||</span> <span class=\"s\">''</span><span class=\"k\">)</span> <span class=\"k\">+</span> <span class=\"s\">'&lt;/div&gt;'</span><span class=\"k\">;</span>","                <span class=\"k\">}</span>","            <span class=\"k\">}</span><span class=\"k\">);</span>","        <span class=\"k\">}</span><span class=\"k\">);</span>","","        <span class=\"k\">var</span> ui <span class=\"k\">=</span> <span class=\"k\">new</span> editorui<span class=\"k\">.</span>Combox<span class=\"k\">(</span><span class=\"k\">{</span>","            editor<span class=\"k\">:</span>editor<span class=\"k\">,</span>","            items<span class=\"k\">:</span>items<span class=\"k\">,</span>","            onselect<span class=\"k\">:</span><span class=\"k\">function</span> <span class=\"k\">(</span>t<span class=\"k\">,</span> index<span class=\"k\">)</span> <span class=\"k\">{</span>","                editor<span class=\"k\">.</span>execCommand<span class=\"k\">(</span><span class=\"s\">'insertcode'</span><span class=\"k\">,</span> <span class=\"k\">this</span><span class=\"k\">.</span>items<span class=\"k\">[</span>index<span class=\"k\">].</span>value<span class=\"k\">);</span>","            <span class=\"k\">}</span><span class=\"k\">,</span>","            onbuttonclick<span class=\"k\">:</span><span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","                <span class=\"k\">this</span><span class=\"k\">.</span>showPopup<span class=\"k\">();</span>","            <span class=\"k\">}</span><span class=\"k\">,</span>","            title<span class=\"k\">:</span>title<span class=\"k\">,</span>","            initValue<span class=\"k\">:</span>title<span class=\"k\">,</span>","            className<span class=\"k\">:</span><span class=\"s\">'edui-for-insertcode'</span><span class=\"k\">,</span>","            indexByValue<span class=\"k\">:</span><span class=\"k\">function</span> <span class=\"k\">(</span>value<span class=\"k\">)</span> <span class=\"k\">{</span>","                <span class=\"k\">if</span> <span class=\"k\">(</span>value<span class=\"k\">)</span> <span class=\"k\">{</span>","                    <span class=\"k\">for</span> <span class=\"k\">(</span><span class=\"k\">var</span> i <span class=\"k\">=</span> <span class=\"s\">0</span><span class=\"k\">,</span> ci<span class=\"k\">;</span> ci <span class=\"k\">=</span> <span class=\"k\">this</span><span class=\"k\">.</span>items<span class=\"k\">[</span>i<span class=\"k\">];</span> i<span class=\"k\">++)</span> <span class=\"k\">{</span>","                        <span class=\"k\">if</span> <span class=\"k\">(</span>ci<span class=\"k\">.</span>value<span class=\"k\">.</span>indexOf<span class=\"k\">(</span>value<span class=\"k\">)</span> <span class=\"k\">!=</span> <span class=\"k\">-</span><span class=\"s\">1</span><span class=\"k\">)</span>","                            <span class=\"k\">return</span> i<span class=\"k\">;</span>","                    <span class=\"k\">}</span>","                <span class=\"k\">}</span>","","                <span class=\"k\">return</span> <span class=\"k\">-</span><span class=\"s\">1</span><span class=\"k\">;</span>","            <span class=\"k\">}</span>","        <span class=\"k\">}</span><span class=\"k\">);</span>","        editorui<span class=\"k\">.</span>buttons<span class=\"k\">[</span><span class=\"s\">'insertcode'</span><span class=\"k\">]</span> <span class=\"k\">=</span> ui<span class=\"k\">;</span>","        editor<span class=\"k\">.</span>addListener<span class=\"k\">(</span><span class=\"s\">'selectionchange'</span><span class=\"k\">,</span> <span class=\"k\">function</span> <span class=\"k\">(</span>type<span class=\"k\">,</span> causeByUi<span class=\"k\">,</span> uiReady<span class=\"k\">)</span> <span class=\"k\">{</span>","            <span class=\"k\">if</span> <span class=\"k\">(!</span>uiReady<span class=\"k\">)</span> <span class=\"k\">{</span>","                <span class=\"k\">var</span> state <span class=\"k\">=</span> editor<span class=\"k\">.</span>queryCommandState<span class=\"k\">(</span><span class=\"s\">'insertcode'</span><span class=\"k\">);</span>","                <span class=\"k\">if</span> <span class=\"k\">(</span>state <span class=\"k\">==</span> <span class=\"k\">-</span><span class=\"s\">1</span><span class=\"k\">)</span> <span class=\"k\">{</span>","                    ui<span class=\"k\">.</span>setDisabled<span class=\"k\">(</span><span class=\"k\">true</span><span class=\"k\">);</span>","                <span class=\"k\">}</span> <span class=\"k\">else</span> <span class=\"k\">{</span>","                    ui<span class=\"k\">.</span>setDisabled<span class=\"k\">(</span><span class=\"k\">false</span><span class=\"k\">);</span>","                    <span class=\"k\">var</span> value <span class=\"k\">=</span> editor<span class=\"k\">.</span>queryCommandValue<span class=\"k\">(</span><span class=\"s\">'insertcode'</span><span class=\"k\">);</span>","                    <span class=\"k\">if</span><span class=\"k\">(!</span>value<span class=\"k\">)</span><span class=\"k\">{</span>","                        ui<span class=\"k\">.</span>setValue<span class=\"k\">(</span>title<span class=\"k\">);</span>","                        <span class=\"k\">return</span><span class=\"k\">;</span>","                    <span class=\"k\">}</span>","                    <span class=\"c\">//trace:1871 ie&#19979;&#20174;&#28304;&#30721;&#27169;&#24335;&#20999;&#25442;&#22238;&#26469;&#26102;&#65292;&#23383;&#20307;&#20250;&#24102;&#21333;&#24341;&#21495;&#65292;&#32780;&#19988;&#20250;&#26377;&#36887;&#21495;</span>","                    value <span class=\"k\">&amp;&amp;</span> <span class=\"k\">(</span>value <span class=\"k\">=</span> value<span class=\"k\">.</span>replace<span class=\"k\">(</span><span class=\"s\">/['\"]/g</span><span class=\"k\">,</span> <span class=\"s\">''</span><span class=\"k\">).</span>split<span class=\"k\">(</span><span class=\"s\">','</span><span class=\"k\">)[</span><span class=\"s\">0</span><span class=\"k\">]);</span>","                    ui<span class=\"k\">.</span>setValue<span class=\"k\">(</span>value<span class=\"k\">);</span>","","                <span class=\"k\">}</span>","            <span class=\"k\">}</span>","","        <span class=\"k\">}</span><span class=\"k\">);</span>","        <span class=\"k\">return</span> ui<span class=\"k\">;</span>","    <span class=\"k\">}</span><span class=\"k\">;</span>","    editorui<span class=\"k\">.</span>fontfamily <span class=\"k\">=</span> <span class=\"k\">function</span> <span class=\"k\">(</span>editor<span class=\"k\">,</span> list<span class=\"k\">,</span> title<span class=\"k\">)</span> <span class=\"k\">{</span>","","        list <span class=\"k\">=</span> editor<span class=\"k\">.</span>options<span class=\"k\">[</span><span class=\"s\">'fontfamily'</span><span class=\"k\">]</span> <span class=\"k\">||</span> <span class=\"k\">[];</span>","        title <span class=\"k\">=</span> editor<span class=\"k\">.</span>options<span class=\"k\">.</span>labelMap<span class=\"k\">[</span><span class=\"s\">'fontfamily'</span><span class=\"k\">]</span> <span class=\"k\">||</span> editor<span class=\"k\">.</span>getLang<span class=\"k\">(</span><span class=\"s\">\"labelMap.fontfamily\"</span><span class=\"k\">)</span> <span class=\"k\">||</span> <span class=\"s\">''</span><span class=\"k\">;</span>","        <span class=\"k\">if</span> <span class=\"k\">(!</span>list<span class=\"k\">.</span>length<span class=\"k\">)</span> <span class=\"k\">return</span><span class=\"k\">;</span>","        <span class=\"k\">for</span> <span class=\"k\">(</span><span class=\"k\">var</span> i <span class=\"k\">=</span> <span class=\"s\">0</span><span class=\"k\">,</span> ci<span class=\"k\">,</span> items <span class=\"k\">=</span> <span class=\"k\">[];</span> ci <span class=\"k\">=</span> list<span class=\"k\">[</span>i<span class=\"k\">];</span> i<span class=\"k\">++)</span> <span class=\"k\">{</span>","            <span class=\"k\">var</span> langLabel <span class=\"k\">=</span> editor<span class=\"k\">.</span>getLang<span class=\"k\">(</span><span class=\"s\">'fontfamily'</span><span class=\"k\">)[</span>ci<span class=\"k\">.</span>name<span class=\"k\">]</span> <span class=\"k\">||</span> <span class=\"s\">\"\"</span><span class=\"k\">;</span>","            <span class=\"k\">(</span><span class=\"k\">function</span> <span class=\"k\">(</span>key<span class=\"k\">,</span> val<span class=\"k\">)</span> <span class=\"k\">{</span>","                items<span class=\"k\">.</span>push<span class=\"k\">(</span><span class=\"k\">{</span>","                    label<span class=\"k\">:</span>key<span class=\"k\">,</span>","                    value<span class=\"k\">:</span>val<span class=\"k\">,</span>","                    theme<span class=\"k\">:</span>editor<span class=\"k\">.</span>options<span class=\"k\">.</span>theme<span class=\"k\">,</span>","                    renderLabelHtml<span class=\"k\">:</span><span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","                        <span class=\"k\">return</span> <span class=\"s\">'&lt;div class=\"edui-label %%-label\" style=\"font-family:'</span> <span class=\"k\">+</span>","                            utils<span class=\"k\">.</span>unhtml<span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">.</span>value<span class=\"k\">)</span> <span class=\"k\">+</span> <span class=\"s\">'\"&gt;'</span> <span class=\"k\">+</span> <span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">.</span>label <span class=\"k\">||</span> <span class=\"s\">''</span><span class=\"k\">)</span> <span class=\"k\">+</span> <span class=\"s\">'&lt;/div&gt;'</span><span class=\"k\">;</span>","                    <span class=\"k\">}</span>","                <span class=\"k\">}</span><span class=\"k\">);</span>","            <span class=\"k\">}</span><span class=\"k\">)(</span>ci<span class=\"k\">.</span>label <span class=\"k\">||</span> langLabel<span class=\"k\">,</span> ci<span class=\"k\">.</span>val<span class=\"k\">)</span>","        <span class=\"k\">}</span>","        <span class=\"k\">var</span> ui <span class=\"k\">=</span> <span class=\"k\">new</span> editorui<span class=\"k\">.</span>Combox<span class=\"k\">(</span><span class=\"k\">{</span>","            editor<span class=\"k\">:</span>editor<span class=\"k\">,</span>","            items<span class=\"k\">:</span>items<span class=\"k\">,</span>","            onselect<span class=\"k\">:</span><span class=\"k\">function</span> <span class=\"k\">(</span>t<span class=\"k\">,</span> index<span class=\"k\">)</span> <span class=\"k\">{</span>","                editor<span class=\"k\">.</span>execCommand<span class=\"k\">(</span><span class=\"s\">'FontFamily'</span><span class=\"k\">,</span> <span class=\"k\">this</span><span class=\"k\">.</span>items<span class=\"k\">[</span>index<span class=\"k\">].</span>value<span class=\"k\">);</span>","            <span class=\"k\">}</span><span class=\"k\">,</span>","            onbuttonclick<span class=\"k\">:</span><span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","                <span class=\"k\">this</span><span class=\"k\">.</span>showPopup<span class=\"k\">();</span>","            <span class=\"k\">}</span><span class=\"k\">,</span>","            title<span class=\"k\">:</span>title<span class=\"k\">,</span>","            initValue<span class=\"k\">:</span>title<span class=\"k\">,</span>","            className<span class=\"k\">:</span><span class=\"s\">'edui-for-fontfamily'</span><span class=\"k\">,</span>","            indexByValue<span class=\"k\">:</span><span class=\"k\">function</span> <span class=\"k\">(</span>value<span class=\"k\">)</span> <span class=\"k\">{</span>","                <span class=\"k\">if</span> <span class=\"k\">(</span>value<span class=\"k\">)</span> <span class=\"k\">{</span>","                    <span class=\"k\">for</span> <span class=\"k\">(</span><span class=\"k\">var</span> i <span class=\"k\">=</span> <span class=\"s\">0</span><span class=\"k\">,</span> ci<span class=\"k\">;</span> ci <span class=\"k\">=</span> <span class=\"k\">this</span><span class=\"k\">.</span>items<span class=\"k\">[</span>i<span class=\"k\">];</span> i<span class=\"k\">++)</span> <span class=\"k\">{</span>","                        <span class=\"k\">if</span> <span class=\"k\">(</span>ci<span class=\"k\">.</span>value<span class=\"k\">.</span>indexOf<span class=\"k\">(</span>value<span class=\"k\">)</span> <span class=\"k\">!=</span> <span class=\"k\">-</span><span class=\"s\">1</span><span class=\"k\">)</span>","                            <span class=\"k\">return</span> i<span class=\"k\">;</span>","                    <span class=\"k\">}</span>","                <span class=\"k\">}</span>","","                <span class=\"k\">return</span> <span class=\"k\">-</span><span class=\"s\">1</span><span class=\"k\">;</span>","            <span class=\"k\">}</span>","        <span class=\"k\">}</span><span class=\"k\">);</span>","        editorui<span class=\"k\">.</span>buttons<span class=\"k\">[</span><span class=\"s\">'fontfamily'</span><span class=\"k\">]</span> <span class=\"k\">=</span> ui<span class=\"k\">;</span>","        editor<span class=\"k\">.</span>addListener<span class=\"k\">(</span><span class=\"s\">'selectionchange'</span><span class=\"k\">,</span> <span class=\"k\">function</span> <span class=\"k\">(</span>type<span class=\"k\">,</span> causeByUi<span class=\"k\">,</span> uiReady<span class=\"k\">)</span> <span class=\"k\">{</span>","            <span class=\"k\">if</span> <span class=\"k\">(!</span>uiReady<span class=\"k\">)</span> <span class=\"k\">{</span>","                <span class=\"k\">var</span> state <span class=\"k\">=</span> editor<span class=\"k\">.</span>queryCommandState<span class=\"k\">(</span><span class=\"s\">'FontFamily'</span><span class=\"k\">);</span>","                <span class=\"k\">if</span> <span class=\"k\">(</span>state <span class=\"k\">==</span> <span class=\"k\">-</span><span class=\"s\">1</span><span class=\"k\">)</span> <span class=\"k\">{</span>","                    ui<span class=\"k\">.</span>setDisabled<span class=\"k\">(</span><span class=\"k\">true</span><span class=\"k\">);</span>","                <span class=\"k\">}</span> <span class=\"k\">else</span> <span class=\"k\">{</span>","                    ui<span class=\"k\">.</span>setDisabled<span class=\"k\">(</span><span class=\"k\">false</span><span class=\"k\">);</span>","                    <span class=\"k\">var</span> value <span class=\"k\">=</span> editor<span class=\"k\">.</span>queryCommandValue<span class=\"k\">(</span><span class=\"s\">'FontFamily'</span><span class=\"k\">);</span>","                    <span class=\"c\">//trace:1871 ie&#19979;&#20174;&#28304;&#30721;&#27169;&#24335;&#20999;&#25442;&#22238;&#26469;&#26102;&#65292;&#23383;&#20307;&#20250;&#24102;&#21333;&#24341;&#21495;&#65292;&#32780;&#19988;&#20250;&#26377;&#36887;&#21495;</span>","                    value <span class=\"k\">&amp;&amp;</span> <span class=\"k\">(</span>value <span class=\"k\">=</span> value<span class=\"k\">.</span>replace<span class=\"k\">(</span><span class=\"s\">/['\"]/g</span><span class=\"k\">,</span> <span class=\"s\">''</span><span class=\"k\">).</span>split<span class=\"k\">(</span><span class=\"s\">','</span><span class=\"k\">)[</span><span class=\"s\">0</span><span class=\"k\">]);</span>","                    ui<span class=\"k\">.</span>setValue<span class=\"k\">(</span>value<span class=\"k\">);</span>","","                <span class=\"k\">}</span>","            <span class=\"k\">}</span>","","        <span class=\"k\">}</span><span class=\"k\">);</span>","        <span class=\"k\">return</span> ui<span class=\"k\">;</span>","    <span class=\"k\">}</span><span class=\"k\">;</span>","","    editorui<span class=\"k\">.</span>fontsize <span class=\"k\">=</span> <span class=\"k\">function</span> <span class=\"k\">(</span>editor<span class=\"k\">,</span> list<span class=\"k\">,</span> title<span class=\"k\">)</span> <span class=\"k\">{</span>","        title <span class=\"k\">=</span> editor<span class=\"k\">.</span>options<span class=\"k\">.</span>labelMap<span class=\"k\">[</span><span class=\"s\">'fontsize'</span><span class=\"k\">]</span> <span class=\"k\">||</span> editor<span class=\"k\">.</span>getLang<span class=\"k\">(</span><span class=\"s\">\"labelMap.fontsize\"</span><span class=\"k\">)</span> <span class=\"k\">||</span> <span class=\"s\">''</span><span class=\"k\">;</span>","        list <span class=\"k\">=</span> list <span class=\"k\">||</span> editor<span class=\"k\">.</span>options<span class=\"k\">[</span><span class=\"s\">'fontsize'</span><span class=\"k\">]</span> <span class=\"k\">||</span> <span class=\"k\">[];</span>","        <span class=\"k\">if</span> <span class=\"k\">(!</span>list<span class=\"k\">.</span>length<span class=\"k\">)</span> <span class=\"k\">return</span><span class=\"k\">;</span>","        <span class=\"k\">var</span> items <span class=\"k\">=</span> <span class=\"k\">[];</span>","        <span class=\"k\">for</span> <span class=\"k\">(</span><span class=\"k\">var</span> i <span class=\"k\">=</span> <span class=\"s\">0</span><span class=\"k\">;</span> i <span class=\"k\">&lt;</span> list<span class=\"k\">.</span>length<span class=\"k\">;</span> i<span class=\"k\">++)</span> <span class=\"k\">{</span>","            <span class=\"k\">var</span> size <span class=\"k\">=</span> list<span class=\"k\">[</span>i<span class=\"k\">]</span> <span class=\"k\">+</span> <span class=\"s\">'px'</span><span class=\"k\">;</span>","            items<span class=\"k\">.</span>push<span class=\"k\">(</span><span class=\"k\">{</span>","                label<span class=\"k\">:</span>size<span class=\"k\">,</span>","                value<span class=\"k\">:</span>size<span class=\"k\">,</span>","                theme<span class=\"k\">:</span>editor<span class=\"k\">.</span>options<span class=\"k\">.</span>theme<span class=\"k\">,</span>","                renderLabelHtml<span class=\"k\">:</span><span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","                    <span class=\"k\">return</span> <span class=\"s\">'&lt;div class=\"edui-label %%-label\" style=\"line-height:1;font-size:'</span> <span class=\"k\">+</span>","                        <span class=\"k\">this</span><span class=\"k\">.</span>value <span class=\"k\">+</span> <span class=\"s\">'\"&gt;'</span> <span class=\"k\">+</span> <span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">.</span>label <span class=\"k\">||</span> <span class=\"s\">''</span><span class=\"k\">)</span> <span class=\"k\">+</span> <span class=\"s\">'&lt;/div&gt;'</span><span class=\"k\">;</span>","                <span class=\"k\">}</span>","            <span class=\"k\">}</span><span class=\"k\">);</span>","        <span class=\"k\">}</span>","        <span class=\"k\">var</span> ui <span class=\"k\">=</span> <span class=\"k\">new</span> editorui<span class=\"k\">.</span>Combox<span class=\"k\">(</span><span class=\"k\">{</span>","            editor<span class=\"k\">:</span>editor<span class=\"k\">,</span>","            items<span class=\"k\">:</span>items<span class=\"k\">,</span>","            title<span class=\"k\">:</span>title<span class=\"k\">,</span>","            initValue<span class=\"k\">:</span>title<span class=\"k\">,</span>","            onselect<span class=\"k\">:</span><span class=\"k\">function</span> <span class=\"k\">(</span>t<span class=\"k\">,</span> index<span class=\"k\">)</span> <span class=\"k\">{</span>","                editor<span class=\"k\">.</span>execCommand<span class=\"k\">(</span><span class=\"s\">'FontSize'</span><span class=\"k\">,</span> <span class=\"k\">this</span><span class=\"k\">.</span>items<span class=\"k\">[</span>index<span class=\"k\">].</span>value<span class=\"k\">);</span>","            <span class=\"k\">}</span><span class=\"k\">,</span>","            onbuttonclick<span class=\"k\">:</span><span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","                <span class=\"k\">this</span><span class=\"k\">.</span>showPopup<span class=\"k\">();</span>","            <span class=\"k\">}</span><span class=\"k\">,</span>","            className<span class=\"k\">:</span><span class=\"s\">'edui-for-fontsize'</span>","        <span class=\"k\">}</span><span class=\"k\">);</span>","        editorui<span class=\"k\">.</span>buttons<span class=\"k\">[</span><span class=\"s\">'fontsize'</span><span class=\"k\">]</span> <span class=\"k\">=</span> ui<span class=\"k\">;</span>","        editor<span class=\"k\">.</span>addListener<span class=\"k\">(</span><span class=\"s\">'selectionchange'</span><span class=\"k\">,</span> <span class=\"k\">function</span> <span class=\"k\">(</span>type<span class=\"k\">,</span> causeByUi<span class=\"k\">,</span> uiReady<span class=\"k\">)</span> <span class=\"k\">{</span>","            <span class=\"k\">if</span> <span class=\"k\">(!</span>uiReady<span class=\"k\">)</span> <span class=\"k\">{</span>","                <span class=\"k\">var</span> state <span class=\"k\">=</span> editor<span class=\"k\">.</span>queryCommandState<span class=\"k\">(</span><span class=\"s\">'FontSize'</span><span class=\"k\">);</span>","                <span class=\"k\">if</span> <span class=\"k\">(</span>state <span class=\"k\">==</span> <span class=\"k\">-</span><span class=\"s\">1</span><span class=\"k\">)</span> <span class=\"k\">{</span>","                    ui<span class=\"k\">.</span>setDisabled<span class=\"k\">(</span><span class=\"k\">true</span><span class=\"k\">);</span>","                <span class=\"k\">}</span> <span class=\"k\">else</span> <span class=\"k\">{</span>","                    ui<span class=\"k\">.</span>setDisabled<span class=\"k\">(</span><span class=\"k\">false</span><span class=\"k\">);</span>","                    ui<span class=\"k\">.</span>setValue<span class=\"k\">(</span>editor<span class=\"k\">.</span>queryCommandValue<span class=\"k\">(</span><span class=\"s\">'FontSize'</span><span class=\"k\">));</span>","                <span class=\"k\">}</span>","            <span class=\"k\">}</span>","","        <span class=\"k\">}</span><span class=\"k\">);</span>","        <span class=\"k\">return</span> ui<span class=\"k\">;</span>","    <span class=\"k\">}</span><span class=\"k\">;</span>","","    editorui<span class=\"k\">.</span>paragraph <span class=\"k\">=</span> <span class=\"k\">function</span> <span class=\"k\">(</span>editor<span class=\"k\">,</span> list<span class=\"k\">,</span> title<span class=\"k\">)</span> <span class=\"k\">{</span>","        title <span class=\"k\">=</span> editor<span class=\"k\">.</span>options<span class=\"k\">.</span>labelMap<span class=\"k\">[</span><span class=\"s\">'paragraph'</span><span class=\"k\">]</span> <span class=\"k\">||</span> editor<span class=\"k\">.</span>getLang<span class=\"k\">(</span><span class=\"s\">\"labelMap.paragraph\"</span><span class=\"k\">)</span> <span class=\"k\">||</span> <span class=\"s\">''</span><span class=\"k\">;</span>","        list <span class=\"k\">=</span> editor<span class=\"k\">.</span>options<span class=\"k\">[</span><span class=\"s\">'paragraph'</span><span class=\"k\">]</span> <span class=\"k\">||</span> <span class=\"k\">[];</span>","        <span class=\"k\">if</span> <span class=\"k\">(</span>utils<span class=\"k\">.</span>isEmptyObject<span class=\"k\">(</span>list<span class=\"k\">))</span> <span class=\"k\">return</span><span class=\"k\">;</span>","        <span class=\"k\">var</span> items <span class=\"k\">=</span> <span class=\"k\">[];</span>","        <span class=\"k\">for</span> <span class=\"k\">(</span><span class=\"k\">var</span> i <span class=\"k\">in</span> list<span class=\"k\">)</span> <span class=\"k\">{</span>","            items<span class=\"k\">.</span>push<span class=\"k\">(</span><span class=\"k\">{</span>","                value<span class=\"k\">:</span>i<span class=\"k\">,</span>","                label<span class=\"k\">:</span>list<span class=\"k\">[</span>i<span class=\"k\">]</span> <span class=\"k\">||</span> editor<span class=\"k\">.</span>getLang<span class=\"k\">(</span><span class=\"s\">\"paragraph\"</span><span class=\"k\">)[</span>i<span class=\"k\">],</span>","                theme<span class=\"k\">:</span>editor<span class=\"k\">.</span>options<span class=\"k\">.</span>theme<span class=\"k\">,</span>","                renderLabelHtml<span class=\"k\">:</span><span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","                    <span class=\"k\">return</span> <span class=\"s\">'&lt;div class=\"edui-label %%-label\"&gt;&lt;span class=\"edui-for-'</span> <span class=\"k\">+</span> <span class=\"k\">this</span><span class=\"k\">.</span>value <span class=\"k\">+</span> <span class=\"s\">'\"&gt;'</span> <span class=\"k\">+</span> <span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">.</span>label <span class=\"k\">||</span> <span class=\"s\">''</span><span class=\"k\">)</span> <span class=\"k\">+</span> <span class=\"s\">'&lt;/span&gt;&lt;/div&gt;'</span><span class=\"k\">;</span>","                <span class=\"k\">}</span>","            <span class=\"k\">}</span><span class=\"k\">)</span>","        <span class=\"k\">}</span>","        <span class=\"k\">var</span> ui <span class=\"k\">=</span> <span class=\"k\">new</span> editorui<span class=\"k\">.</span>Combox<span class=\"k\">(</span><span class=\"k\">{</span>","            editor<span class=\"k\">:</span>editor<span class=\"k\">,</span>","            items<span class=\"k\">:</span>items<span class=\"k\">,</span>","            title<span class=\"k\">:</span>title<span class=\"k\">,</span>","            initValue<span class=\"k\">:</span>title<span class=\"k\">,</span>","            className<span class=\"k\">:</span><span class=\"s\">'edui-for-paragraph'</span><span class=\"k\">,</span>","            onselect<span class=\"k\">:</span><span class=\"k\">function</span> <span class=\"k\">(</span>t<span class=\"k\">,</span> index<span class=\"k\">)</span> <span class=\"k\">{</span>","                editor<span class=\"k\">.</span>execCommand<span class=\"k\">(</span><span class=\"s\">'Paragraph'</span><span class=\"k\">,</span> <span class=\"k\">this</span><span class=\"k\">.</span>items<span class=\"k\">[</span>index<span class=\"k\">].</span>value<span class=\"k\">);</span>","            <span class=\"k\">}</span><span class=\"k\">,</span>","            onbuttonclick<span class=\"k\">:</span><span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","                <span class=\"k\">this</span><span class=\"k\">.</span>showPopup<span class=\"k\">();</span>","            <span class=\"k\">}</span>","        <span class=\"k\">}</span><span class=\"k\">);</span>","        editorui<span class=\"k\">.</span>buttons<span class=\"k\">[</span><span class=\"s\">'paragraph'</span><span class=\"k\">]</span> <span class=\"k\">=</span> ui<span class=\"k\">;</span>","        editor<span class=\"k\">.</span>addListener<span class=\"k\">(</span><span class=\"s\">'selectionchange'</span><span class=\"k\">,</span> <span class=\"k\">function</span> <span class=\"k\">(</span>type<span class=\"k\">,</span> causeByUi<span class=\"k\">,</span> uiReady<span class=\"k\">)</span> <span class=\"k\">{</span>","            <span class=\"k\">if</span> <span class=\"k\">(!</span>uiReady<span class=\"k\">)</span> <span class=\"k\">{</span>","                <span class=\"k\">var</span> state <span class=\"k\">=</span> editor<span class=\"k\">.</span>queryCommandState<span class=\"k\">(</span><span class=\"s\">'Paragraph'</span><span class=\"k\">);</span>","                <span class=\"k\">if</span> <span class=\"k\">(</span>state <span class=\"k\">==</span> <span class=\"k\">-</span><span class=\"s\">1</span><span class=\"k\">)</span> <span class=\"k\">{</span>","                    ui<span class=\"k\">.</span>setDisabled<span class=\"k\">(</span><span class=\"k\">true</span><span class=\"k\">);</span>","                <span class=\"k\">}</span> <span class=\"k\">else</span> <span class=\"k\">{</span>","                    ui<span class=\"k\">.</span>setDisabled<span class=\"k\">(</span><span class=\"k\">false</span><span class=\"k\">);</span>","                    <span class=\"k\">var</span> value <span class=\"k\">=</span> editor<span class=\"k\">.</span>queryCommandValue<span class=\"k\">(</span><span class=\"s\">'Paragraph'</span><span class=\"k\">);</span>","                    <span class=\"k\">var</span> index <span class=\"k\">=</span> ui<span class=\"k\">.</span>indexByValue<span class=\"k\">(</span>value<span class=\"k\">);</span>","                    <span class=\"k\">if</span> <span class=\"k\">(</span>index <span class=\"k\">!=</span> <span class=\"k\">-</span><span class=\"s\">1</span><span class=\"k\">)</span> <span class=\"k\">{</span>","                        ui<span class=\"k\">.</span>setValue<span class=\"k\">(</span>value<span class=\"k\">);</span>","                    <span class=\"k\">}</span> <span class=\"k\">else</span> <span class=\"k\">{</span>","                        ui<span class=\"k\">.</span>setValue<span class=\"k\">(</span>ui<span class=\"k\">.</span>initValue<span class=\"k\">);</span>","                    <span class=\"k\">}</span>","                <span class=\"k\">}</span>","            <span class=\"k\">}</span>","","        <span class=\"k\">}</span><span class=\"k\">);</span>","        <span class=\"k\">return</span> ui<span class=\"k\">;</span>","    <span class=\"k\">}</span><span class=\"k\">;</span>","","","    <span class=\"c\">//&#33258;&#23450;&#20041;&#26631;&#39064;</span>","    editorui<span class=\"k\">.</span>customstyle <span class=\"k\">=</span> <span class=\"k\">function</span> <span class=\"k\">(</span>editor<span class=\"k\">)</span> <span class=\"k\">{</span>","        <span class=\"k\">var</span> list <span class=\"k\">=</span> editor<span class=\"k\">.</span>options<span class=\"k\">[</span><span class=\"s\">'customstyle'</span><span class=\"k\">]</span> <span class=\"k\">||</span> <span class=\"k\">[],</span>","            title <span class=\"k\">=</span> editor<span class=\"k\">.</span>options<span class=\"k\">.</span>labelMap<span class=\"k\">[</span><span class=\"s\">'customstyle'</span><span class=\"k\">]</span> <span class=\"k\">||</span> editor<span class=\"k\">.</span>getLang<span class=\"k\">(</span><span class=\"s\">\"labelMap.customstyle\"</span><span class=\"k\">)</span> <span class=\"k\">||</span> <span class=\"s\">''</span><span class=\"k\">;</span>","        <span class=\"k\">if</span> <span class=\"k\">(!</span>list<span class=\"k\">.</span>length<span class=\"k\">)</span><span class=\"k\">return</span><span class=\"k\">;</span>","        <span class=\"k\">var</span> langCs <span class=\"k\">=</span> editor<span class=\"k\">.</span>getLang<span class=\"k\">(</span><span class=\"s\">'customstyle'</span><span class=\"k\">);</span>","        <span class=\"k\">for</span> <span class=\"k\">(</span><span class=\"k\">var</span> i <span class=\"k\">=</span> <span class=\"s\">0</span><span class=\"k\">,</span> items <span class=\"k\">=</span> <span class=\"k\">[],</span> t<span class=\"k\">;</span> t <span class=\"k\">=</span> list<span class=\"k\">[</span>i<span class=\"k\">++];)</span> <span class=\"k\">{</span>","            <span class=\"k\">(</span><span class=\"k\">function</span> <span class=\"k\">(</span>t<span class=\"k\">)</span> <span class=\"k\">{</span>","                <span class=\"k\">var</span> ck <span class=\"k\">=</span> <span class=\"k\">{}</span><span class=\"k\">;</span>","                ck<span class=\"k\">.</span>label <span class=\"k\">=</span> t<span class=\"k\">.</span>label <span class=\"k\">?</span> t<span class=\"k\">.</span>label <span class=\"k\">:</span> langCs<span class=\"k\">[</span>t<span class=\"k\">.</span>name<span class=\"k\">];</span>","                ck<span class=\"k\">.</span>style <span class=\"k\">=</span> t<span class=\"k\">.</span>style<span class=\"k\">;</span>","                ck<span class=\"k\">.</span>className <span class=\"k\">=</span> t<span class=\"k\">.</span>className<span class=\"k\">;</span>","                ck<span class=\"k\">.</span>tag <span class=\"k\">=</span> t<span class=\"k\">.</span>tag<span class=\"k\">;</span>","                items<span class=\"k\">.</span>push<span class=\"k\">(</span><span class=\"k\">{</span>","                    label<span class=\"k\">:</span>ck<span class=\"k\">.</span>label<span class=\"k\">,</span>","                    value<span class=\"k\">:</span>ck<span class=\"k\">,</span>","                    theme<span class=\"k\">:</span>editor<span class=\"k\">.</span>options<span class=\"k\">.</span>theme<span class=\"k\">,</span>","                    renderLabelHtml<span class=\"k\">:</span><span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","                        <span class=\"k\">return</span> <span class=\"s\">'&lt;div class=\"edui-label %%-label\"&gt;'</span> <span class=\"k\">+</span> <span class=\"s\">'&lt;'</span> <span class=\"k\">+</span> ck<span class=\"k\">.</span>tag <span class=\"k\">+</span> <span class=\"s\">' '</span> <span class=\"k\">+</span> <span class=\"k\">(</span>ck<span class=\"k\">.</span>className <span class=\"k\">?</span> <span class=\"s\">' class=\"'</span> <span class=\"k\">+</span> ck<span class=\"k\">.</span>className <span class=\"k\">+</span> <span class=\"s\">'\"'</span> <span class=\"k\">:</span> <span class=\"s\">\"\"</span><span class=\"k\">)</span>","                            <span class=\"k\">+</span> <span class=\"k\">(</span>ck<span class=\"k\">.</span>style <span class=\"k\">?</span> <span class=\"s\">' style=\"'</span> <span class=\"k\">+</span> ck<span class=\"k\">.</span>style <span class=\"k\">+</span> <span class=\"s\">'\"'</span> <span class=\"k\">:</span> <span class=\"s\">\"\"</span><span class=\"k\">)</span> <span class=\"k\">+</span> <span class=\"s\">'&gt;'</span> <span class=\"k\">+</span> ck<span class=\"k\">.</span>label <span class=\"k\">+</span> <span class=\"s\">\"&lt;</span><span class=\"t\">\\/</span><span class=\"s\">\"</span> <span class=\"k\">+</span> ck<span class=\"k\">.</span>tag <span class=\"k\">+</span> <span class=\"s\">\"&gt;\"</span>","                            <span class=\"k\">+</span> <span class=\"s\">'&lt;/div&gt;'</span><span class=\"k\">;</span>","                    <span class=\"k\">}</span>","                <span class=\"k\">}</span><span class=\"k\">);</span>","            <span class=\"k\">}</span><span class=\"k\">)(</span>t<span class=\"k\">);</span>","        <span class=\"k\">}</span>","","        <span class=\"k\">var</span> ui <span class=\"k\">=</span> <span class=\"k\">new</span> editorui<span class=\"k\">.</span>Combox<span class=\"k\">(</span><span class=\"k\">{</span>","            editor<span class=\"k\">:</span>editor<span class=\"k\">,</span>","            items<span class=\"k\">:</span>items<span class=\"k\">,</span>","            title<span class=\"k\">:</span>title<span class=\"k\">,</span>","            initValue<span class=\"k\">:</span>title<span class=\"k\">,</span>","            className<span class=\"k\">:</span><span class=\"s\">'edui-for-customstyle'</span><span class=\"k\">,</span>","            onselect<span class=\"k\">:</span><span class=\"k\">function</span> <span class=\"k\">(</span>t<span class=\"k\">,</span> index<span class=\"k\">)</span> <span class=\"k\">{</span>","                editor<span class=\"k\">.</span>execCommand<span class=\"k\">(</span><span class=\"s\">'customstyle'</span><span class=\"k\">,</span> <span class=\"k\">this</span><span class=\"k\">.</span>items<span class=\"k\">[</span>index<span class=\"k\">].</span>value<span class=\"k\">);</span>","            <span class=\"k\">}</span><span class=\"k\">,</span>","            onbuttonclick<span class=\"k\">:</span><span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","                <span class=\"k\">this</span><span class=\"k\">.</span>showPopup<span class=\"k\">();</span>","            <span class=\"k\">}</span><span class=\"k\">,</span>","            indexByValue<span class=\"k\">:</span><span class=\"k\">function</span> <span class=\"k\">(</span>value<span class=\"k\">)</span> <span class=\"k\">{</span>","                <span class=\"k\">for</span> <span class=\"k\">(</span><span class=\"k\">var</span> i <span class=\"k\">=</span> <span class=\"s\">0</span><span class=\"k\">,</span> ti<span class=\"k\">;</span> ti <span class=\"k\">=</span> <span class=\"k\">this</span><span class=\"k\">.</span>items<span class=\"k\">[</span>i<span class=\"k\">++];)</span> <span class=\"k\">{</span>","                    <span class=\"k\">if</span> <span class=\"k\">(</span>ti<span class=\"k\">.</span>label <span class=\"k\">==</span> value<span class=\"k\">)</span> <span class=\"k\">{</span>","                        <span class=\"k\">return</span> i <span class=\"k\">-</span> <span class=\"s\">1</span>","                    <span class=\"k\">}</span>","                <span class=\"k\">}</span>","                <span class=\"k\">return</span> <span class=\"k\">-</span><span class=\"s\">1</span><span class=\"k\">;</span>","            <span class=\"k\">}</span>","        <span class=\"k\">}</span><span class=\"k\">);</span>","        editorui<span class=\"k\">.</span>buttons<span class=\"k\">[</span><span class=\"s\">'customstyle'</span><span class=\"k\">]</span> <span class=\"k\">=</span> ui<span class=\"k\">;</span>","        editor<span class=\"k\">.</span>addListener<span class=\"k\">(</span><span class=\"s\">'selectionchange'</span><span class=\"k\">,</span> <span class=\"k\">function</span> <span class=\"k\">(</span>type<span class=\"k\">,</span> causeByUi<span class=\"k\">,</span> uiReady<span class=\"k\">)</span> <span class=\"k\">{</span>","            <span class=\"k\">if</span> <span class=\"k\">(!</span>uiReady<span class=\"k\">)</span> <span class=\"k\">{</span>","                <span class=\"k\">var</span> state <span class=\"k\">=</span> editor<span class=\"k\">.</span>queryCommandState<span class=\"k\">(</span><span class=\"s\">'customstyle'</span><span class=\"k\">);</span>","                <span class=\"k\">if</span> <span class=\"k\">(</span>state <span class=\"k\">==</span> <span class=\"k\">-</span><span class=\"s\">1</span><span class=\"k\">)</span> <span class=\"k\">{</span>","                    ui<span class=\"k\">.</span>setDisabled<span class=\"k\">(</span><span class=\"k\">true</span><span class=\"k\">);</span>","                <span class=\"k\">}</span> <span class=\"k\">else</span> <span class=\"k\">{</span>","                    ui<span class=\"k\">.</span>setDisabled<span class=\"k\">(</span><span class=\"k\">false</span><span class=\"k\">);</span>","                    <span class=\"k\">var</span> value <span class=\"k\">=</span> editor<span class=\"k\">.</span>queryCommandValue<span class=\"k\">(</span><span class=\"s\">'customstyle'</span><span class=\"k\">);</span>","                    <span class=\"k\">var</span> index <span class=\"k\">=</span> ui<span class=\"k\">.</span>indexByValue<span class=\"k\">(</span>value<span class=\"k\">);</span>","                    <span class=\"k\">if</span> <span class=\"k\">(</span>index <span class=\"k\">!=</span> <span class=\"k\">-</span><span class=\"s\">1</span><span class=\"k\">)</span> <span class=\"k\">{</span>","                        ui<span class=\"k\">.</span>setValue<span class=\"k\">(</span>value<span class=\"k\">);</span>","                    <span class=\"k\">}</span> <span class=\"k\">else</span> <span class=\"k\">{</span>","                        ui<span class=\"k\">.</span>setValue<span class=\"k\">(</span>ui<span class=\"k\">.</span>initValue<span class=\"k\">);</span>","                    <span class=\"k\">}</span>","                <span class=\"k\">}</span>","            <span class=\"k\">}</span>","","        <span class=\"k\">}</span><span class=\"k\">);</span>","        <span class=\"k\">return</span> ui<span class=\"k\">;</span>","    <span class=\"k\">}</span><span class=\"k\">;</span>","    editorui<span class=\"k\">.</span>inserttable <span class=\"k\">=</span> <span class=\"k\">function</span> <span class=\"k\">(</span>editor<span class=\"k\">,</span> iframeUrl<span class=\"k\">,</span> title<span class=\"k\">)</span> <span class=\"k\">{</span>","        title <span class=\"k\">=</span> editor<span class=\"k\">.</span>options<span class=\"k\">.</span>labelMap<span class=\"k\">[</span><span class=\"s\">'inserttable'</span><span class=\"k\">]</span> <span class=\"k\">||</span> editor<span class=\"k\">.</span>getLang<span class=\"k\">(</span><span class=\"s\">\"labelMap.inserttable\"</span><span class=\"k\">)</span> <span class=\"k\">||</span> <span class=\"s\">''</span><span class=\"k\">;</span>","        <span class=\"k\">var</span> ui <span class=\"k\">=</span> <span class=\"k\">new</span> editorui<span class=\"k\">.</span>TableButton<span class=\"k\">(</span><span class=\"k\">{</span>","            editor<span class=\"k\">:</span>editor<span class=\"k\">,</span>","            title<span class=\"k\">:</span>title<span class=\"k\">,</span>","            className<span class=\"k\">:</span><span class=\"s\">'edui-for-inserttable'</span><span class=\"k\">,</span>","            onpicktable<span class=\"k\">:</span><span class=\"k\">function</span> <span class=\"k\">(</span>t<span class=\"k\">,</span> numCols<span class=\"k\">,</span> numRows<span class=\"k\">)</span> <span class=\"k\">{</span>","                editor<span class=\"k\">.</span>execCommand<span class=\"k\">(</span><span class=\"s\">'InsertTable'</span><span class=\"k\">,</span> <span class=\"k\">{</span>numRows<span class=\"k\">:</span>numRows<span class=\"k\">,</span> numCols<span class=\"k\">:</span>numCols<span class=\"k\">,</span> border<span class=\"k\">:</span><span class=\"s\">1</span><span class=\"k\">}</span><span class=\"k\">);</span>","            <span class=\"k\">}</span><span class=\"k\">,</span>","            onbuttonclick<span class=\"k\">:</span><span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","                <span class=\"k\">this</span><span class=\"k\">.</span>showPopup<span class=\"k\">();</span>","            <span class=\"k\">}</span>","        <span class=\"k\">}</span><span class=\"k\">);</span>","        editorui<span class=\"k\">.</span>buttons<span class=\"k\">[</span><span class=\"s\">'inserttable'</span><span class=\"k\">]</span> <span class=\"k\">=</span> ui<span class=\"k\">;</span>","        editor<span class=\"k\">.</span>addListener<span class=\"k\">(</span><span class=\"s\">'selectionchange'</span><span class=\"k\">,</span> <span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","            ui<span class=\"k\">.</span>setDisabled<span class=\"k\">(</span>editor<span class=\"k\">.</span>queryCommandState<span class=\"k\">(</span><span class=\"s\">'inserttable'</span><span class=\"k\">)</span> <span class=\"k\">==</span> <span class=\"k\">-</span><span class=\"s\">1</span><span class=\"k\">);</span>","        <span class=\"k\">}</span><span class=\"k\">);</span>","        <span class=\"k\">return</span> ui<span class=\"k\">;</span>","    <span class=\"k\">}</span><span class=\"k\">;</span>","","    editorui<span class=\"k\">.</span>lineheight <span class=\"k\">=</span> <span class=\"k\">function</span> <span class=\"k\">(</span>editor<span class=\"k\">)</span> <span class=\"k\">{</span>","        <span class=\"k\">var</span> val <span class=\"k\">=</span> editor<span class=\"k\">.</span>options<span class=\"k\">.</span>lineheight <span class=\"k\">||</span> <span class=\"k\">[];</span>","        <span class=\"k\">if</span> <span class=\"k\">(!</span>val<span class=\"k\">.</span>length<span class=\"k\">)</span><span class=\"k\">return</span><span class=\"k\">;</span>","        <span class=\"k\">for</span> <span class=\"k\">(</span><span class=\"k\">var</span> i <span class=\"k\">=</span> <span class=\"s\">0</span><span class=\"k\">,</span> ci<span class=\"k\">,</span> items <span class=\"k\">=</span> <span class=\"k\">[];</span> ci <span class=\"k\">=</span> val<span class=\"k\">[</span>i<span class=\"k\">++];)</span> <span class=\"k\">{</span>","            items<span class=\"k\">.</span>push<span class=\"k\">(</span><span class=\"k\">{</span>","                <span class=\"c\">//todo:&#20889;&#27515;&#20102;</span>","                label<span class=\"k\">:</span>ci<span class=\"k\">,</span>","                value<span class=\"k\">:</span>ci<span class=\"k\">,</span>","                theme<span class=\"k\">:</span>editor<span class=\"k\">.</span>options<span class=\"k\">.</span>theme<span class=\"k\">,</span>","                onclick<span class=\"k\">:</span><span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","                    editor<span class=\"k\">.</span>execCommand<span class=\"k\">(</span><span class=\"s\">\"lineheight\"</span><span class=\"k\">,</span> <span class=\"k\">this</span><span class=\"k\">.</span>value<span class=\"k\">);</span>","                <span class=\"k\">}</span>","            <span class=\"k\">}</span><span class=\"k\">)</span>","        <span class=\"k\">}</span>","        <span class=\"k\">var</span> ui <span class=\"k\">=</span> <span class=\"k\">new</span> editorui<span class=\"k\">.</span>MenuButton<span class=\"k\">(</span><span class=\"k\">{</span>","            editor<span class=\"k\">:</span>editor<span class=\"k\">,</span>","            className<span class=\"k\">:</span><span class=\"s\">'edui-for-lineheight'</span><span class=\"k\">,</span>","            title<span class=\"k\">:</span>editor<span class=\"k\">.</span>options<span class=\"k\">.</span>labelMap<span class=\"k\">[</span><span class=\"s\">'lineheight'</span><span class=\"k\">]</span> <span class=\"k\">||</span> editor<span class=\"k\">.</span>getLang<span class=\"k\">(</span><span class=\"s\">\"labelMap.lineheight\"</span><span class=\"k\">)</span> <span class=\"k\">||</span> <span class=\"s\">''</span><span class=\"k\">,</span>","            items<span class=\"k\">:</span>items<span class=\"k\">,</span>","            onbuttonclick<span class=\"k\">:</span><span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","                <span class=\"k\">var</span> value <span class=\"k\">=</span> editor<span class=\"k\">.</span>queryCommandValue<span class=\"k\">(</span><span class=\"s\">'LineHeight'</span><span class=\"k\">)</span> <span class=\"k\">||</span> <span class=\"k\">this</span><span class=\"k\">.</span>value<span class=\"k\">;</span>","                editor<span class=\"k\">.</span>execCommand<span class=\"k\">(</span><span class=\"s\">\"LineHeight\"</span><span class=\"k\">,</span> value<span class=\"k\">);</span>","            <span class=\"k\">}</span>","        <span class=\"k\">}</span><span class=\"k\">);</span>","        editorui<span class=\"k\">.</span>buttons<span class=\"k\">[</span><span class=\"s\">'lineheight'</span><span class=\"k\">]</span> <span class=\"k\">=</span> ui<span class=\"k\">;</span>","        editor<span class=\"k\">.</span>addListener<span class=\"k\">(</span><span class=\"s\">'selectionchange'</span><span class=\"k\">,</span> <span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","            <span class=\"k\">var</span> state <span class=\"k\">=</span> editor<span class=\"k\">.</span>queryCommandState<span class=\"k\">(</span><span class=\"s\">'LineHeight'</span><span class=\"k\">);</span>","            <span class=\"k\">if</span> <span class=\"k\">(</span>state <span class=\"k\">==</span> <span class=\"k\">-</span><span class=\"s\">1</span><span class=\"k\">)</span> <span class=\"k\">{</span>","                ui<span class=\"k\">.</span>setDisabled<span class=\"k\">(</span><span class=\"k\">true</span><span class=\"k\">);</span>","            <span class=\"k\">}</span> <span class=\"k\">else</span> <span class=\"k\">{</span>","                ui<span class=\"k\">.</span>setDisabled<span class=\"k\">(</span><span class=\"k\">false</span><span class=\"k\">);</span>","                <span class=\"k\">var</span> value <span class=\"k\">=</span> editor<span class=\"k\">.</span>queryCommandValue<span class=\"k\">(</span><span class=\"s\">'LineHeight'</span><span class=\"k\">);</span>","                value <span class=\"k\">&amp;&amp;</span> ui<span class=\"k\">.</span>setValue<span class=\"k\">((</span>value <span class=\"k\">+</span> <span class=\"s\">''</span><span class=\"k\">).</span>replace<span class=\"k\">(</span><span class=\"s\">/cm/</span><span class=\"k\">,</span> <span class=\"s\">''</span><span class=\"k\">));</span>","                ui<span class=\"k\">.</span>setChecked<span class=\"k\">(</span>state<span class=\"k\">)</span>","            <span class=\"k\">}</span>","        <span class=\"k\">}</span><span class=\"k\">);</span>","        <span class=\"k\">return</span> ui<span class=\"k\">;</span>","    <span class=\"k\">}</span><span class=\"k\">;</span>","","    <span class=\"k\">var</span> rowspacings <span class=\"k\">=</span> <span class=\"k\">[</span><span class=\"s\">'top'</span><span class=\"k\">,</span> <span class=\"s\">'bottom'</span><span class=\"k\">];</span>","    <span class=\"k\">for</span> <span class=\"k\">(</span><span class=\"k\">var</span> r <span class=\"k\">=</span> <span class=\"s\">0</span><span class=\"k\">,</span> ri<span class=\"k\">;</span> ri <span class=\"k\">=</span> rowspacings<span class=\"k\">[</span>r<span class=\"k\">++];)</span> <span class=\"k\">{</span>","        <span class=\"k\">(</span><span class=\"k\">function</span> <span class=\"k\">(</span>cmd<span class=\"k\">)</span> <span class=\"k\">{</span>","            editorui<span class=\"k\">[</span><span class=\"s\">'rowspacing'</span> <span class=\"k\">+</span> cmd<span class=\"k\">]</span> <span class=\"k\">=</span> <span class=\"k\">function</span> <span class=\"k\">(</span>editor<span class=\"k\">)</span> <span class=\"k\">{</span>","                <span class=\"k\">var</span> val <span class=\"k\">=</span> editor<span class=\"k\">.</span>options<span class=\"k\">[</span><span class=\"s\">'rowspacing'</span> <span class=\"k\">+</span> cmd<span class=\"k\">]</span> <span class=\"k\">||</span> <span class=\"k\">[];</span>","                <span class=\"k\">if</span> <span class=\"k\">(!</span>val<span class=\"k\">.</span>length<span class=\"k\">)</span> <span class=\"k\">return</span> <span class=\"k\">null</span><span class=\"k\">;</span>","                <span class=\"k\">for</span> <span class=\"k\">(</span><span class=\"k\">var</span> i <span class=\"k\">=</span> <span class=\"s\">0</span><span class=\"k\">,</span> ci<span class=\"k\">,</span> items <span class=\"k\">=</span> <span class=\"k\">[];</span> ci <span class=\"k\">=</span> val<span class=\"k\">[</span>i<span class=\"k\">++];)</span> <span class=\"k\">{</span>","                    items<span class=\"k\">.</span>push<span class=\"k\">(</span><span class=\"k\">{</span>","                        label<span class=\"k\">:</span>ci<span class=\"k\">,</span>","                        value<span class=\"k\">:</span>ci<span class=\"k\">,</span>","                        theme<span class=\"k\">:</span>editor<span class=\"k\">.</span>options<span class=\"k\">.</span>theme<span class=\"k\">,</span>","                        onclick<span class=\"k\">:</span><span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","                            editor<span class=\"k\">.</span>execCommand<span class=\"k\">(</span><span class=\"s\">\"rowspacing\"</span><span class=\"k\">,</span> <span class=\"k\">this</span><span class=\"k\">.</span>value<span class=\"k\">,</span> cmd<span class=\"k\">);</span>","                        <span class=\"k\">}</span>","                    <span class=\"k\">}</span><span class=\"k\">)</span>","                <span class=\"k\">}</span>","                <span class=\"k\">var</span> ui <span class=\"k\">=</span> <span class=\"k\">new</span> editorui<span class=\"k\">.</span>MenuButton<span class=\"k\">(</span><span class=\"k\">{</span>","                    editor<span class=\"k\">:</span>editor<span class=\"k\">,</span>","                    className<span class=\"k\">:</span><span class=\"s\">'edui-for-rowspacing'</span> <span class=\"k\">+</span> cmd<span class=\"k\">,</span>","                    title<span class=\"k\">:</span>editor<span class=\"k\">.</span>options<span class=\"k\">.</span>labelMap<span class=\"k\">[</span><span class=\"s\">'rowspacing'</span> <span class=\"k\">+</span> cmd<span class=\"k\">]</span> <span class=\"k\">||</span> editor<span class=\"k\">.</span>getLang<span class=\"k\">(</span><span class=\"s\">\"labelMap.rowspacing\"</span> <span class=\"k\">+</span> cmd<span class=\"k\">)</span> <span class=\"k\">||</span> <span class=\"s\">''</span><span class=\"k\">,</span>","                    items<span class=\"k\">:</span>items<span class=\"k\">,</span>","                    onbuttonclick<span class=\"k\">:</span><span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","                        <span class=\"k\">var</span> value <span class=\"k\">=</span> editor<span class=\"k\">.</span>queryCommandValue<span class=\"k\">(</span><span class=\"s\">'rowspacing'</span><span class=\"k\">,</span> cmd<span class=\"k\">)</span> <span class=\"k\">||</span> <span class=\"k\">this</span><span class=\"k\">.</span>value<span class=\"k\">;</span>","                        editor<span class=\"k\">.</span>execCommand<span class=\"k\">(</span><span class=\"s\">\"rowspacing\"</span><span class=\"k\">,</span> value<span class=\"k\">,</span> cmd<span class=\"k\">);</span>","                    <span class=\"k\">}</span>","                <span class=\"k\">}</span><span class=\"k\">);</span>","                editorui<span class=\"k\">.</span>buttons<span class=\"k\">[</span>cmd<span class=\"k\">]</span> <span class=\"k\">=</span> ui<span class=\"k\">;</span>","                editor<span class=\"k\">.</span>addListener<span class=\"k\">(</span><span class=\"s\">'selectionchange'</span><span class=\"k\">,</span> <span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","                    <span class=\"k\">var</span> state <span class=\"k\">=</span> editor<span class=\"k\">.</span>queryCommandState<span class=\"k\">(</span><span class=\"s\">'rowspacing'</span><span class=\"k\">,</span> cmd<span class=\"k\">);</span>","                    <span class=\"k\">if</span> <span class=\"k\">(</span>state <span class=\"k\">==</span> <span class=\"k\">-</span><span class=\"s\">1</span><span class=\"k\">)</span> <span class=\"k\">{</span>","                        ui<span class=\"k\">.</span>setDisabled<span class=\"k\">(</span><span class=\"k\">true</span><span class=\"k\">);</span>","                    <span class=\"k\">}</span> <span class=\"k\">else</span> <span class=\"k\">{</span>","                        ui<span class=\"k\">.</span>setDisabled<span class=\"k\">(</span><span class=\"k\">false</span><span class=\"k\">);</span>","                        <span class=\"k\">var</span> value <span class=\"k\">=</span> editor<span class=\"k\">.</span>queryCommandValue<span class=\"k\">(</span><span class=\"s\">'rowspacing'</span><span class=\"k\">,</span> cmd<span class=\"k\">);</span>","                        value <span class=\"k\">&amp;&amp;</span> ui<span class=\"k\">.</span>setValue<span class=\"k\">((</span>value <span class=\"k\">+</span> <span class=\"s\">''</span><span class=\"k\">).</span>replace<span class=\"k\">(</span><span class=\"s\">/%/</span><span class=\"k\">,</span> <span class=\"s\">''</span><span class=\"k\">));</span>","                        ui<span class=\"k\">.</span>setChecked<span class=\"k\">(</span>state<span class=\"k\">)</span>","                    <span class=\"k\">}</span>","                <span class=\"k\">}</span><span class=\"k\">);</span>","                <span class=\"k\">return</span> ui<span class=\"k\">;</span>","            <span class=\"k\">}</span>","        <span class=\"k\">}</span><span class=\"k\">)(</span>ri<span class=\"k\">)</span>","    <span class=\"k\">}</span>","    <span class=\"c\">//&#26377;&#24207;&#65292;&#26080;&#24207;&#21015;&#34920;</span>","    <span class=\"k\">var</span> lists <span class=\"k\">=</span> <span class=\"k\">[</span><span class=\"s\">'insertorderedlist'</span><span class=\"k\">,</span> <span class=\"s\">'insertunorderedlist'</span><span class=\"k\">];</span>","    <span class=\"k\">for</span> <span class=\"k\">(</span><span class=\"k\">var</span> l <span class=\"k\">=</span> <span class=\"s\">0</span><span class=\"k\">,</span> cl<span class=\"k\">;</span> cl <span class=\"k\">=</span> lists<span class=\"k\">[</span>l<span class=\"k\">++];)</span> <span class=\"k\">{</span>","        <span class=\"k\">(</span><span class=\"k\">function</span> <span class=\"k\">(</span>cmd<span class=\"k\">)</span> <span class=\"k\">{</span>","            editorui<span class=\"k\">[</span>cmd<span class=\"k\">]</span> <span class=\"k\">=</span> <span class=\"k\">function</span> <span class=\"k\">(</span>editor<span class=\"k\">)</span> <span class=\"k\">{</span>","                <span class=\"k\">var</span> vals <span class=\"k\">=</span> editor<span class=\"k\">.</span>options<span class=\"k\">[</span>cmd<span class=\"k\">],</span>","                    _onMenuClick <span class=\"k\">=</span> <span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","                        editor<span class=\"k\">.</span>execCommand<span class=\"k\">(</span>cmd<span class=\"k\">,</span> <span class=\"k\">this</span><span class=\"k\">.</span>value<span class=\"k\">);</span>","                    <span class=\"k\">}</span><span class=\"k\">,</span> items <span class=\"k\">=</span> <span class=\"k\">[];</span>","                <span class=\"k\">for</span> <span class=\"k\">(</span><span class=\"k\">var</span> i <span class=\"k\">in</span> vals<span class=\"k\">)</span> <span class=\"k\">{</span>","                    items<span class=\"k\">.</span>push<span class=\"k\">(</span><span class=\"k\">{</span>","                        label<span class=\"k\">:</span>vals<span class=\"k\">[</span>i<span class=\"k\">]</span> <span class=\"k\">||</span> editor<span class=\"k\">.</span>getLang<span class=\"k\">()[</span>cmd<span class=\"k\">][</span>i<span class=\"k\">]</span> <span class=\"k\">||</span> <span class=\"s\">\"\"</span><span class=\"k\">,</span>","                        value<span class=\"k\">:</span>i<span class=\"k\">,</span>","                        theme<span class=\"k\">:</span>editor<span class=\"k\">.</span>options<span class=\"k\">.</span>theme<span class=\"k\">,</span>","                        onclick<span class=\"k\">:</span>_onMenuClick","                    <span class=\"k\">}</span><span class=\"k\">)</span>","                <span class=\"k\">}</span>","                <span class=\"k\">var</span> ui <span class=\"k\">=</span> <span class=\"k\">new</span> editorui<span class=\"k\">.</span>MenuButton<span class=\"k\">(</span><span class=\"k\">{</span>","                    editor<span class=\"k\">:</span>editor<span class=\"k\">,</span>","                    className<span class=\"k\">:</span><span class=\"s\">'edui-for-'</span> <span class=\"k\">+</span> cmd<span class=\"k\">,</span>","                    title<span class=\"k\">:</span>editor<span class=\"k\">.</span>getLang<span class=\"k\">(</span><span class=\"s\">\"labelMap.\"</span> <span class=\"k\">+</span> cmd<span class=\"k\">)</span> <span class=\"k\">||</span> <span class=\"s\">''</span><span class=\"k\">,</span>","                    <span class=\"s\">'items'</span><span class=\"k\">:</span>items<span class=\"k\">,</span>","                    onbuttonclick<span class=\"k\">:</span><span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","                        <span class=\"k\">var</span> value <span class=\"k\">=</span> editor<span class=\"k\">.</span>queryCommandValue<span class=\"k\">(</span>cmd<span class=\"k\">)</span> <span class=\"k\">||</span> <span class=\"k\">this</span><span class=\"k\">.</span>value<span class=\"k\">;</span>","                        editor<span class=\"k\">.</span>execCommand<span class=\"k\">(</span>cmd<span class=\"k\">,</span> value<span class=\"k\">);</span>","                    <span class=\"k\">}</span>","                <span class=\"k\">}</span><span class=\"k\">);</span>","                editorui<span class=\"k\">.</span>buttons<span class=\"k\">[</span>cmd<span class=\"k\">]</span> <span class=\"k\">=</span> ui<span class=\"k\">;</span>","                editor<span class=\"k\">.</span>addListener<span class=\"k\">(</span><span class=\"s\">'selectionchange'</span><span class=\"k\">,</span> <span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","                    <span class=\"k\">var</span> state <span class=\"k\">=</span> editor<span class=\"k\">.</span>queryCommandState<span class=\"k\">(</span>cmd<span class=\"k\">);</span>","                    <span class=\"k\">if</span> <span class=\"k\">(</span>state <span class=\"k\">==</span> <span class=\"k\">-</span><span class=\"s\">1</span><span class=\"k\">)</span> <span class=\"k\">{</span>","                        ui<span class=\"k\">.</span>setDisabled<span class=\"k\">(</span><span class=\"k\">true</span><span class=\"k\">);</span>","                    <span class=\"k\">}</span> <span class=\"k\">else</span> <span class=\"k\">{</span>","                        ui<span class=\"k\">.</span>setDisabled<span class=\"k\">(</span><span class=\"k\">false</span><span class=\"k\">);</span>","                        <span class=\"k\">var</span> value <span class=\"k\">=</span> editor<span class=\"k\">.</span>queryCommandValue<span class=\"k\">(</span>cmd<span class=\"k\">);</span>","                        ui<span class=\"k\">.</span>setValue<span class=\"k\">(</span>value<span class=\"k\">);</span>","                        ui<span class=\"k\">.</span>setChecked<span class=\"k\">(</span>state<span class=\"k\">)</span>","                    <span class=\"k\">}</span>","                <span class=\"k\">}</span><span class=\"k\">);</span>","                <span class=\"k\">return</span> ui<span class=\"k\">;</span>","            <span class=\"k\">}</span><span class=\"k\">;</span>","        <span class=\"k\">}</span><span class=\"k\">)(</span>cl<span class=\"k\">)</span>","    <span class=\"k\">}</span>","","    editorui<span class=\"k\">.</span>fullscreen <span class=\"k\">=</span> <span class=\"k\">function</span> <span class=\"k\">(</span>editor<span class=\"k\">,</span> title<span class=\"k\">)</span> <span class=\"k\">{</span>","        title <span class=\"k\">=</span> editor<span class=\"k\">.</span>options<span class=\"k\">.</span>labelMap<span class=\"k\">[</span><span class=\"s\">'fullscreen'</span><span class=\"k\">]</span> <span class=\"k\">||</span> editor<span class=\"k\">.</span>getLang<span class=\"k\">(</span><span class=\"s\">\"labelMap.fullscreen\"</span><span class=\"k\">)</span> <span class=\"k\">||</span> <span class=\"s\">''</span><span class=\"k\">;</span>","        <span class=\"k\">var</span> ui <span class=\"k\">=</span> <span class=\"k\">new</span> editorui<span class=\"k\">.</span>Button<span class=\"k\">(</span><span class=\"k\">{</span>","            className<span class=\"k\">:</span><span class=\"s\">'edui-for-fullscreen'</span><span class=\"k\">,</span>","            title<span class=\"k\">:</span>title<span class=\"k\">,</span>","            theme<span class=\"k\">:</span>editor<span class=\"k\">.</span>options<span class=\"k\">.</span>theme<span class=\"k\">,</span>","            onclick<span class=\"k\">:</span><span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","                <span class=\"k\">if</span> <span class=\"k\">(</span>editor<span class=\"k\">.</span>ui<span class=\"k\">)</span> <span class=\"k\">{</span>","                    editor<span class=\"k\">.</span>ui<span class=\"k\">.</span>setFullScreen<span class=\"k\">(!</span>editor<span class=\"k\">.</span>ui<span class=\"k\">.</span>isFullScreen<span class=\"k\">());</span>","                <span class=\"k\">}</span>","                <span class=\"k\">this</span><span class=\"k\">.</span>setChecked<span class=\"k\">(</span>editor<span class=\"k\">.</span>ui<span class=\"k\">.</span>isFullScreen<span class=\"k\">());</span>","            <span class=\"k\">}</span>","        <span class=\"k\">}</span><span class=\"k\">);</span>","        editorui<span class=\"k\">.</span>buttons<span class=\"k\">[</span><span class=\"s\">'fullscreen'</span><span class=\"k\">]</span> <span class=\"k\">=</span> ui<span class=\"k\">;</span>","        editor<span class=\"k\">.</span>addListener<span class=\"k\">(</span><span class=\"s\">'selectionchange'</span><span class=\"k\">,</span> <span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","            <span class=\"k\">var</span> state <span class=\"k\">=</span> editor<span class=\"k\">.</span>queryCommandState<span class=\"k\">(</span><span class=\"s\">'fullscreen'</span><span class=\"k\">);</span>","            ui<span class=\"k\">.</span>setDisabled<span class=\"k\">(</span>state <span class=\"k\">==</span> <span class=\"k\">-</span><span class=\"s\">1</span><span class=\"k\">);</span>","            ui<span class=\"k\">.</span>setChecked<span class=\"k\">(</span>editor<span class=\"k\">.</span>ui<span class=\"k\">.</span>isFullScreen<span class=\"k\">());</span>","        <span class=\"k\">}</span><span class=\"k\">);</span>","        <span class=\"k\">return</span> ui<span class=\"k\">;</span>","    <span class=\"k\">}</span><span class=\"k\">;</span>","","    <span class=\"c\">// &#34920;&#24773;</span>","    editorui<span class=\"k\">[</span><span class=\"s\">\"emotion\"</span><span class=\"k\">]</span> <span class=\"k\">=</span> <span class=\"k\">function</span> <span class=\"k\">(</span>editor<span class=\"k\">,</span> iframeUrl<span class=\"k\">)</span> <span class=\"k\">{</span>","        <span class=\"k\">var</span> cmd <span class=\"k\">=</span> <span class=\"s\">\"emotion\"</span><span class=\"k\">;</span>","        <span class=\"k\">var</span> ui <span class=\"k\">=</span> <span class=\"k\">new</span> editorui<span class=\"k\">.</span>MultiMenuPop<span class=\"k\">(</span><span class=\"k\">{</span>","            title<span class=\"k\">:</span>editor<span class=\"k\">.</span>options<span class=\"k\">.</span>labelMap<span class=\"k\">[</span>cmd<span class=\"k\">]</span> <span class=\"k\">||</span> editor<span class=\"k\">.</span>getLang<span class=\"k\">(</span><span class=\"s\">\"labelMap.\"</span> <span class=\"k\">+</span> cmd <span class=\"k\">+</span> <span class=\"s\">\"\"</span><span class=\"k\">)</span> <span class=\"k\">||</span> <span class=\"s\">''</span><span class=\"k\">,</span>","            editor<span class=\"k\">:</span>editor<span class=\"k\">,</span>","            className<span class=\"k\">:</span><span class=\"s\">'edui-for-'</span> <span class=\"k\">+</span> cmd<span class=\"k\">,</span>","            iframeUrl<span class=\"k\">:</span>editor<span class=\"k\">.</span>ui<span class=\"k\">.</span>mapUrl<span class=\"k\">(</span>iframeUrl <span class=\"k\">||</span> <span class=\"k\">(</span>editor<span class=\"k\">.</span>options<span class=\"k\">.</span>iframeUrlMap <span class=\"k\">||</span> <span class=\"k\">{}</span><span class=\"k\">)[</span>cmd<span class=\"k\">]</span> <span class=\"k\">||</span> iframeUrlMap<span class=\"k\">[</span>cmd<span class=\"k\">])</span>","        <span class=\"k\">}</span><span class=\"k\">);</span>","        editorui<span class=\"k\">.</span>buttons<span class=\"k\">[</span>cmd<span class=\"k\">]</span> <span class=\"k\">=</span> ui<span class=\"k\">;</span>","","        editor<span class=\"k\">.</span>addListener<span class=\"k\">(</span><span class=\"s\">'selectionchange'</span><span class=\"k\">,</span> <span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","            ui<span class=\"k\">.</span>setDisabled<span class=\"k\">(</span>editor<span class=\"k\">.</span>queryCommandState<span class=\"k\">(</span>cmd<span class=\"k\">)</span> <span class=\"k\">==</span> <span class=\"k\">-</span><span class=\"s\">1</span><span class=\"k\">)</span>","        <span class=\"k\">}</span><span class=\"k\">);</span>","        <span class=\"k\">return</span> ui<span class=\"k\">;</span>","    <span class=\"k\">}</span><span class=\"k\">;</span>","","    editorui<span class=\"k\">.</span>autotypeset <span class=\"k\">=</span> <span class=\"k\">function</span> <span class=\"k\">(</span>editor<span class=\"k\">)</span> <span class=\"k\">{</span>","        <span class=\"k\">var</span> ui <span class=\"k\">=</span> <span class=\"k\">new</span> editorui<span class=\"k\">.</span>AutoTypeSetButton<span class=\"k\">(</span><span class=\"k\">{</span>","            editor<span class=\"k\">:</span>editor<span class=\"k\">,</span>","            title<span class=\"k\">:</span>editor<span class=\"k\">.</span>options<span class=\"k\">.</span>labelMap<span class=\"k\">[</span><span class=\"s\">'autotypeset'</span><span class=\"k\">]</span> <span class=\"k\">||</span> editor<span class=\"k\">.</span>getLang<span class=\"k\">(</span><span class=\"s\">\"labelMap.autotypeset\"</span><span class=\"k\">)</span> <span class=\"k\">||</span> <span class=\"s\">''</span><span class=\"k\">,</span>","            className<span class=\"k\">:</span><span class=\"s\">'edui-for-autotypeset'</span><span class=\"k\">,</span>","            onbuttonclick<span class=\"k\">:</span><span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","                editor<span class=\"k\">.</span>execCommand<span class=\"k\">(</span><span class=\"s\">'autotypeset'</span><span class=\"k\">)</span>","            <span class=\"k\">}</span>","        <span class=\"k\">}</span><span class=\"k\">);</span>","        editorui<span class=\"k\">.</span>buttons<span class=\"k\">[</span><span class=\"s\">'autotypeset'</span><span class=\"k\">]</span> <span class=\"k\">=</span> ui<span class=\"k\">;</span>","        editor<span class=\"k\">.</span>addListener<span class=\"k\">(</span><span class=\"s\">'selectionchange'</span><span class=\"k\">,</span> <span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","            ui<span class=\"k\">.</span>setDisabled<span class=\"k\">(</span>editor<span class=\"k\">.</span>queryCommandState<span class=\"k\">(</span><span class=\"s\">'autotypeset'</span><span class=\"k\">)</span> <span class=\"k\">==</span> <span class=\"k\">-</span><span class=\"s\">1</span><span class=\"k\">);</span>","        <span class=\"k\">}</span><span class=\"k\">);</span>","        <span class=\"k\">return</span> ui<span class=\"k\">;</span>","    <span class=\"k\">}</span><span class=\"k\">;</span>","","<span class=\"k\">}</span><span class=\"k\">)();</span>"];
_$jscoverage['ui/editorui.js'][4]++;
(function () {
  _$jscoverage['ui/editorui.js'][5]++;
  var utils = baidu.editor.utils;
  _$jscoverage['ui/editorui.js'][6]++;
  var editorui = baidu.editor.ui;
  _$jscoverage['ui/editorui.js'][7]++;
  var _Dialog = editorui.Dialog;
  _$jscoverage['ui/editorui.js'][8]++;
  editorui.buttons = {};
  _$jscoverage['ui/editorui.js'][10]++;
  editorui.Dialog = (function (options) {
  _$jscoverage['ui/editorui.js'][11]++;
  var dialog = new _Dialog(options);
  _$jscoverage['ui/editorui.js'][12]++;
  dialog.addListener("hide", (function () {
  _$jscoverage['ui/editorui.js'][14]++;
  if (dialog.editor) {
    _$jscoverage['ui/editorui.js'][15]++;
    var editor = dialog.editor;
    _$jscoverage['ui/editorui.js'][16]++;
    try {
      _$jscoverage['ui/editorui.js'][17]++;
      if (browser.gecko) {
        _$jscoverage['ui/editorui.js'][18]++;
        var y = editor.window.scrollY, x = editor.window.scrollX;
        _$jscoverage['ui/editorui.js'][20]++;
        editor.body.focus();
        _$jscoverage['ui/editorui.js'][21]++;
        editor.window.scrollTo(x, y);
      }
      else {
        _$jscoverage['ui/editorui.js'][23]++;
        editor.focus();
      }
    }
    catch (ex) {
    }
  }
}));
  _$jscoverage['ui/editorui.js'][31]++;
  return dialog;
});
  _$jscoverage['ui/editorui.js'][34]++;
  var iframeUrlMap = {"anchor": "~/dialogs/anchor/anchor.html", "insertimage": "~/dialogs/image/image.html", "link": "~/dialogs/link/link.html", "spechars": "~/dialogs/spechars/spechars.html", "searchreplace": "~/dialogs/searchreplace/searchreplace.html", "map": "~/dialogs/map/map.html", "gmap": "~/dialogs/gmap/gmap.html", "insertvideo": "~/dialogs/video/video.html", "help": "~/dialogs/help/help.html", "emotion": "~/dialogs/emotion/emotion.html", "wordimage": "~/dialogs/wordimage/wordimage.html", "attachment": "~/dialogs/attachment/attachment.html", "insertframe": "~/dialogs/insertframe/insertframe.html", "edittip": "~/dialogs/table/edittip.html", "edittable": "~/dialogs/table/edittable.html", "edittd": "~/dialogs/table/edittd.html", "webapp": "~/dialogs/webapp/webapp.html", "snapscreen": "~/dialogs/snapscreen/snapscreen.html", "scrawl": "~/dialogs/scrawl/scrawl.html", "music": "~/dialogs/music/music.html", "template": "~/dialogs/template/template.html", "background": "~/dialogs/background/background.html"};
  _$jscoverage['ui/editorui.js'][60]++;
  var btnCmds = ["undo", "redo", "formatmatch", "bold", "italic", "underline", "fontborder", "touppercase", "tolowercase", "strikethrough", "subscript", "superscript", "source", "indent", "outdent", "blockquote", "pasteplain", "pagebreak", "selectall", "print", "preview", "horizontal", "removeformat", "time", "date", "unlink", "insertparagraphbeforetable", "insertrow", "insertcol", "mergeright", "mergedown", "deleterow", "deletecol", "splittorows", "splittocols", "splittocells", "mergecells", "deletetable"];
  _$jscoverage['ui/editorui.js'][68]++;
  for (var i = 0, ci; (ci = btnCmds[(i++)]);) {
    _$jscoverage['ui/editorui.js'][69]++;
    ci = ci.toLowerCase();
    _$jscoverage['ui/editorui.js'][70]++;
    editorui[ci] = (function (cmd) {
  _$jscoverage['ui/editorui.js'][71]++;
  return (function (editor) {
  _$jscoverage['ui/editorui.js'][72]++;
  var ui = new (editorui.Button)({className: ("edui-for-" + cmd), title: (editor.options.labelMap[cmd] || editor.getLang(("labelMap." + cmd)) || ""), onclick: (function () {
  _$jscoverage['ui/editorui.js'][76]++;
  editor.execCommand(cmd);
}), theme: editor.options.theme, showText: false});
  _$jscoverage['ui/editorui.js'][81]++;
  editorui.buttons[cmd] = ui;
  _$jscoverage['ui/editorui.js'][82]++;
  editor.addListener("selectionchange", (function (type, causeByUi, uiReady) {
  _$jscoverage['ui/editorui.js'][83]++;
  var state = editor.queryCommandState(cmd);
  _$jscoverage['ui/editorui.js'][84]++;
  if ((state == -1)) {
    _$jscoverage['ui/editorui.js'][85]++;
    ui.setDisabled(true);
    _$jscoverage['ui/editorui.js'][86]++;
    ui.setChecked(false);
  }
  else {
    _$jscoverage['ui/editorui.js'][88]++;
    if ((! uiReady)) {
      _$jscoverage['ui/editorui.js'][89]++;
      ui.setDisabled(false);
      _$jscoverage['ui/editorui.js'][90]++;
      ui.setChecked(state);
    }
  }
}));
  _$jscoverage['ui/editorui.js'][94]++;
  return ui;
});
})(ci);
}
  _$jscoverage['ui/editorui.js'][100]++;
  editorui.cleardoc = (function (editor) {
  _$jscoverage['ui/editorui.js'][101]++;
  var ui = new (editorui.Button)({className: "edui-for-cleardoc", title: (editor.options.labelMap.cleardoc || editor.getLang("labelMap.cleardoc") || ""), theme: editor.options.theme, onclick: (function () {
  _$jscoverage['ui/editorui.js'][106]++;
  if (confirm(editor.getLang("confirmClear"))) {
    _$jscoverage['ui/editorui.js'][107]++;
    editor.execCommand("cleardoc");
  }
})});
  _$jscoverage['ui/editorui.js'][111]++;
  editorui.buttons.cleardoc = ui;
  _$jscoverage['ui/editorui.js'][112]++;
  editor.addListener("selectionchange", (function () {
  _$jscoverage['ui/editorui.js'][113]++;
  ui.setDisabled((editor.queryCommandState("cleardoc") == -1));
}));
  _$jscoverage['ui/editorui.js'][115]++;
  return ui;
});
  _$jscoverage['ui/editorui.js'][119]++;
  var typeset = {"justify": ["left", "right", "center", "justify"], "imagefloat": ["none", "left", "center", "right"], "directionality": ["ltr", "rtl"]};
  _$jscoverage['ui/editorui.js'][125]++;
  for (var p in typeset) {
    _$jscoverage['ui/editorui.js'][127]++;
    (function (cmd, val) {
  _$jscoverage['ui/editorui.js'][128]++;
  for (var i = 0, ci; (ci = val[(i++)]);) {
    _$jscoverage['ui/editorui.js'][129]++;
    (function (cmd2) {
  _$jscoverage['ui/editorui.js'][130]++;
  editorui[(cmd.replace("float", "") + cmd2)] = (function (editor) {
  _$jscoverage['ui/editorui.js'][131]++;
  var ui = new (editorui.Button)({className: ("edui-for-" + cmd.replace("float", "") + cmd2), title: (editor.options.labelMap[(cmd.replace("float", "") + cmd2)] || editor.getLang(("labelMap." + cmd.replace("float", "") + cmd2)) || ""), theme: editor.options.theme, onclick: (function () {
  _$jscoverage['ui/editorui.js'][136]++;
  editor.execCommand(cmd, cmd2);
})});
  _$jscoverage['ui/editorui.js'][139]++;
  editorui.buttons[cmd] = ui;
  _$jscoverage['ui/editorui.js'][140]++;
  editor.addListener("selectionchange", (function (type, causeByUi, uiReady) {
  _$jscoverage['ui/editorui.js'][141]++;
  ui.setDisabled((editor.queryCommandState(cmd) == -1));
  _$jscoverage['ui/editorui.js'][142]++;
  ui.setChecked(((editor.queryCommandValue(cmd) == cmd2) && (! uiReady)));
}));
  _$jscoverage['ui/editorui.js'][144]++;
  return ui;
});
})(ci);
}
})(p, typeset[p]);
}
  _$jscoverage['ui/editorui.js'][152]++;
  for (var i = 0, ci = ci; (ci = ["backcolor", "forecolor"][(i++)]);) {
    _$jscoverage['ui/editorui.js'][153]++;
    editorui[ci] = (function (cmd) {
  _$jscoverage['ui/editorui.js'][154]++;
  return (function (editor) {
  _$jscoverage['ui/editorui.js'][155]++;
  var ui = new (editorui.ColorButton)({className: ("edui-for-" + cmd), color: "default", title: (editor.options.labelMap[cmd] || editor.getLang(("labelMap." + cmd)) || ""), editor: editor, onpickcolor: (function (t, color) {
  _$jscoverage['ui/editorui.js'][161]++;
  editor.execCommand(cmd, color);
}), onpicknocolor: (function () {
  _$jscoverage['ui/editorui.js'][164]++;
  editor.execCommand(cmd, "default");
  _$jscoverage['ui/editorui.js'][165]++;
  this.setColor("transparent");
  _$jscoverage['ui/editorui.js'][166]++;
  this.color = "default";
}), onbuttonclick: (function () {
  _$jscoverage['ui/editorui.js'][169]++;
  editor.execCommand(cmd, this.color);
})});
  _$jscoverage['ui/editorui.js'][172]++;
  editorui.buttons[cmd] = ui;
  _$jscoverage['ui/editorui.js'][173]++;
  editor.addListener("selectionchange", (function () {
  _$jscoverage['ui/editorui.js'][174]++;
  ui.setDisabled((editor.queryCommandState(cmd) == -1));
}));
  _$jscoverage['ui/editorui.js'][176]++;
  return ui;
});
})(ci);
}
  _$jscoverage['ui/editorui.js'][182]++;
  var dialogBtns = {noOk: ["searchreplace", "help", "spechars", "webapp"], ok: ["attachment", "anchor", "link", "insertimage", "map", "gmap", "insertframe", "wordimage", "insertvideo", "insertframe", "edittip", "edittable", "edittd", "scrawl", "template", "music", "background"]};
  _$jscoverage['ui/editorui.js'][189]++;
  for (var p = p in dialogBtns) {
    _$jscoverage['ui/editorui.js'][190]++;
    (function (type, vals) {
  _$jscoverage['ui/editorui.js'][191]++;
  for (var i = 0, ci; (ci = vals[(i++)]);) {
    _$jscoverage['ui/editorui.js'][193]++;
    if ((browser.opera && (ci === "searchreplace"))) {
      _$jscoverage['ui/editorui.js'][194]++;
      continue;
    }
    _$jscoverage['ui/editorui.js'][196]++;
    (function (cmd) {
  _$jscoverage['ui/editorui.js'][197]++;
  editorui[cmd] = (function (editor, iframeUrl, title) {
  _$jscoverage['ui/editorui.js'][198]++;
  iframeUrl = (iframeUrl || (editor.options.iframeUrlMap || {})[cmd] || iframeUrlMap[cmd]);
  _$jscoverage['ui/editorui.js'][199]++;
  title = (editor.options.labelMap[cmd] || editor.getLang(("labelMap." + cmd)) || "");
  _$jscoverage['ui/editorui.js'][201]++;
  var dialog;
  _$jscoverage['ui/editorui.js'][203]++;
  if (iframeUrl) {
    _$jscoverage['ui/editorui.js'][204]++;
    dialog = new (editorui.Dialog)(utils.extend({iframeUrl: editor.ui.mapUrl(iframeUrl), editor: editor, className: ("edui-for-" + cmd), title: title, holdScroll: (cmd === "insertimage"), closeDialog: editor.getLang("closeDialog")}, ((type == "ok")? {buttons: [{className: "edui-okbutton", label: editor.getLang("ok"), editor: editor, onclick: (function () {
  _$jscoverage['ui/editorui.js'][218]++;
  dialog.close(true);
})}, {className: "edui-cancelbutton", label: editor.getLang("cancel"), editor: editor, onclick: (function () {
  _$jscoverage['ui/editorui.js'][226]++;
  dialog.close(false);
})}]}: {})));
    _$jscoverage['ui/editorui.js'][232]++;
    editor.ui._dialogs[(cmd + "Dialog")] = dialog;
  }
  _$jscoverage['ui/editorui.js'][235]++;
  var ui = new (editorui.Button)({className: ("edui-for-" + cmd), title: title, onclick: (function () {
  _$jscoverage['ui/editorui.js'][239]++;
  if (dialog) {
    _$jscoverage['ui/editorui.js'][240]++;
    switch (cmd) {
    case "wordimage":
      _$jscoverage['ui/editorui.js'][242]++;
      editor.execCommand("wordimage", "word_img");
      _$jscoverage['ui/editorui.js'][243]++;
      if (editor.word_img) {
        _$jscoverage['ui/editorui.js'][244]++;
        dialog.render();
        _$jscoverage['ui/editorui.js'][245]++;
        dialog.open();
      }
      _$jscoverage['ui/editorui.js'][247]++;
      break;
    case "scrawl":
      _$jscoverage['ui/editorui.js'][249]++;
      if ((editor.queryCommandState("scrawl") != -1)) {
        _$jscoverage['ui/editorui.js'][250]++;
        dialog.render();
        _$jscoverage['ui/editorui.js'][251]++;
        dialog.open();
      }
      _$jscoverage['ui/editorui.js'][254]++;
      break;
    default:
      _$jscoverage['ui/editorui.js'][256]++;
      dialog.render();
      _$jscoverage['ui/editorui.js'][257]++;
      dialog.open();
    }
  }
}), theme: editor.options.theme, disabled: ((cmd == "scrawl") && (editor.queryCommandState("scrawl") == -1))});
  _$jscoverage['ui/editorui.js'][264]++;
  editorui.buttons[cmd] = ui;
  _$jscoverage['ui/editorui.js'][265]++;
  editor.addListener("selectionchange", (function () {
  _$jscoverage['ui/editorui.js'][267]++;
  var unNeedCheckState = {"edittable": 1};
  _$jscoverage['ui/editorui.js'][268]++;
  if ((cmd in unNeedCheckState)) {
    _$jscoverage['ui/editorui.js'][268]++;
    return;
  }
  _$jscoverage['ui/editorui.js'][270]++;
  var state = editor.queryCommandState(cmd);
  _$jscoverage['ui/editorui.js'][271]++;
  if (ui.getDom()) {
    _$jscoverage['ui/editorui.js'][272]++;
    ui.setDisabled((state == -1));
    _$jscoverage['ui/editorui.js'][273]++;
    ui.setChecked(state);
  }
}));
  _$jscoverage['ui/editorui.js'][278]++;
  return ui;
});
})(ci.toLowerCase());
}
})(p, dialogBtns[p]);
}
  _$jscoverage['ui/editorui.js'][285]++;
  editorui.snapscreen = (function (editor, iframeUrl, title) {
  _$jscoverage['ui/editorui.js'][286]++;
  title = (editor.options.labelMap.snapscreen || editor.getLang("labelMap.snapscreen") || "");
  _$jscoverage['ui/editorui.js'][287]++;
  var ui = new (editorui.Button)({className: "edui-for-snapscreen", title: title, onclick: (function () {
  _$jscoverage['ui/editorui.js'][291]++;
  editor.execCommand("snapscreen");
}), theme: editor.options.theme});
  _$jscoverage['ui/editorui.js'][296]++;
  editorui.buttons.snapscreen = ui;
  _$jscoverage['ui/editorui.js'][297]++;
  iframeUrl = (iframeUrl || (editor.options.iframeUrlMap || {}).snapscreen || iframeUrlMap.snapscreen);
  _$jscoverage['ui/editorui.js'][298]++;
  if (iframeUrl) {
    _$jscoverage['ui/editorui.js'][299]++;
    var dialog = new (editorui.Dialog)({iframeUrl: editor.ui.mapUrl(iframeUrl), editor: editor, className: "edui-for-snapscreen", title: title, buttons: [{className: "edui-okbutton", label: editor.getLang("ok"), editor: editor, onclick: (function () {
  _$jscoverage['ui/editorui.js'][310]++;
  dialog.close(true);
})}, {className: "edui-cancelbutton", label: editor.getLang("cancel"), editor: editor, onclick: (function () {
  _$jscoverage['ui/editorui.js'][318]++;
  dialog.close(false);
})}]});
    _$jscoverage['ui/editorui.js'][324]++;
    dialog.render();
    _$jscoverage['ui/editorui.js'][325]++;
    editor.ui._dialogs.snapscreenDialog = dialog;
  }
  _$jscoverage['ui/editorui.js'][327]++;
  editor.addListener("selectionchange", (function () {
  _$jscoverage['ui/editorui.js'][328]++;
  ui.setDisabled((editor.queryCommandState("snapscreen") == -1));
}));
  _$jscoverage['ui/editorui.js'][330]++;
  return ui;
});
  _$jscoverage['ui/editorui.js'][333]++;
  editorui.insertcode = (function (editor, list, title) {
  _$jscoverage['ui/editorui.js'][334]++;
  list = (editor.options.insertcode || []);
  _$jscoverage['ui/editorui.js'][335]++;
  title = (editor.options.labelMap.insertcode || editor.getLang("labelMap.insertcode") || "");
  _$jscoverage['ui/editorui.js'][337]++;
  var items = [];
  _$jscoverage['ui/editorui.js'][338]++;
  utils.each(list, (function (key, val) {
  _$jscoverage['ui/editorui.js'][339]++;
  items.push({label: key, value: val, theme: editor.options.theme, renderLabelHtml: (function () {
  _$jscoverage['ui/editorui.js'][344]++;
  return ("<div class=\"edui-label %%-label\" >" + (this.label || "") + "</div>");
})});
}));
  _$jscoverage['ui/editorui.js'][349]++;
  var ui = new (editorui.Combox)({editor: editor, items: items, onselect: (function (t, index) {
  _$jscoverage['ui/editorui.js'][353]++;
  editor.execCommand("insertcode", this.items[index].value);
}), onbuttonclick: (function () {
  _$jscoverage['ui/editorui.js'][356]++;
  this.showPopup();
}), title: title, initValue: title, className: "edui-for-insertcode", indexByValue: (function (value) {
  _$jscoverage['ui/editorui.js'][362]++;
  if (value) {
    _$jscoverage['ui/editorui.js'][363]++;
    for (var i = 0, ci; (ci = this.items[i]); (i++)) {
      _$jscoverage['ui/editorui.js'][364]++;
      if ((ci.value.indexOf(value) != -1)) {
        _$jscoverage['ui/editorui.js'][365]++;
        return i;
      }
}
  }
  _$jscoverage['ui/editorui.js'][369]++;
  return -1;
})});
  _$jscoverage['ui/editorui.js'][372]++;
  editorui.buttons.insertcode = ui;
  _$jscoverage['ui/editorui.js'][373]++;
  editor.addListener("selectionchange", (function (type, causeByUi, uiReady) {
  _$jscoverage['ui/editorui.js'][374]++;
  if ((! uiReady)) {
    _$jscoverage['ui/editorui.js'][375]++;
    var state = editor.queryCommandState("insertcode");
    _$jscoverage['ui/editorui.js'][376]++;
    if ((state == -1)) {
      _$jscoverage['ui/editorui.js'][377]++;
      ui.setDisabled(true);
    }
    else {
      _$jscoverage['ui/editorui.js'][379]++;
      ui.setDisabled(false);
      _$jscoverage['ui/editorui.js'][380]++;
      var value = editor.queryCommandValue("insertcode");
      _$jscoverage['ui/editorui.js'][381]++;
      if ((! value)) {
        _$jscoverage['ui/editorui.js'][382]++;
        ui.setValue(title);
        _$jscoverage['ui/editorui.js'][383]++;
        return;
      }
      _$jscoverage['ui/editorui.js'][386]++;
      (value && (value = value.replace(/['"]/g, "").split(",")[0]));
      _$jscoverage['ui/editorui.js'][387]++;
      ui.setValue(value);
    }
  }
}));
  _$jscoverage['ui/editorui.js'][393]++;
  return ui;
});
  _$jscoverage['ui/editorui.js'][395]++;
  editorui.fontfamily = (function (editor, list, title) {
  _$jscoverage['ui/editorui.js'][397]++;
  list = (editor.options.fontfamily || []);
  _$jscoverage['ui/editorui.js'][398]++;
  title = (editor.options.labelMap.fontfamily || editor.getLang("labelMap.fontfamily") || "");
  _$jscoverage['ui/editorui.js'][399]++;
  if ((! list.length)) {
    _$jscoverage['ui/editorui.js'][399]++;
    return;
  }
  _$jscoverage['ui/editorui.js'][400]++;
  for (var i = 0, ci, items = []; (ci = list[i]); (i++)) {
    _$jscoverage['ui/editorui.js'][401]++;
    var langLabel = (editor.getLang("fontfamily")[ci.name] || "");
    _$jscoverage['ui/editorui.js'][402]++;
    (function (key, val) {
  _$jscoverage['ui/editorui.js'][403]++;
  items.push({label: key, value: val, theme: editor.options.theme, renderLabelHtml: (function () {
  _$jscoverage['ui/editorui.js'][408]++;
  return ("<div class=\"edui-label %%-label\" style=\"font-family:" + utils.unhtml(this.value) + "\">" + (this.label || "") + "</div>");
})});
})((ci.label || langLabel), ci.val);
}
  _$jscoverage['ui/editorui.js'][414]++;
  var ui = new (editorui.Combox)({editor: editor, items: items, onselect: (function (t, index) {
  _$jscoverage['ui/editorui.js'][418]++;
  editor.execCommand("FontFamily", this.items[index].value);
}), onbuttonclick: (function () {
  _$jscoverage['ui/editorui.js'][421]++;
  this.showPopup();
}), title: title, initValue: title, className: "edui-for-fontfamily", indexByValue: (function (value) {
  _$jscoverage['ui/editorui.js'][427]++;
  if (value) {
    _$jscoverage['ui/editorui.js'][428]++;
    for (var i = 0, ci; (ci = this.items[i]); (i++)) {
      _$jscoverage['ui/editorui.js'][429]++;
      if ((ci.value.indexOf(value) != -1)) {
        _$jscoverage['ui/editorui.js'][430]++;
        return i;
      }
}
  }
  _$jscoverage['ui/editorui.js'][434]++;
  return -1;
})});
  _$jscoverage['ui/editorui.js'][437]++;
  editorui.buttons.fontfamily = ui;
  _$jscoverage['ui/editorui.js'][438]++;
  editor.addListener("selectionchange", (function (type, causeByUi, uiReady) {
  _$jscoverage['ui/editorui.js'][439]++;
  if ((! uiReady)) {
    _$jscoverage['ui/editorui.js'][440]++;
    var state = editor.queryCommandState("FontFamily");
    _$jscoverage['ui/editorui.js'][441]++;
    if ((state == -1)) {
      _$jscoverage['ui/editorui.js'][442]++;
      ui.setDisabled(true);
    }
    else {
      _$jscoverage['ui/editorui.js'][444]++;
      ui.setDisabled(false);
      _$jscoverage['ui/editorui.js'][445]++;
      var value = editor.queryCommandValue("FontFamily");
      _$jscoverage['ui/editorui.js'][447]++;
      (value && (value = value.replace(/['"]/g, "").split(",")[0]));
      _$jscoverage['ui/editorui.js'][448]++;
      ui.setValue(value);
    }
  }
}));
  _$jscoverage['ui/editorui.js'][454]++;
  return ui;
});
  _$jscoverage['ui/editorui.js'][457]++;
  editorui.fontsize = (function (editor, list, title) {
  _$jscoverage['ui/editorui.js'][458]++;
  title = (editor.options.labelMap.fontsize || editor.getLang("labelMap.fontsize") || "");
  _$jscoverage['ui/editorui.js'][459]++;
  list = (list || editor.options.fontsize || []);
  _$jscoverage['ui/editorui.js'][460]++;
  if ((! list.length)) {
    _$jscoverage['ui/editorui.js'][460]++;
    return;
  }
  _$jscoverage['ui/editorui.js'][461]++;
  var items = [];
  _$jscoverage['ui/editorui.js'][462]++;
  for (var i = 0; (i < list.length); (i++)) {
    _$jscoverage['ui/editorui.js'][463]++;
    var size = (list[i] + "px");
    _$jscoverage['ui/editorui.js'][464]++;
    items.push({label: size, value: size, theme: editor.options.theme, renderLabelHtml: (function () {
  _$jscoverage['ui/editorui.js'][469]++;
  return ("<div class=\"edui-label %%-label\" style=\"line-height:1;font-size:" + this.value + "\">" + (this.label || "") + "</div>");
})});
}
  _$jscoverage['ui/editorui.js'][474]++;
  var ui = new (editorui.Combox)({editor: editor, items: items, title: title, initValue: title, onselect: (function (t, index) {
  _$jscoverage['ui/editorui.js'][480]++;
  editor.execCommand("FontSize", this.items[index].value);
}), onbuttonclick: (function () {
  _$jscoverage['ui/editorui.js'][483]++;
  this.showPopup();
}), className: "edui-for-fontsize"});
  _$jscoverage['ui/editorui.js'][487]++;
  editorui.buttons.fontsize = ui;
  _$jscoverage['ui/editorui.js'][488]++;
  editor.addListener("selectionchange", (function (type, causeByUi, uiReady) {
  _$jscoverage['ui/editorui.js'][489]++;
  if ((! uiReady)) {
    _$jscoverage['ui/editorui.js'][490]++;
    var state = editor.queryCommandState("FontSize");
    _$jscoverage['ui/editorui.js'][491]++;
    if ((state == -1)) {
      _$jscoverage['ui/editorui.js'][492]++;
      ui.setDisabled(true);
    }
    else {
      _$jscoverage['ui/editorui.js'][494]++;
      ui.setDisabled(false);
      _$jscoverage['ui/editorui.js'][495]++;
      ui.setValue(editor.queryCommandValue("FontSize"));
    }
  }
}));
  _$jscoverage['ui/editorui.js'][500]++;
  return ui;
});
  _$jscoverage['ui/editorui.js'][503]++;
  editorui.paragraph = (function (editor, list, title) {
  _$jscoverage['ui/editorui.js'][504]++;
  title = (editor.options.labelMap.paragraph || editor.getLang("labelMap.paragraph") || "");
  _$jscoverage['ui/editorui.js'][505]++;
  list = (editor.options.paragraph || []);
  _$jscoverage['ui/editorui.js'][506]++;
  if (utils.isEmptyObject(list)) {
    _$jscoverage['ui/editorui.js'][506]++;
    return;
  }
  _$jscoverage['ui/editorui.js'][507]++;
  var items = [];
  _$jscoverage['ui/editorui.js'][508]++;
  for (var i in list) {
    _$jscoverage['ui/editorui.js'][509]++;
    items.push({value: i, label: (list[i] || editor.getLang("paragraph")[i]), theme: editor.options.theme, renderLabelHtml: (function () {
  _$jscoverage['ui/editorui.js'][514]++;
  return ("<div class=\"edui-label %%-label\"><span class=\"edui-for-" + this.value + "\">" + (this.label || "") + "</span></div>");
})});
}
  _$jscoverage['ui/editorui.js'][518]++;
  var ui = new (editorui.Combox)({editor: editor, items: items, title: title, initValue: title, className: "edui-for-paragraph", onselect: (function (t, index) {
  _$jscoverage['ui/editorui.js'][525]++;
  editor.execCommand("Paragraph", this.items[index].value);
}), onbuttonclick: (function () {
  _$jscoverage['ui/editorui.js'][528]++;
  this.showPopup();
})});
  _$jscoverage['ui/editorui.js'][531]++;
  editorui.buttons.paragraph = ui;
  _$jscoverage['ui/editorui.js'][532]++;
  editor.addListener("selectionchange", (function (type, causeByUi, uiReady) {
  _$jscoverage['ui/editorui.js'][533]++;
  if ((! uiReady)) {
    _$jscoverage['ui/editorui.js'][534]++;
    var state = editor.queryCommandState("Paragraph");
    _$jscoverage['ui/editorui.js'][535]++;
    if ((state == -1)) {
      _$jscoverage['ui/editorui.js'][536]++;
      ui.setDisabled(true);
    }
    else {
      _$jscoverage['ui/editorui.js'][538]++;
      ui.setDisabled(false);
      _$jscoverage['ui/editorui.js'][539]++;
      var value = editor.queryCommandValue("Paragraph");
      _$jscoverage['ui/editorui.js'][540]++;
      var index = ui.indexByValue(value);
      _$jscoverage['ui/editorui.js'][541]++;
      if ((index != -1)) {
        _$jscoverage['ui/editorui.js'][542]++;
        ui.setValue(value);
      }
      else {
        _$jscoverage['ui/editorui.js'][544]++;
        ui.setValue(ui.initValue);
      }
    }
  }
}));
  _$jscoverage['ui/editorui.js'][550]++;
  return ui;
});
  _$jscoverage['ui/editorui.js'][555]++;
  editorui.customstyle = (function (editor) {
  _$jscoverage['ui/editorui.js'][556]++;
  var list = (editor.options.customstyle || []), title = (editor.options.labelMap.customstyle || editor.getLang("labelMap.customstyle") || "");
  _$jscoverage['ui/editorui.js'][558]++;
  if ((! list.length)) {
    _$jscoverage['ui/editorui.js'][558]++;
    return;
  }
  _$jscoverage['ui/editorui.js'][559]++;
  var langCs = editor.getLang("customstyle");
  _$jscoverage['ui/editorui.js'][560]++;
  for (var i = 0, items = [], t; (t = list[(i++)]);) {
    _$jscoverage['ui/editorui.js'][561]++;
    (function (t) {
  _$jscoverage['ui/editorui.js'][562]++;
  var ck = {};
  _$jscoverage['ui/editorui.js'][563]++;
  ck.label = (t.label? t.label: langCs[t.name]);
  _$jscoverage['ui/editorui.js'][564]++;
  ck.style = t.style;
  _$jscoverage['ui/editorui.js'][565]++;
  ck.className = t.className;
  _$jscoverage['ui/editorui.js'][566]++;
  ck.tag = t.tag;
  _$jscoverage['ui/editorui.js'][567]++;
  items.push({label: ck.label, value: ck, theme: editor.options.theme, renderLabelHtml: (function () {
  _$jscoverage['ui/editorui.js'][572]++;
  return ("<div class=\"edui-label %%-label\">" + "<" + ck.tag + " " + (ck.className? (" class=\"" + ck.className + "\""): "") + (ck.style? (" style=\"" + ck.style + "\""): "") + ">" + ck.label + "</" + ck.tag + ">" + "</div>");
})});
})(t);
}
  _$jscoverage['ui/editorui.js'][580]++;
  var ui = new (editorui.Combox)({editor: editor, items: items, title: title, initValue: title, className: "edui-for-customstyle", onselect: (function (t, index) {
  _$jscoverage['ui/editorui.js'][587]++;
  editor.execCommand("customstyle", this.items[index].value);
}), onbuttonclick: (function () {
  _$jscoverage['ui/editorui.js'][590]++;
  this.showPopup();
}), indexByValue: (function (value) {
  _$jscoverage['ui/editorui.js'][593]++;
  for (var i = 0, ti; (ti = this.items[(i++)]);) {
    _$jscoverage['ui/editorui.js'][594]++;
    if ((ti.label == value)) {
      _$jscoverage['ui/editorui.js'][595]++;
      return (i - 1);
    }
}
  _$jscoverage['ui/editorui.js'][598]++;
  return -1;
})});
  _$jscoverage['ui/editorui.js'][601]++;
  editorui.buttons.customstyle = ui;
  _$jscoverage['ui/editorui.js'][602]++;
  editor.addListener("selectionchange", (function (type, causeByUi, uiReady) {
  _$jscoverage['ui/editorui.js'][603]++;
  if ((! uiReady)) {
    _$jscoverage['ui/editorui.js'][604]++;
    var state = editor.queryCommandState("customstyle");
    _$jscoverage['ui/editorui.js'][605]++;
    if ((state == -1)) {
      _$jscoverage['ui/editorui.js'][606]++;
      ui.setDisabled(true);
    }
    else {
      _$jscoverage['ui/editorui.js'][608]++;
      ui.setDisabled(false);
      _$jscoverage['ui/editorui.js'][609]++;
      var value = editor.queryCommandValue("customstyle");
      _$jscoverage['ui/editorui.js'][610]++;
      var index = ui.indexByValue(value);
      _$jscoverage['ui/editorui.js'][611]++;
      if ((index != -1)) {
        _$jscoverage['ui/editorui.js'][612]++;
        ui.setValue(value);
      }
      else {
        _$jscoverage['ui/editorui.js'][614]++;
        ui.setValue(ui.initValue);
      }
    }
  }
}));
  _$jscoverage['ui/editorui.js'][620]++;
  return ui;
});
  _$jscoverage['ui/editorui.js'][622]++;
  editorui.inserttable = (function (editor, iframeUrl, title) {
  _$jscoverage['ui/editorui.js'][623]++;
  title = (editor.options.labelMap.inserttable || editor.getLang("labelMap.inserttable") || "");
  _$jscoverage['ui/editorui.js'][624]++;
  var ui = new (editorui.TableButton)({editor: editor, title: title, className: "edui-for-inserttable", onpicktable: (function (t, numCols, numRows) {
  _$jscoverage['ui/editorui.js'][629]++;
  editor.execCommand("InsertTable", {numRows: numRows, numCols: numCols, border: 1});
}), onbuttonclick: (function () {
  _$jscoverage['ui/editorui.js'][632]++;
  this.showPopup();
})});
  _$jscoverage['ui/editorui.js'][635]++;
  editorui.buttons.inserttable = ui;
  _$jscoverage['ui/editorui.js'][636]++;
  editor.addListener("selectionchange", (function () {
  _$jscoverage['ui/editorui.js'][637]++;
  ui.setDisabled((editor.queryCommandState("inserttable") == -1));
}));
  _$jscoverage['ui/editorui.js'][639]++;
  return ui;
});
  _$jscoverage['ui/editorui.js'][642]++;
  editorui.lineheight = (function (editor) {
  _$jscoverage['ui/editorui.js'][643]++;
  var val = (editor.options.lineheight || []);
  _$jscoverage['ui/editorui.js'][644]++;
  if ((! val.length)) {
    _$jscoverage['ui/editorui.js'][644]++;
    return;
  }
  _$jscoverage['ui/editorui.js'][645]++;
  for (var i = 0, ci, items = []; (ci = val[(i++)]);) {
    _$jscoverage['ui/editorui.js'][646]++;
    items.push({label: ci, value: ci, theme: editor.options.theme, onclick: (function () {
  _$jscoverage['ui/editorui.js'][652]++;
  editor.execCommand("lineheight", this.value);
})});
}
  _$jscoverage['ui/editorui.js'][656]++;
  var ui = new (editorui.MenuButton)({editor: editor, className: "edui-for-lineheight", title: (editor.options.labelMap.lineheight || editor.getLang("labelMap.lineheight") || ""), items: items, onbuttonclick: (function () {
  _$jscoverage['ui/editorui.js'][662]++;
  var value = (editor.queryCommandValue("LineHeight") || this.value);
  _$jscoverage['ui/editorui.js'][663]++;
  editor.execCommand("LineHeight", value);
})});
  _$jscoverage['ui/editorui.js'][666]++;
  editorui.buttons.lineheight = ui;
  _$jscoverage['ui/editorui.js'][667]++;
  editor.addListener("selectionchange", (function () {
  _$jscoverage['ui/editorui.js'][668]++;
  var state = editor.queryCommandState("LineHeight");
  _$jscoverage['ui/editorui.js'][669]++;
  if ((state == -1)) {
    _$jscoverage['ui/editorui.js'][670]++;
    ui.setDisabled(true);
  }
  else {
    _$jscoverage['ui/editorui.js'][672]++;
    ui.setDisabled(false);
    _$jscoverage['ui/editorui.js'][673]++;
    var value = editor.queryCommandValue("LineHeight");
    _$jscoverage['ui/editorui.js'][674]++;
    (value && ui.setValue((value + "").replace(/cm/, "")));
    _$jscoverage['ui/editorui.js'][675]++;
    ui.setChecked(state);
  }
}));
  _$jscoverage['ui/editorui.js'][678]++;
  return ui;
});
  _$jscoverage['ui/editorui.js'][681]++;
  var rowspacings = ["top", "bottom"];
  _$jscoverage['ui/editorui.js'][682]++;
  for (var r = 0, ri; (ri = rowspacings[(r++)]);) {
    _$jscoverage['ui/editorui.js'][683]++;
    (function (cmd) {
  _$jscoverage['ui/editorui.js'][684]++;
  editorui[("rowspacing" + cmd)] = (function (editor) {
  _$jscoverage['ui/editorui.js'][685]++;
  var val = (editor.options[("rowspacing" + cmd)] || []);
  _$jscoverage['ui/editorui.js'][686]++;
  if ((! val.length)) {
    _$jscoverage['ui/editorui.js'][686]++;
    return null;
  }
  _$jscoverage['ui/editorui.js'][687]++;
  for (var i = 0, ci, items = []; (ci = val[(i++)]);) {
    _$jscoverage['ui/editorui.js'][688]++;
    items.push({label: ci, value: ci, theme: editor.options.theme, onclick: (function () {
  _$jscoverage['ui/editorui.js'][693]++;
  editor.execCommand("rowspacing", this.value, cmd);
})});
}
  _$jscoverage['ui/editorui.js'][697]++;
  var ui = new (editorui.MenuButton)({editor: editor, className: ("edui-for-rowspacing" + cmd), title: (editor.options.labelMap[("rowspacing" + cmd)] || editor.getLang(("labelMap.rowspacing" + cmd)) || ""), items: items, onbuttonclick: (function () {
  _$jscoverage['ui/editorui.js'][703]++;
  var value = (editor.queryCommandValue("rowspacing", cmd) || this.value);
  _$jscoverage['ui/editorui.js'][704]++;
  editor.execCommand("rowspacing", value, cmd);
})});
  _$jscoverage['ui/editorui.js'][707]++;
  editorui.buttons[cmd] = ui;
  _$jscoverage['ui/editorui.js'][708]++;
  editor.addListener("selectionchange", (function () {
  _$jscoverage['ui/editorui.js'][709]++;
  var state = editor.queryCommandState("rowspacing", cmd);
  _$jscoverage['ui/editorui.js'][710]++;
  if ((state == -1)) {
    _$jscoverage['ui/editorui.js'][711]++;
    ui.setDisabled(true);
  }
  else {
    _$jscoverage['ui/editorui.js'][713]++;
    ui.setDisabled(false);
    _$jscoverage['ui/editorui.js'][714]++;
    var value = editor.queryCommandValue("rowspacing", cmd);
    _$jscoverage['ui/editorui.js'][715]++;
    (value && ui.setValue((value + "").replace(/%/, "")));
    _$jscoverage['ui/editorui.js'][716]++;
    ui.setChecked(state);
  }
}));
  _$jscoverage['ui/editorui.js'][719]++;
  return ui;
});
})(ri);
}
  _$jscoverage['ui/editorui.js'][724]++;
  var lists = ["insertorderedlist", "insertunorderedlist"];
  _$jscoverage['ui/editorui.js'][725]++;
  for (var l = 0, cl; (cl = lists[(l++)]);) {
    _$jscoverage['ui/editorui.js'][726]++;
    (function (cmd) {
  _$jscoverage['ui/editorui.js'][727]++;
  editorui[cmd] = (function (editor) {
  _$jscoverage['ui/editorui.js'][728]++;
  var vals = editor.options[cmd], _onMenuClick = (function () {
  _$jscoverage['ui/editorui.js'][730]++;
  editor.execCommand(cmd, this.value);
}), items = [];
  _$jscoverage['ui/editorui.js'][732]++;
  for (var i in vals) {
    _$jscoverage['ui/editorui.js'][733]++;
    items.push({label: (vals[i] || editor.getLang()[cmd][i] || ""), value: i, theme: editor.options.theme, onclick: _onMenuClick});
}
  _$jscoverage['ui/editorui.js'][740]++;
  var ui = new (editorui.MenuButton)({editor: editor, className: ("edui-for-" + cmd), title: (editor.getLang(("labelMap." + cmd)) || ""), "items": items, onbuttonclick: (function () {
  _$jscoverage['ui/editorui.js'][746]++;
  var value = (editor.queryCommandValue(cmd) || this.value);
  _$jscoverage['ui/editorui.js'][747]++;
  editor.execCommand(cmd, value);
})});
  _$jscoverage['ui/editorui.js'][750]++;
  editorui.buttons[cmd] = ui;
  _$jscoverage['ui/editorui.js'][751]++;
  editor.addListener("selectionchange", (function () {
  _$jscoverage['ui/editorui.js'][752]++;
  var state = editor.queryCommandState(cmd);
  _$jscoverage['ui/editorui.js'][753]++;
  if ((state == -1)) {
    _$jscoverage['ui/editorui.js'][754]++;
    ui.setDisabled(true);
  }
  else {
    _$jscoverage['ui/editorui.js'][756]++;
    ui.setDisabled(false);
    _$jscoverage['ui/editorui.js'][757]++;
    var value = editor.queryCommandValue(cmd);
    _$jscoverage['ui/editorui.js'][758]++;
    ui.setValue(value);
    _$jscoverage['ui/editorui.js'][759]++;
    ui.setChecked(state);
  }
}));
  _$jscoverage['ui/editorui.js'][762]++;
  return ui;
});
})(cl);
}
  _$jscoverage['ui/editorui.js'][767]++;
  editorui.fullscreen = (function (editor, title) {
  _$jscoverage['ui/editorui.js'][768]++;
  title = (editor.options.labelMap.fullscreen || editor.getLang("labelMap.fullscreen") || "");
  _$jscoverage['ui/editorui.js'][769]++;
  var ui = new (editorui.Button)({className: "edui-for-fullscreen", title: title, theme: editor.options.theme, onclick: (function () {
  _$jscoverage['ui/editorui.js'][774]++;
  if (editor.ui) {
    _$jscoverage['ui/editorui.js'][775]++;
    editor.ui.setFullScreen((! editor.ui.isFullScreen()));
  }
  _$jscoverage['ui/editorui.js'][777]++;
  this.setChecked(editor.ui.isFullScreen());
})});
  _$jscoverage['ui/editorui.js'][780]++;
  editorui.buttons.fullscreen = ui;
  _$jscoverage['ui/editorui.js'][781]++;
  editor.addListener("selectionchange", (function () {
  _$jscoverage['ui/editorui.js'][782]++;
  var state = editor.queryCommandState("fullscreen");
  _$jscoverage['ui/editorui.js'][783]++;
  ui.setDisabled((state == -1));
  _$jscoverage['ui/editorui.js'][784]++;
  ui.setChecked(editor.ui.isFullScreen());
}));
  _$jscoverage['ui/editorui.js'][786]++;
  return ui;
});
  _$jscoverage['ui/editorui.js'][790]++;
  editorui.emotion = (function (editor, iframeUrl) {
  _$jscoverage['ui/editorui.js'][791]++;
  var cmd = "emotion";
  _$jscoverage['ui/editorui.js'][792]++;
  var ui = new (editorui.MultiMenuPop)({title: (editor.options.labelMap[cmd] || editor.getLang(("labelMap." + cmd + "")) || ""), editor: editor, className: ("edui-for-" + cmd), iframeUrl: editor.ui.mapUrl((iframeUrl || (editor.options.iframeUrlMap || {})[cmd] || iframeUrlMap[cmd]))});
  _$jscoverage['ui/editorui.js'][798]++;
  editorui.buttons[cmd] = ui;
  _$jscoverage['ui/editorui.js'][800]++;
  editor.addListener("selectionchange", (function () {
  _$jscoverage['ui/editorui.js'][801]++;
  ui.setDisabled((editor.queryCommandState(cmd) == -1));
}));
  _$jscoverage['ui/editorui.js'][803]++;
  return ui;
});
  _$jscoverage['ui/editorui.js'][806]++;
  editorui.autotypeset = (function (editor) {
  _$jscoverage['ui/editorui.js'][807]++;
  var ui = new (editorui.AutoTypeSetButton)({editor: editor, title: (editor.options.labelMap.autotypeset || editor.getLang("labelMap.autotypeset") || ""), className: "edui-for-autotypeset", onbuttonclick: (function () {
  _$jscoverage['ui/editorui.js'][812]++;
  editor.execCommand("autotypeset");
})});
  _$jscoverage['ui/editorui.js'][815]++;
  editorui.buttons.autotypeset = ui;
  _$jscoverage['ui/editorui.js'][816]++;
  editor.addListener("selectionchange", (function () {
  _$jscoverage['ui/editorui.js'][817]++;
  ui.setDisabled((editor.queryCommandState("autotypeset") == -1));
}));
  _$jscoverage['ui/editorui.js'][819]++;
  return ui;
});
})();
