bcms_fckeditor 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- metadata +5 -679
- data/.gitignore +0 -11
- data/COPYRIGHT.txt +0 -23
- data/GPL.txt +0 -674
- data/Rakefile +0 -36
- data/VERSION +0 -1
- data/app/controllers/application_controller.rb +0 -10
- data/app/helpers/application_helper.rb +0 -3
- data/bcms_fckeditor.gemspec +0 -1046
- data/config/boot.rb +0 -110
- data/config/database.yml +0 -22
- data/config/environment.rb +0 -42
- data/config/environments/development.rb +0 -18
- data/config/environments/production.rb +0 -31
- data/config/environments/test.rb +0 -29
- data/config/initializers/backtrace_silencers.rb +0 -7
- data/config/initializers/inflections.rb +0 -10
- data/config/initializers/init_module.rb +0 -1
- data/config/initializers/mime_types.rb +0 -5
- data/config/initializers/new_rails_defaults.rb +0 -21
- data/config/initializers/session_store.rb +0 -15
- data/config/locales/en.yml +0 -5
- data/config/routes.rb +0 -45
- data/db/migrate/20080815014337_browsercms_3_0_0.rb +0 -274
- data/db/migrate/20081114172307_load_seed_data.rb +0 -92
- data/db/migrate/20091109175123_browsercms_3_0_5.rb +0 -9
- data/db/seeds.rb +0 -7
- data/doc/README_FOR_APP +0 -2
- data/public/404.html +0 -30
- data/public/422.html +0 -30
- data/public/500.html +0 -30
- data/public/bcms/ckeditor/ckeditor.js +0 -108
- data/public/bcms/ckeditor/config.js +0 -18
- data/public/bcms/ckeditor/core/_bootstrap.js +0 -64
- data/public/bcms/ckeditor/core/ajax.js +0 -143
- data/public/bcms/ckeditor/core/ckeditor.js +0 -96
- data/public/bcms/ckeditor/core/ckeditor_base.js +0 -190
- data/public/bcms/ckeditor/core/ckeditor_basic.js +0 -241
- data/public/bcms/ckeditor/core/command.js +0 -70
- data/public/bcms/ckeditor/core/commanddefinition.js +0 -72
- data/public/bcms/ckeditor/core/config.js +0 -287
- data/public/bcms/ckeditor/core/dom/document.js +0 -210
- data/public/bcms/ckeditor/core/dom/documentfragment.js +0 -49
- data/public/bcms/ckeditor/core/dom/domobject.js +0 -204
- data/public/bcms/ckeditor/core/dom/element.js +0 -1384
- data/public/bcms/ckeditor/core/dom/elementpath.js +0 -104
- data/public/bcms/ckeditor/core/dom/event.js +0 -137
- data/public/bcms/ckeditor/core/dom/node.js +0 -649
- data/public/bcms/ckeditor/core/dom/nodelist.js +0 -23
- data/public/bcms/ckeditor/core/dom/range.js +0 -1668
- data/public/bcms/ckeditor/core/dom/text.js +0 -123
- data/public/bcms/ckeditor/core/dom/walker.js +0 -411
- data/public/bcms/ckeditor/core/dom/window.js +0 -96
- data/public/bcms/ckeditor/core/dom.js +0 -21
- data/public/bcms/ckeditor/core/dtd.js +0 -200
- data/public/bcms/ckeditor/core/editor.js +0 -650
- data/public/bcms/ckeditor/core/editor_basic.js +0 -178
- data/public/bcms/ckeditor/core/env.js +0 -219
- data/public/bcms/ckeditor/core/event.js +0 -335
- data/public/bcms/ckeditor/core/eventInfo.js +0 -120
- data/public/bcms/ckeditor/core/focusmanager.js +0 -123
- data/public/bcms/ckeditor/core/htmlparser/basicwriter.js +0 -140
- data/public/bcms/ckeditor/core/htmlparser/cdata.js +0 -44
- data/public/bcms/ckeditor/core/htmlparser/comment.js +0 -59
- data/public/bcms/ckeditor/core/htmlparser/element.js +0 -196
- data/public/bcms/ckeditor/core/htmlparser/filter.js +0 -233
- data/public/bcms/ckeditor/core/htmlparser/fragment.js +0 -434
- data/public/bcms/ckeditor/core/htmlparser/text.js +0 -55
- data/public/bcms/ckeditor/core/htmlparser.js +0 -212
- data/public/bcms/ckeditor/core/imagecacher.js +0 -58
- data/public/bcms/ckeditor/core/lang.js +0 -147
- data/public/bcms/ckeditor/core/loader.js +0 -238
- data/public/bcms/ckeditor/core/plugindefinition.js +0 -66
- data/public/bcms/ckeditor/core/plugins.js +0 -82
- data/public/bcms/ckeditor/core/resourcemanager.js +0 -233
- data/public/bcms/ckeditor/core/scriptloader.js +0 -194
- data/public/bcms/ckeditor/core/skins.js +0 -185
- data/public/bcms/ckeditor/core/test.js +0 -184
- data/public/bcms/ckeditor/core/themes.js +0 -18
- data/public/bcms/ckeditor/core/tools.js +0 -531
- data/public/bcms/ckeditor/core/ui.js +0 -106
- data/public/bcms/ckeditor/core/xml.js +0 -165
- data/public/bcms/ckeditor/editor.js +0 -50
- data/public/bcms/ckeditor/lang/_languages.js +0 -82
- data/public/bcms/ckeditor/lang/_translationstatus.txt +0 -59
- data/public/bcms/ckeditor/lang/af.js +0 -674
- data/public/bcms/ckeditor/lang/ar.js +0 -674
- data/public/bcms/ckeditor/lang/bg.js +0 -674
- data/public/bcms/ckeditor/lang/bn.js +0 -674
- data/public/bcms/ckeditor/lang/bs.js +0 -674
- data/public/bcms/ckeditor/lang/ca.js +0 -674
- data/public/bcms/ckeditor/lang/cs.js +0 -674
- data/public/bcms/ckeditor/lang/da.js +0 -674
- data/public/bcms/ckeditor/lang/de.js +0 -674
- data/public/bcms/ckeditor/lang/el.js +0 -674
- data/public/bcms/ckeditor/lang/en-au.js +0 -674
- data/public/bcms/ckeditor/lang/en-ca.js +0 -674
- data/public/bcms/ckeditor/lang/en-uk.js +0 -674
- data/public/bcms/ckeditor/lang/en.js +0 -674
- data/public/bcms/ckeditor/lang/eo.js +0 -674
- data/public/bcms/ckeditor/lang/es.js +0 -674
- data/public/bcms/ckeditor/lang/et.js +0 -674
- data/public/bcms/ckeditor/lang/eu.js +0 -674
- data/public/bcms/ckeditor/lang/fa.js +0 -674
- data/public/bcms/ckeditor/lang/fi.js +0 -674
- data/public/bcms/ckeditor/lang/fo.js +0 -674
- data/public/bcms/ckeditor/lang/fr-ca.js +0 -674
- data/public/bcms/ckeditor/lang/fr.js +0 -674
- data/public/bcms/ckeditor/lang/gl.js +0 -674
- data/public/bcms/ckeditor/lang/gu.js +0 -674
- data/public/bcms/ckeditor/lang/he.js +0 -674
- data/public/bcms/ckeditor/lang/hi.js +0 -674
- data/public/bcms/ckeditor/lang/hr.js +0 -674
- data/public/bcms/ckeditor/lang/hu.js +0 -674
- data/public/bcms/ckeditor/lang/is.js +0 -674
- data/public/bcms/ckeditor/lang/it.js +0 -674
- data/public/bcms/ckeditor/lang/ja.js +0 -674
- data/public/bcms/ckeditor/lang/km.js +0 -674
- data/public/bcms/ckeditor/lang/ko.js +0 -674
- data/public/bcms/ckeditor/lang/lt.js +0 -674
- data/public/bcms/ckeditor/lang/lv.js +0 -674
- data/public/bcms/ckeditor/lang/mn.js +0 -674
- data/public/bcms/ckeditor/lang/ms.js +0 -674
- data/public/bcms/ckeditor/lang/nb.js +0 -674
- data/public/bcms/ckeditor/lang/nl.js +0 -674
- data/public/bcms/ckeditor/lang/no.js +0 -674
- data/public/bcms/ckeditor/lang/pl.js +0 -674
- data/public/bcms/ckeditor/lang/pt-br.js +0 -674
- data/public/bcms/ckeditor/lang/pt.js +0 -674
- data/public/bcms/ckeditor/lang/ro.js +0 -674
- data/public/bcms/ckeditor/lang/ru.js +0 -674
- data/public/bcms/ckeditor/lang/sk.js +0 -674
- data/public/bcms/ckeditor/lang/sl.js +0 -674
- data/public/bcms/ckeditor/lang/sr-latn.js +0 -674
- data/public/bcms/ckeditor/lang/sr.js +0 -674
- data/public/bcms/ckeditor/lang/sv.js +0 -674
- data/public/bcms/ckeditor/lang/th.js +0 -674
- data/public/bcms/ckeditor/lang/tr.js +0 -674
- data/public/bcms/ckeditor/lang/uk.js +0 -674
- data/public/bcms/ckeditor/lang/vi.js +0 -674
- data/public/bcms/ckeditor/lang/zh-cn.js +0 -674
- data/public/bcms/ckeditor/lang/zh.js +0 -674
- data/public/bcms/ckeditor/plugins/about/dialogs/about.js +0 -73
- data/public/bcms/ckeditor/plugins/about/dialogs/logo_ckeditor.png +0 -0
- data/public/bcms/ckeditor/plugins/about/plugin.js +0 -22
- data/public/bcms/ckeditor/plugins/basicstyles/plugin.js +0 -50
- data/public/bcms/ckeditor/plugins/blockquote/plugin.js +0 -301
- data/public/bcms/ckeditor/plugins/button/plugin.js +0 -264
- data/public/bcms/ckeditor/plugins/clipboard/dialogs/paste.js +0 -167
- data/public/bcms/ckeditor/plugins/clipboard/plugin.js +0 -208
- data/public/bcms/ckeditor/plugins/colorbutton/plugin.js +0 -202
- data/public/bcms/ckeditor/plugins/contextmenu/plugin.js +0 -178
- data/public/bcms/ckeditor/plugins/dialog/dialogDefinition.js +0 -315
- data/public/bcms/ckeditor/plugins/dialog/plugin.js +0 -2742
- data/public/bcms/ckeditor/plugins/dialogui/plugin.js +0 -1319
- data/public/bcms/ckeditor/plugins/domiterator/plugin.js +0 -354
- data/public/bcms/ckeditor/plugins/editingblock/plugin.js +0 -236
- data/public/bcms/ckeditor/plugins/elementspath/plugin.js +0 -182
- data/public/bcms/ckeditor/plugins/enterkey/plugin.js +0 -324
- data/public/bcms/ckeditor/plugins/entities/plugin.js +0 -200
- data/public/bcms/ckeditor/plugins/fakeobjects/plugin.js +0 -111
- data/public/bcms/ckeditor/plugins/filebrowser/plugin.js +0 -383
- data/public/bcms/ckeditor/plugins/find/dialogs/find.js +0 -843
- data/public/bcms/ckeditor/plugins/find/plugin.js +0 -46
- data/public/bcms/ckeditor/plugins/flash/dialogs/flash.js +0 -682
- data/public/bcms/ckeditor/plugins/flash/images/placeholder.png +0 -0
- data/public/bcms/ckeditor/plugins/flash/plugin.js +0 -165
- data/public/bcms/ckeditor/plugins/floatpanel/plugin.js +0 -325
- data/public/bcms/ckeditor/plugins/font/plugin.js +0 -227
- data/public/bcms/ckeditor/plugins/format/plugin.js +0 -191
- data/public/bcms/ckeditor/plugins/forms/dialogs/button.js +0 -135
- data/public/bcms/ckeditor/plugins/forms/dialogs/checkbox.js +0 -138
- data/public/bcms/ckeditor/plugins/forms/dialogs/form.js +0 -177
- data/public/bcms/ckeditor/plugins/forms/dialogs/hiddenfield.js +0 -91
- data/public/bcms/ckeditor/plugins/forms/dialogs/radio.js +0 -135
- data/public/bcms/ckeditor/plugins/forms/dialogs/select.js +0 -541
- data/public/bcms/ckeditor/plugins/forms/dialogs/textarea.js +0 -114
- data/public/bcms/ckeditor/plugins/forms/dialogs/textfield.js +0 -193
- data/public/bcms/ckeditor/plugins/forms/plugin.js +0 -193
- data/public/bcms/ckeditor/plugins/horizontalrule/plugin.js +0 -35
- data/public/bcms/ckeditor/plugins/htmldataprocessor/plugin.js +0 -373
- data/public/bcms/ckeditor/plugins/htmlwriter/plugin.js +0 -289
- data/public/bcms/ckeditor/plugins/iframedialog/plugin.js +0 -136
- data/public/bcms/ckeditor/plugins/image/dialogs/image.js +0 -1225
- data/public/bcms/ckeditor/plugins/image/plugin.js +0 -64
- data/public/bcms/ckeditor/plugins/indent/plugin.js +0 -323
- data/public/bcms/ckeditor/plugins/justify/plugin.js +0 -164
- data/public/bcms/ckeditor/plugins/keystrokes/plugin.js +0 -217
- data/public/bcms/ckeditor/plugins/link/dialogs/anchor.js +0 -98
- data/public/bcms/ckeditor/plugins/link/dialogs/link.js +0 -1217
- data/public/bcms/ckeditor/plugins/link/images/anchor.gif +0 -0
- data/public/bcms/ckeditor/plugins/link/plugin.js +0 -188
- data/public/bcms/ckeditor/plugins/list/plugin.js +0 -570
- data/public/bcms/ckeditor/plugins/listblock/plugin.js +0 -231
- data/public/bcms/ckeditor/plugins/maximize/plugin.js +0 -267
- data/public/bcms/ckeditor/plugins/menu/plugin.js +0 -377
- data/public/bcms/ckeditor/plugins/menubutton/plugin.js +0 -93
- data/public/bcms/ckeditor/plugins/newpage/plugin.js +0 -65
- data/public/bcms/ckeditor/plugins/pagebreak/images/pagebreak.gif +0 -0
- data/public/bcms/ckeditor/plugins/pagebreak/plugin.js +0 -96
- data/public/bcms/ckeditor/plugins/panel/plugin.js +0 -330
- data/public/bcms/ckeditor/plugins/panelbutton/plugin.js +0 -140
- data/public/bcms/ckeditor/plugins/pastefromword/dialogs/pastefromword.js +0 -307
- data/public/bcms/ckeditor/plugins/pastefromword/plugin.js +0 -54
- data/public/bcms/ckeditor/plugins/pastetext/dialogs/pastetext.js +0 -65
- data/public/bcms/ckeditor/plugins/pastetext/plugin.js +0 -142
- data/public/bcms/ckeditor/plugins/popup/plugin.js +0 -62
- data/public/bcms/ckeditor/plugins/preview/plugin.js +0 -97
- data/public/bcms/ckeditor/plugins/print/plugin.js +0 -41
- data/public/bcms/ckeditor/plugins/removeformat/plugin.js +0 -132
- data/public/bcms/ckeditor/plugins/resize/plugin.js +0 -115
- data/public/bcms/ckeditor/plugins/richcombo/plugin.js +0 -357
- data/public/bcms/ckeditor/plugins/save/plugin.js +0 -55
- data/public/bcms/ckeditor/plugins/scayt/dialogs/options.js +0 -494
- data/public/bcms/ckeditor/plugins/scayt/dialogs/toolbar.css +0 -71
- data/public/bcms/ckeditor/plugins/scayt/plugin.js +0 -511
- data/public/bcms/ckeditor/plugins/selection/plugin.js +0 -1072
- data/public/bcms/ckeditor/plugins/showblocks/images/block_address.png +0 -0
- data/public/bcms/ckeditor/plugins/showblocks/images/block_blockquote.png +0 -0
- data/public/bcms/ckeditor/plugins/showblocks/images/block_div.png +0 -0
- data/public/bcms/ckeditor/plugins/showblocks/images/block_h1.png +0 -0
- data/public/bcms/ckeditor/plugins/showblocks/images/block_h2.png +0 -0
- data/public/bcms/ckeditor/plugins/showblocks/images/block_h3.png +0 -0
- data/public/bcms/ckeditor/plugins/showblocks/images/block_h4.png +0 -0
- data/public/bcms/ckeditor/plugins/showblocks/images/block_h5.png +0 -0
- data/public/bcms/ckeditor/plugins/showblocks/images/block_h6.png +0 -0
- data/public/bcms/ckeditor/plugins/showblocks/images/block_p.png +0 -0
- data/public/bcms/ckeditor/plugins/showblocks/images/block_pre.png +0 -0
- data/public/bcms/ckeditor/plugins/showblocks/plugin.js +0 -153
- data/public/bcms/ckeditor/plugins/smiley/dialogs/smiley.js +0 -219
- data/public/bcms/ckeditor/plugins/smiley/images/angel_smile.gif +0 -0
- data/public/bcms/ckeditor/plugins/smiley/images/angry_smile.gif +0 -0
- data/public/bcms/ckeditor/plugins/smiley/images/broken_heart.gif +0 -0
- data/public/bcms/ckeditor/plugins/smiley/images/confused_smile.gif +0 -0
- data/public/bcms/ckeditor/plugins/smiley/images/cry_smile.gif +0 -0
- data/public/bcms/ckeditor/plugins/smiley/images/devil_smile.gif +0 -0
- data/public/bcms/ckeditor/plugins/smiley/images/embaressed_smile.gif +0 -0
- data/public/bcms/ckeditor/plugins/smiley/images/envelope.gif +0 -0
- data/public/bcms/ckeditor/plugins/smiley/images/heart.gif +0 -0
- data/public/bcms/ckeditor/plugins/smiley/images/kiss.gif +0 -0
- data/public/bcms/ckeditor/plugins/smiley/images/lightbulb.gif +0 -0
- data/public/bcms/ckeditor/plugins/smiley/images/omg_smile.gif +0 -0
- data/public/bcms/ckeditor/plugins/smiley/images/regular_smile.gif +0 -0
- data/public/bcms/ckeditor/plugins/smiley/images/sad_smile.gif +0 -0
- data/public/bcms/ckeditor/plugins/smiley/images/shades_smile.gif +0 -0
- data/public/bcms/ckeditor/plugins/smiley/images/teeth_smile.gif +0 -0
- data/public/bcms/ckeditor/plugins/smiley/images/thumbs_down.gif +0 -0
- data/public/bcms/ckeditor/plugins/smiley/images/thumbs_up.gif +0 -0
- data/public/bcms/ckeditor/plugins/smiley/images/tounge_smile.gif +0 -0
- data/public/bcms/ckeditor/plugins/smiley/images/whatchutalkingabout_smile.gif +0 -0
- data/public/bcms/ckeditor/plugins/smiley/images/wink_smile.gif +0 -0
- data/public/bcms/ckeditor/plugins/smiley/plugin.js +0 -74
- data/public/bcms/ckeditor/plugins/sourcearea/plugin.js +0 -185
- data/public/bcms/ckeditor/plugins/specialchar/dialogs/specialchar.js +0 -362
- data/public/bcms/ckeditor/plugins/specialchar/plugin.js +0 -29
- data/public/bcms/ckeditor/plugins/styles/plugin.js +0 -1242
- data/public/bcms/ckeditor/plugins/stylescombo/plugin.js +0 -295
- data/public/bcms/ckeditor/plugins/stylescombo/styles/default.js +0 -85
- data/public/bcms/ckeditor/plugins/tab/plugin.js +0 -266
- data/public/bcms/ckeditor/plugins/table/dialogs/table.js +0 -550
- data/public/bcms/ckeditor/plugins/table/plugin.js +0 -70
- data/public/bcms/ckeditor/plugins/tabletools/dialogs/tableCell.js +0 -328
- data/public/bcms/ckeditor/plugins/tabletools/plugin.js +0 -701
- data/public/bcms/ckeditor/plugins/templates/dialogs/templates.js +0 -170
- data/public/bcms/ckeditor/plugins/templates/plugin.js +0 -99
- data/public/bcms/ckeditor/plugins/templates/templates/default.js +0 -94
- data/public/bcms/ckeditor/plugins/templates/templates/images/template1.gif +0 -0
- data/public/bcms/ckeditor/plugins/templates/templates/images/template2.gif +0 -0
- data/public/bcms/ckeditor/plugins/templates/templates/images/template3.gif +0 -0
- data/public/bcms/ckeditor/plugins/toolbar/plugin.js +0 -412
- data/public/bcms/ckeditor/plugins/uicolor/dialogs/uicolor.js +0 -203
- data/public/bcms/ckeditor/plugins/uicolor/lang/en.js +0 -15
- data/public/bcms/ckeditor/plugins/uicolor/plugin.js +0 -35
- data/public/bcms/ckeditor/plugins/uicolor/uicolor.gif +0 -0
- data/public/bcms/ckeditor/plugins/uicolor/yui/assets/hue_bg.png +0 -0
- data/public/bcms/ckeditor/plugins/uicolor/yui/assets/hue_thumb.png +0 -0
- data/public/bcms/ckeditor/plugins/uicolor/yui/assets/picker_mask.png +0 -0
- data/public/bcms/ckeditor/plugins/uicolor/yui/assets/picker_thumb.png +0 -0
- data/public/bcms/ckeditor/plugins/uicolor/yui/assets/yui.css +0 -15
- data/public/bcms/ckeditor/plugins/uicolor/yui/yui.js +0 -71
- data/public/bcms/ckeditor/plugins/undo/plugin.js +0 -490
- data/public/bcms/ckeditor/plugins/wsc/dialogs/ciframe.html +0 -49
- data/public/bcms/ckeditor/plugins/wsc/dialogs/tmpFrameset.html +0 -52
- data/public/bcms/ckeditor/plugins/wsc/dialogs/wsc.css +0 -83
- data/public/bcms/ckeditor/plugins/wsc/dialogs/wsc.js +0 -169
- data/public/bcms/ckeditor/plugins/wsc/plugin.js +0 -32
- data/public/bcms/ckeditor/plugins/wysiwygarea/plugin.js +0 -636
- data/public/bcms/ckeditor/skins/kama/dialog.css +0 -742
- data/public/bcms/ckeditor/skins/kama/editor.css +0 -21
- data/public/bcms/ckeditor/skins/kama/elementspath.css +0 -68
- data/public/bcms/ckeditor/skins/kama/icons.css +0 -309
- data/public/bcms/ckeditor/skins/kama/icons.png +0 -0
- data/public/bcms/ckeditor/skins/kama/images/dialog_sides.gif +0 -0
- data/public/bcms/ckeditor/skins/kama/images/dialog_sides.png +0 -0
- data/public/bcms/ckeditor/skins/kama/images/dialog_sides_rtl.png +0 -0
- data/public/bcms/ckeditor/skins/kama/images/mini.gif +0 -0
- data/public/bcms/ckeditor/skins/kama/images/noimage.png +0 -0
- data/public/bcms/ckeditor/skins/kama/images/sprites.png +0 -0
- data/public/bcms/ckeditor/skins/kama/images/sprites_ie6.png +0 -0
- data/public/bcms/ckeditor/skins/kama/images/toolbar_start.gif +0 -0
- data/public/bcms/ckeditor/skins/kama/mainui.css +0 -139
- data/public/bcms/ckeditor/skins/kama/menu.css +0 -179
- data/public/bcms/ckeditor/skins/kama/panel.css +0 -203
- data/public/bcms/ckeditor/skins/kama/presets.css +0 -49
- data/public/bcms/ckeditor/skins/kama/reset.css +0 -78
- data/public/bcms/ckeditor/skins/kama/richcombo.css +0 -260
- data/public/bcms/ckeditor/skins/kama/skin.js +0 -291
- data/public/bcms/ckeditor/skins/kama/templates.css +0 -71
- data/public/bcms/ckeditor/skins/kama/toolbar.css +0 -384
- data/public/bcms/ckeditor/skins/office2003/dialog.css +0 -643
- data/public/bcms/ckeditor/skins/office2003/editor.css +0 -21
- data/public/bcms/ckeditor/skins/office2003/elementspath.css +0 -68
- data/public/bcms/ckeditor/skins/office2003/icons.css +0 -309
- data/public/bcms/ckeditor/skins/office2003/icons.png +0 -0
- data/public/bcms/ckeditor/skins/office2003/images/dialog_sides.gif +0 -0
- data/public/bcms/ckeditor/skins/office2003/images/dialog_sides.png +0 -0
- data/public/bcms/ckeditor/skins/office2003/images/dialog_sides_rtl.png +0 -0
- data/public/bcms/ckeditor/skins/office2003/images/mini.gif +0 -0
- data/public/bcms/ckeditor/skins/office2003/images/noimage.png +0 -0
- data/public/bcms/ckeditor/skins/office2003/images/sprites.png +0 -0
- data/public/bcms/ckeditor/skins/office2003/images/sprites_ie6.png +0 -0
- data/public/bcms/ckeditor/skins/office2003/mainui.css +0 -97
- data/public/bcms/ckeditor/skins/office2003/menu.css +0 -175
- data/public/bcms/ckeditor/skins/office2003/panel.css +0 -198
- data/public/bcms/ckeditor/skins/office2003/presets.css +0 -49
- data/public/bcms/ckeditor/skins/office2003/reset.css +0 -78
- data/public/bcms/ckeditor/skins/office2003/richcombo.css +0 -279
- data/public/bcms/ckeditor/skins/office2003/skin.js +0 -77
- data/public/bcms/ckeditor/skins/office2003/templates.css +0 -71
- data/public/bcms/ckeditor/skins/office2003/toolbar.css +0 -442
- data/public/bcms/ckeditor/skins/v2/dialog.css +0 -653
- data/public/bcms/ckeditor/skins/v2/editor.css +0 -21
- data/public/bcms/ckeditor/skins/v2/elementspath.css +0 -68
- data/public/bcms/ckeditor/skins/v2/icons.css +0 -309
- data/public/bcms/ckeditor/skins/v2/icons.png +0 -0
- data/public/bcms/ckeditor/skins/v2/images/dialog_sides.gif +0 -0
- data/public/bcms/ckeditor/skins/v2/images/dialog_sides.png +0 -0
- data/public/bcms/ckeditor/skins/v2/images/dialog_sides_rtl.png +0 -0
- data/public/bcms/ckeditor/skins/v2/images/mini.gif +0 -0
- data/public/bcms/ckeditor/skins/v2/images/noimage.png +0 -0
- data/public/bcms/ckeditor/skins/v2/images/sprites.png +0 -0
- data/public/bcms/ckeditor/skins/v2/images/sprites_ie6.png +0 -0
- data/public/bcms/ckeditor/skins/v2/images/toolbar_start.gif +0 -0
- data/public/bcms/ckeditor/skins/v2/mainui.css +0 -112
- data/public/bcms/ckeditor/skins/v2/menu.css +0 -178
- data/public/bcms/ckeditor/skins/v2/panel.css +0 -198
- data/public/bcms/ckeditor/skins/v2/presets.css +0 -50
- data/public/bcms/ckeditor/skins/v2/reset.css +0 -78
- data/public/bcms/ckeditor/skins/v2/richcombo.css +0 -275
- data/public/bcms/ckeditor/skins/v2/skin.js +0 -73
- data/public/bcms/ckeditor/skins/v2/templates.css +0 -71
- data/public/bcms/ckeditor/skins/v2/toolbar.css +0 -399
- data/public/bcms/ckeditor/tests/_assets/sample.css +0 -4
- data/public/bcms/ckeditor/tests/_assets/sample.js +0 -1
- data/public/bcms/ckeditor/tests/_assets/sample.txt +0 -1
- data/public/bcms/ckeditor/tests/_assets/sample.xml +0 -5
- data/public/bcms/ckeditor/tests/_assets/sample_xml.txt +0 -5
- data/public/bcms/ckeditor/tests/core/_editor/custom_config_1.js +0 -10
- data/public/bcms/ckeditor/tests/core/_editor/custom_config_2.js +0 -9
- data/public/bcms/ckeditor/tests/core/ajax.html +0 -163
- data/public/bcms/ckeditor/tests/core/bootstrap.html +0 -66
- data/public/bcms/ckeditor/tests/core/ckeditor.html +0 -160
- data/public/bcms/ckeditor/tests/core/dom/document.html +0 -126
- data/public/bcms/ckeditor/tests/core/dom/documentfragment.html +0 -292
- data/public/bcms/ckeditor/tests/core/dom/element.html +0 -637
- data/public/bcms/ckeditor/tests/core/dom/node.html +0 -164
- data/public/bcms/ckeditor/tests/core/dom/range.html +0 -2411
- data/public/bcms/ckeditor/tests/core/dom/text.html +0 -128
- data/public/bcms/ckeditor/tests/core/dom/walker.html +0 -340
- data/public/bcms/ckeditor/tests/core/dom/window.html +0 -53
- data/public/bcms/ckeditor/tests/core/editor.html +0 -123
- data/public/bcms/ckeditor/tests/core/env.html +0 -52
- data/public/bcms/ckeditor/tests/core/event.html +0 -487
- data/public/bcms/ckeditor/tests/core/htmlparser/fragment.html +0 -188
- data/public/bcms/ckeditor/tests/core/htmlparser/htmlparser.html +0 -91
- data/public/bcms/ckeditor/tests/core/plugins/myplugins/sample/my_plugin.js +0 -3
- data/public/bcms/ckeditor/tests/core/plugins.html +0 -45
- data/public/bcms/ckeditor/tests/core/scriptloader.html +0 -52
- data/public/bcms/ckeditor/tests/core/tools.html +0 -170
- data/public/bcms/ckeditor/tests/core/xml.html +0 -150
- data/public/bcms/ckeditor/tests/plugins/domiterator/domiterator.html +0 -236
- data/public/bcms/ckeditor/tests/plugins/htmldataprocessor/htmldataprocessor.html +0 -386
- data/public/bcms/ckeditor/tests/plugins/link/link.html +0 -123
- data/public/bcms/ckeditor/tests/plugins/list/list.html +0 -217
- data/public/bcms/ckeditor/tests/plugins/selection/selection.html +0 -49
- data/public/bcms/ckeditor/tests/plugins/styles/styles.html +0 -596
- data/public/bcms/ckeditor/tests/test.css +0 -81
- data/public/bcms/ckeditor/tests/test.js +0 -93
- data/public/bcms/ckeditor/tests/testall.html +0 -114
- data/public/bcms/ckeditor/tests/yuitest.js +0 -75
- data/public/bcms/ckeditor/themes/default/theme.js +0 -232
- data/public/favicon.ico +0 -0
- data/public/images/cms/administration/user_browser_bg.gif +0 -0
- data/public/images/cms/bg.png +0 -0
- data/public/images/cms/bl_curve.png +0 -0
- data/public/images/cms/bottom_cap.png +0 -0
- data/public/images/cms/bottom_cap_content.png +0 -0
- data/public/images/cms/browse.gif +0 -0
- data/public/images/cms/browser_media_logo.png +0 -0
- data/public/images/cms/browsercms_logo.png +0 -0
- data/public/images/cms/buttons/button.png +0 -0
- data/public/images/cms/buttons/button_bg.png +0 -0
- data/public/images/cms/buttons/button_cap.png +0 -0
- data/public/images/cms/buttons/button_cap_h.png +0 -0
- data/public/images/cms/buttons/button_cap_off.gif +0 -0
- data/public/images/cms/buttons/button_cap_off_middle.gif +0 -0
- data/public/images/cms/buttons/button_h.png +0 -0
- data/public/images/cms/buttons/button_left_bg.png +0 -0
- data/public/images/cms/buttons/button_off.png +0 -0
- data/public/images/cms/buttons/button_off_middle.png +0 -0
- data/public/images/cms/buttons/delete_x.png +0 -0
- data/public/images/cms/buttons/delete_x_disabled.png +0 -0
- data/public/images/cms/buttons/delete_x_h.png +0 -0
- data/public/images/cms/buttons/sm_button.gif +0 -0
- data/public/images/cms/buttons/sm_button_2.gif +0 -0
- data/public/images/cms/buttons/sm_button_2_h.gif +0 -0
- data/public/images/cms/buttons/sm_button_h.gif +0 -0
- data/public/images/cms/containers/add.gif +0 -0
- data/public/images/cms/containers/alpha.png +0 -0
- data/public/images/cms/containers/beta.png +0 -0
- data/public/images/cms/containers/delete.gif +0 -0
- data/public/images/cms/containers/down.gif +0 -0
- data/public/images/cms/containers/edit.gif +0 -0
- data/public/images/cms/containers/up.gif +0 -0
- data/public/images/cms/containers/view.gif +0 -0
- data/public/images/cms/content_bg.gif +0 -0
- data/public/images/cms/dashboard/bottom_cap.png +0 -0
- data/public/images/cms/dashboard/bottom_cap_content.png +0 -0
- data/public/images/cms/dashboard/header_bg.gif +0 -0
- data/public/images/cms/dashboard/header_left_bg.gif +0 -0
- data/public/images/cms/dashboard/table_header_bg.gif +0 -0
- data/public/images/cms/dashboard/top_cap.png +0 -0
- data/public/images/cms/dashed.gif +0 -0
- data/public/images/cms/datepicker/clear.gif +0 -0
- data/public/images/cms/datepicker/close.gif +0 -0
- data/public/images/cms/dk_button_l.gif +0 -0
- data/public/images/cms/dk_button_r.gif +0 -0
- data/public/images/cms/dot.png +0 -0
- data/public/images/cms/draft_status.gif +0 -0
- data/public/images/cms/gray_long_bg.gif +0 -0
- data/public/images/cms/icons/actions/add.png +0 -0
- data/public/images/cms/icons/actions/config.png +0 -0
- data/public/images/cms/icons/actions/connect.png +0 -0
- data/public/images/cms/icons/actions/delete.png +0 -0
- data/public/images/cms/icons/actions/down.png +0 -0
- data/public/images/cms/icons/actions/edit.png +0 -0
- data/public/images/cms/icons/actions/folder.png +0 -0
- data/public/images/cms/icons/actions/folder_add.png +0 -0
- data/public/images/cms/icons/actions/folder_delete.png +0 -0
- data/public/images/cms/icons/actions/folder_edit.png +0 -0
- data/public/images/cms/icons/actions/folder_move.png +0 -0
- data/public/images/cms/icons/actions/folder_open.png +0 -0
- data/public/images/cms/icons/actions/history.png +0 -0
- data/public/images/cms/icons/actions/home.png +0 -0
- data/public/images/cms/icons/actions/left.png +0 -0
- data/public/images/cms/icons/actions/link.png +0 -0
- data/public/images/cms/icons/actions/page.png +0 -0
- data/public/images/cms/icons/actions/page_add.png +0 -0
- data/public/images/cms/icons/actions/page_edit.png +0 -0
- data/public/images/cms/icons/actions/page_move.png +0 -0
- data/public/images/cms/icons/actions/redo.png +0 -0
- data/public/images/cms/icons/actions/refresh.png +0 -0
- data/public/images/cms/icons/actions/right.png +0 -0
- data/public/images/cms/icons/actions/root_folder.png +0 -0
- data/public/images/cms/icons/actions/root_link.png +0 -0
- data/public/images/cms/icons/actions/root_page.png +0 -0
- data/public/images/cms/icons/actions/undo.png +0 -0
- data/public/images/cms/icons/actions/up.png +0 -0
- data/public/images/cms/icons/actions/view.png +0 -0
- data/public/images/cms/icons/file_types/doc.png +0 -0
- data/public/images/cms/icons/file_types/file.png +0 -0
- data/public/images/cms/icons/file_types/gif.png +0 -0
- data/public/images/cms/icons/file_types/htm.png +0 -0
- data/public/images/cms/icons/file_types/pdf.png +0 -0
- data/public/images/cms/icons/file_types/ppt.png +0 -0
- data/public/images/cms/icons/file_types/swf.png +0 -0
- data/public/images/cms/icons/file_types/txt.png +0 -0
- data/public/images/cms/icons/file_types/xls.png +0 -0
- data/public/images/cms/icons/file_types/xml.png +0 -0
- data/public/images/cms/icons/file_types/zip.png +0 -0
- data/public/images/cms/icons/status/archived.gif +0 -0
- data/public/images/cms/icons/status/draft.gif +0 -0
- data/public/images/cms/icons/status/hidden.gif +0 -0
- data/public/images/cms/icons/status/locked.gif +0 -0
- data/public/images/cms/icons/status/published.gif +0 -0
- data/public/images/cms/icons/status/unlocked.gif +0 -0
- data/public/images/cms/icons/user.png +0 -0
- data/public/images/cms/login_bg.jpg +0 -0
- data/public/images/cms/login_bottom.jpg +0 -0
- data/public/images/cms/login_top.gif +0 -0
- data/public/images/cms/lt_button_bg.gif +0 -0
- data/public/images/cms/lt_button_l.gif +0 -0
- data/public/images/cms/lt_button_r.gif +0 -0
- data/public/images/cms/menu/block_cap_h.gif +0 -0
- data/public/images/cms/menu/bottom_cap.png +0 -0
- data/public/images/cms/menu/bottom_cap_menu.png +0 -0
- data/public/images/cms/menu/bottom_cap_menu_first.png +0 -0
- data/public/images/cms/menu/menu_header_first_bg.gif +0 -0
- data/public/images/cms/menu/selected_block_cap.gif +0 -0
- data/public/images/cms/menu/top_cap.png +0 -0
- data/public/images/cms/menu/top_cap_menu_header.png +0 -0
- data/public/images/cms/menu.png +0 -0
- data/public/images/cms/menu_h.gif +0 -0
- data/public/images/cms/menu_header.png +0 -0
- data/public/images/cms/menu_open.png +0 -0
- data/public/images/cms/menu_open_bg.gif +0 -0
- data/public/images/cms/nav/on_bg.gif +0 -0
- data/public/images/cms/nav.png +0 -0
- data/public/images/cms/nav_admin.gif +0 -0
- data/public/images/cms/nav_admin_h.gif +0 -0
- data/public/images/cms/nav_admin_on.gif +0 -0
- data/public/images/cms/nav_cap.png +0 -0
- data/public/images/cms/nav_cap_h.gif +0 -0
- data/public/images/cms/nav_content_library.gif +0 -0
- data/public/images/cms/nav_content_library_h.gif +0 -0
- data/public/images/cms/nav_content_library_on.gif +0 -0
- data/public/images/cms/nav_dash.gif +0 -0
- data/public/images/cms/nav_dash_h.gif +0 -0
- data/public/images/cms/nav_dash_on.gif +0 -0
- data/public/images/cms/nav_h.gif +0 -0
- data/public/images/cms/nav_sitemap.gif +0 -0
- data/public/images/cms/nav_sitemap_h.gif +0 -0
- data/public/images/cms/nav_sitemap_on.gif +0 -0
- data/public/images/cms/page_toolbar/page_toolbar_bg.gif +0 -0
- data/public/images/cms/page_toolbar/page_toolbar_inset_bg.gif +0 -0
- data/public/images/cms/page_toolbar/page_toolbar_inset_draft_bg.gif +0 -0
- data/public/images/cms/page_toolbar/page_toolbar_inset_draft_l.gif +0 -0
- data/public/images/cms/page_toolbar/page_toolbar_inset_draft_r.gif +0 -0
- data/public/images/cms/page_toolbar/page_toolbar_inset_l.gif +0 -0
- data/public/images/cms/page_toolbar/page_toolbar_inset_published_bg.gif +0 -0
- data/public/images/cms/page_toolbar/page_toolbar_inset_published_l.gif +0 -0
- data/public/images/cms/page_toolbar/page_toolbar_inset_published_r.gif +0 -0
- data/public/images/cms/page_toolbar/page_toolbar_inset_r.gif +0 -0
- data/public/images/cms/page_toolbar/page_toolbar_l.gif +0 -0
- data/public/images/cms/page_toolbar/page_toolbar_r.gif +0 -0
- data/public/images/cms/page_toolbar/status_draft_bg.gif +0 -0
- data/public/images/cms/page_toolbar/status_draft_l.gif +0 -0
- data/public/images/cms/page_toolbar/status_l.gif +0 -0
- data/public/images/cms/page_toolbar/status_published_bg.gif +0 -0
- data/public/images/cms/page_toolbar/status_published_l.gif +0 -0
- data/public/images/cms/page_toolbar/visual_editor_bg.gif +0 -0
- data/public/images/cms/page_toolbar/visual_editor_end.gif +0 -0
- data/public/images/cms/page_toolbar/visual_editor_r.gif +0 -0
- data/public/images/cms/page_toolbar/visual_editor_state_bg.gif +0 -0
- data/public/images/cms/pages/add_connectable.gif +0 -0
- data/public/images/cms/pages/connect_connectable.gif +0 -0
- data/public/images/cms/pages/container_border.gif +0 -0
- data/public/images/cms/pages/container_border_l.gif +0 -0
- data/public/images/cms/pages/container_border_r.gif +0 -0
- data/public/images/cms/pages/delete_connectable.gif +0 -0
- data/public/images/cms/pages/down_connectable.gif +0 -0
- data/public/images/cms/pages/down_connectable_disabled.gif +0 -0
- data/public/images/cms/pages/edit_connectable.gif +0 -0
- data/public/images/cms/pages/edit_connectable_2.gif +0 -0
- data/public/images/cms/pages/show_connectable.gif +0 -0
- data/public/images/cms/pages/up_connectable.gif +0 -0
- data/public/images/cms/pages/up_connectable_disabled.gif +0 -0
- data/public/images/cms/pagination/first.gif +0 -0
- data/public/images/cms/pagination/first_h.gif +0 -0
- data/public/images/cms/pagination/input.gif +0 -0
- data/public/images/cms/pagination/last.gif +0 -0
- data/public/images/cms/pagination/last_h.gif +0 -0
- data/public/images/cms/pagination/next.gif +0 -0
- data/public/images/cms/pagination/next_h.gif +0 -0
- data/public/images/cms/pagination/previous.gif +0 -0
- data/public/images/cms/pagination/previous_h.gif +0 -0
- data/public/images/cms/published_status.gif +0 -0
- data/public/images/cms/search.png +0 -0
- data/public/images/cms/search_submit.gif +0 -0
- data/public/images/cms/search_submit_h.gif +0 -0
- data/public/images/cms/searchbox_gradient.gif +0 -0
- data/public/images/cms/select_bg.gif +0 -0
- data/public/images/cms/select_bg_2.gif +0 -0
- data/public/images/cms/sitemap/bottom_cap.png +0 -0
- data/public/images/cms/sitemap/buffer_caps.png +0 -0
- data/public/images/cms/sitemap/contract.png +0 -0
- data/public/images/cms/sitemap/corners.gif +0 -0
- data/public/images/cms/sitemap/corners_hover.gif +0 -0
- data/public/images/cms/sitemap/divider.gif +0 -0
- data/public/images/cms/sitemap/expand.png +0 -0
- data/public/images/cms/sitemap/gradient.gif +0 -0
- data/public/images/cms/sitemap/gray_contract.png +0 -0
- data/public/images/cms/sitemap/gray_expand.png +0 -0
- data/public/images/cms/sitemap/no_contents.png +0 -0
- data/public/images/cms/sitemap/site_root_cap.png +0 -0
- data/public/images/cms/sitemap/tooltip.gif +0 -0
- data/public/images/cms/sitemap/top_cap_content.png +0 -0
- data/public/images/cms/solid.gif +0 -0
- data/public/images/cms/table/bl.gif +0 -0
- data/public/images/cms/table/br.gif +0 -0
- data/public/images/cms/table/divider.gif +0 -0
- data/public/images/cms/table/td_cap_first_h.gif +0 -0
- data/public/images/cms/table/td_cap_first_s.gif +0 -0
- data/public/images/cms/table/td_cap_last_h.gif +0 -0
- data/public/images/cms/table/td_cap_last_s.gif +0 -0
- data/public/images/cms/table/td_last_bg.gif +0 -0
- data/public/images/cms/table/th_bg.gif +0 -0
- data/public/images/cms/table/th_divider.gif +0 -0
- data/public/images/cms/table/th_last_bg.gif +0 -0
- data/public/images/cms/table/tl.gif +0 -0
- data/public/images/cms/table/tr.gif +0 -0
- data/public/images/cms/table/tr_bg.gif +0 -0
- data/public/images/cms/thickbox/loadingAnimation.gif +0 -0
- data/public/images/cms/thickbox/macFFBgHack.png +0 -0
- data/public/images/cms/toolbar_bg.png +0 -0
- data/public/images/cms/top_cap.png +0 -0
- data/public/images/cms/top_cap_content.png +0 -0
- data/public/images/cms/top_cap_menu_header.png +0 -0
- data/public/images/cms/user_search_submit.gif +0 -0
- data/public/images/cms/usercontrols_bg.png +0 -0
- data/public/images/cms/usercontrols_bg_cap.png +0 -0
- data/public/images/rails.png +0 -0
- data/public/javascripts/application.js +0 -2
- data/public/javascripts/cms/application.js +0 -148
- data/public/javascripts/cms/content_library.js +0 -36
- data/public/javascripts/cms/editor.js +0 -50
- data/public/javascripts/cms/sitemap.js +0 -438
- data/public/javascripts/controls.js +0 -963
- data/public/javascripts/dragdrop.js +0 -973
- data/public/javascripts/effects.js +0 -1128
- data/public/javascripts/jquery-ui.js +0 -591
- data/public/javascripts/jquery.contextMenu.js +0 -211
- data/public/javascripts/jquery.cookie.js +0 -96
- data/public/javascripts/jquery.dimensions.js +0 -119
- data/public/javascripts/jquery.js +0 -11
- data/public/javascripts/jquery.selectbox-0.5.js +0 -209
- data/public/javascripts/jquery.taglist.js +0 -136
- data/public/javascripts/jquery.thickbox.js +0 -10
- data/public/javascripts/prototype.js +0 -4320
- data/public/robots.txt +0 -5
- data/public/site/customconfig.js +0 -1
- data/public/stylesheets/cms/administration.css +0 -91
- data/public/stylesheets/cms/application.css +0 -166
- data/public/stylesheets/cms/block.css +0 -26
- data/public/stylesheets/cms/buttons.css +0 -120
- data/public/stylesheets/cms/content_library.css +0 -139
- data/public/stylesheets/cms/content_types.css +0 -4
- data/public/stylesheets/cms/dashboard.css +0 -118
- data/public/stylesheets/cms/data_table.css +0 -156
- data/public/stylesheets/cms/date_picker.css +0 -73
- data/public/stylesheets/cms/form_layout.css +0 -279
- data/public/stylesheets/cms/jquery.contextMenu.css +0 -61
- data/public/stylesheets/cms/login.css +0 -78
- data/public/stylesheets/cms/menu.css +0 -116
- data/public/stylesheets/cms/nav.css +0 -99
- data/public/stylesheets/cms/page_toolbar.css +0 -135
- data/public/stylesheets/cms/reset.css +0 -46
- data/public/stylesheets/cms/selectbox.css +0 -56
- data/public/stylesheets/cms/sitemap.css +0 -390
- data/public/stylesheets/cms/taglist.css +0 -18
- data/public/stylesheets/cms/thickbox.css +0 -163
- data/script/about +0 -4
- data/script/console +0 -3
- data/script/dbconsole +0 -3
- data/script/destroy +0 -3
- data/script/generate +0 -3
- data/script/performance/benchmarker +0 -3
- data/script/performance/profiler +0 -3
- data/script/plugin +0 -3
- data/script/runner +0 -3
- data/script/server +0 -3
- data/test/fixtures/content_type_groups.yml +0 -13
- data/test/fixtures/content_types.yml +0 -50
- data/test/fixtures/group_permissions.yml +0 -16
- data/test/fixtures/group_type_permissions.yml +0 -11
- data/test/fixtures/group_types.yml +0 -25
- data/test/fixtures/groups.yml +0 -25
- data/test/fixtures/permissions.yml +0 -28
- data/test/fixtures/user_group_memberships.yml +0 -11
- data/test/fixtures/users.yml +0 -15
@@ -1,196 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.
|
3
|
-
For licensing, see LICENSE.html or http://ckeditor.com/license
|
4
|
-
*/
|
5
|
-
|
6
|
-
/**
|
7
|
-
* A lightweight representation of an HTML element.
|
8
|
-
* @param {String} name The element name.
|
9
|
-
* @param {Object} attributes And object holding all attributes defined for
|
10
|
-
* this element.
|
11
|
-
* @constructor
|
12
|
-
* @example
|
13
|
-
*/
|
14
|
-
CKEDITOR.htmlParser.element = function( name, attributes )
|
15
|
-
{
|
16
|
-
/**
|
17
|
-
* The element name.
|
18
|
-
* @type String
|
19
|
-
* @example
|
20
|
-
*/
|
21
|
-
this.name = name;
|
22
|
-
|
23
|
-
/**
|
24
|
-
* Holds the attributes defined for this element.
|
25
|
-
* @type Object
|
26
|
-
* @example
|
27
|
-
*/
|
28
|
-
this.attributes = attributes;
|
29
|
-
|
30
|
-
/**
|
31
|
-
* The nodes that are direct children of this element.
|
32
|
-
* @type Array
|
33
|
-
* @example
|
34
|
-
*/
|
35
|
-
this.children = [];
|
36
|
-
|
37
|
-
var dtd = CKEDITOR.dtd,
|
38
|
-
isBlockLike = !!( dtd.$block[ name ] || dtd.$listItem[ name ] || dtd.$tableContent[ name ] ),
|
39
|
-
isEmpty = !!dtd.$empty[ name ];
|
40
|
-
|
41
|
-
this.isEmpty = isEmpty;
|
42
|
-
this.isUnknown = !dtd[ name ];
|
43
|
-
|
44
|
-
/** @private */
|
45
|
-
this._ =
|
46
|
-
{
|
47
|
-
isBlockLike : isBlockLike,
|
48
|
-
hasInlineStarted : isEmpty || !isBlockLike
|
49
|
-
};
|
50
|
-
};
|
51
|
-
|
52
|
-
(function()
|
53
|
-
{
|
54
|
-
// Used to sort attribute entries in an array, where the first element of
|
55
|
-
// each object is the attribute name.
|
56
|
-
var sortAttribs = function( a, b )
|
57
|
-
{
|
58
|
-
a = a[0];
|
59
|
-
b = b[0];
|
60
|
-
return a < b ? -1 : a > b ? 1 : 0;
|
61
|
-
};
|
62
|
-
|
63
|
-
CKEDITOR.htmlParser.element.prototype =
|
64
|
-
{
|
65
|
-
/**
|
66
|
-
* The node type. This is a constant value set to {@link CKEDITOR.NODE_ELEMENT}.
|
67
|
-
* @type Number
|
68
|
-
* @example
|
69
|
-
*/
|
70
|
-
type : CKEDITOR.NODE_ELEMENT,
|
71
|
-
|
72
|
-
/**
|
73
|
-
* Adds a node to the element children list.
|
74
|
-
* @param {Object} node The node to be added. It can be any of of the
|
75
|
-
* following types: {@link CKEDITOR.htmlParser.element},
|
76
|
-
* {@link CKEDITOR.htmlParser.text} and
|
77
|
-
* {@link CKEDITOR.htmlParser.comment}.
|
78
|
-
* @function
|
79
|
-
* @example
|
80
|
-
*/
|
81
|
-
add : CKEDITOR.htmlParser.fragment.prototype.add,
|
82
|
-
|
83
|
-
/**
|
84
|
-
* Clone this element.
|
85
|
-
* @returns {CKEDITOR.htmlParser.element} The element clone.
|
86
|
-
* @example
|
87
|
-
*/
|
88
|
-
clone : function()
|
89
|
-
{
|
90
|
-
return new CKEDITOR.htmlParser.element( this.name, this.attributes );
|
91
|
-
},
|
92
|
-
|
93
|
-
/**
|
94
|
-
* Writes the element HTML to a CKEDITOR.htmlWriter.
|
95
|
-
* @param {CKEDITOR.htmlWriter} writer The writer to which write the HTML.
|
96
|
-
* @example
|
97
|
-
*/
|
98
|
-
writeHtml : function( writer, filter )
|
99
|
-
{
|
100
|
-
var attributes = this.attributes;
|
101
|
-
|
102
|
-
// The "_cke_replacedata" indicates that this element is replacing
|
103
|
-
// a data snippet, which should be outputted as is.
|
104
|
-
if ( attributes._cke_replacedata )
|
105
|
-
{
|
106
|
-
writer.write( attributes._cke_replacedata );
|
107
|
-
return;
|
108
|
-
}
|
109
|
-
|
110
|
-
// Ignore cke: prefixes when writing HTML.
|
111
|
-
var element = this,
|
112
|
-
writeName = element.name,
|
113
|
-
a, value;
|
114
|
-
|
115
|
-
if ( filter )
|
116
|
-
{
|
117
|
-
while ( true )
|
118
|
-
{
|
119
|
-
if ( !( writeName = filter.onElementName( writeName ) ) )
|
120
|
-
return;
|
121
|
-
|
122
|
-
element.name = writeName;
|
123
|
-
|
124
|
-
if ( !( element = filter.onElement( element ) ) )
|
125
|
-
return;
|
126
|
-
|
127
|
-
if ( element.name == writeName )
|
128
|
-
break;
|
129
|
-
|
130
|
-
writeName = element.name;
|
131
|
-
if ( !writeName ) // Send children.
|
132
|
-
{
|
133
|
-
CKEDITOR.htmlParser.fragment.prototype.writeHtml.apply( element, arguments );
|
134
|
-
return;
|
135
|
-
}
|
136
|
-
}
|
137
|
-
|
138
|
-
// The element may have been changed, so update the local
|
139
|
-
// references.
|
140
|
-
attributes = element.attributes;
|
141
|
-
}
|
142
|
-
|
143
|
-
// Open element tag.
|
144
|
-
writer.openTag( writeName, attributes );
|
145
|
-
|
146
|
-
if ( writer.sortAttributes )
|
147
|
-
{
|
148
|
-
// Copy all attributes to an array.
|
149
|
-
var attribsArray = [];
|
150
|
-
for ( a in attributes )
|
151
|
-
{
|
152
|
-
value = attributes[ a ];
|
153
|
-
|
154
|
-
if ( filter && ( !( a = filter.onAttributeName( a ) ) || ( value = filter.onAttribute( element, a, value ) ) === false ) )
|
155
|
-
continue;
|
156
|
-
|
157
|
-
attribsArray.push( [ a, value ] );
|
158
|
-
}
|
159
|
-
|
160
|
-
// Sort the attributes by name.
|
161
|
-
attribsArray.sort( sortAttribs );
|
162
|
-
|
163
|
-
// Send the attributes.
|
164
|
-
for ( var i = 0, len = attribsArray.length ; i < len ; i++ )
|
165
|
-
{
|
166
|
-
var attrib = attribsArray[ i ];
|
167
|
-
writer.attribute( attrib[0], attrib[1] );
|
168
|
-
}
|
169
|
-
}
|
170
|
-
else
|
171
|
-
{
|
172
|
-
for ( a in attributes )
|
173
|
-
{
|
174
|
-
value = attributes[ a ];
|
175
|
-
|
176
|
-
if ( filter && ( !( a = filter.onAttributeName( a ) ) || ( value = filter.onAttribute( element, a, value ) ) === false ) )
|
177
|
-
continue;
|
178
|
-
|
179
|
-
writer.attribute( a, value );
|
180
|
-
}
|
181
|
-
}
|
182
|
-
|
183
|
-
// Close the tag.
|
184
|
-
writer.openTagClose( writeName, element.isEmpty );
|
185
|
-
|
186
|
-
if ( !element.isEmpty )
|
187
|
-
{
|
188
|
-
// Send children.
|
189
|
-
CKEDITOR.htmlParser.fragment.prototype.writeHtml.apply( element, arguments );
|
190
|
-
|
191
|
-
// Close the element.
|
192
|
-
writer.closeTag( writeName );
|
193
|
-
}
|
194
|
-
}
|
195
|
-
};
|
196
|
-
})();
|
@@ -1,233 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.
|
3
|
-
For licensing, see LICENSE.html or http://ckeditor.com/license
|
4
|
-
*/
|
5
|
-
|
6
|
-
(function()
|
7
|
-
{
|
8
|
-
CKEDITOR.htmlParser.filter = CKEDITOR.tools.createClass(
|
9
|
-
{
|
10
|
-
$ : function( rules )
|
11
|
-
{
|
12
|
-
this._ =
|
13
|
-
{
|
14
|
-
elementNames : [],
|
15
|
-
attributeNames : [],
|
16
|
-
elements : { $length : 0 },
|
17
|
-
attributes : { $length : 0 }
|
18
|
-
};
|
19
|
-
|
20
|
-
if ( rules )
|
21
|
-
this.addRules( rules, 10 );
|
22
|
-
},
|
23
|
-
|
24
|
-
proto :
|
25
|
-
{
|
26
|
-
addRules : function( rules, priority )
|
27
|
-
{
|
28
|
-
if ( typeof priority != 'number' )
|
29
|
-
priority = 10;
|
30
|
-
|
31
|
-
// Add the elementNames.
|
32
|
-
addItemsToList( this._.elementNames, rules.elementNames, priority );
|
33
|
-
|
34
|
-
// Add the attributeNames.
|
35
|
-
addItemsToList( this._.attributeNames, rules.attributeNames, priority );
|
36
|
-
|
37
|
-
// Add the elements.
|
38
|
-
addNamedItems( this._.elements, rules.elements, priority );
|
39
|
-
|
40
|
-
// Add the attributes.
|
41
|
-
addNamedItems( this._.attributes, rules.attributes, priority );
|
42
|
-
|
43
|
-
// Add the text.
|
44
|
-
this._.text = transformNamedItem( this._.text, rules.text, priority ) || this._.text;
|
45
|
-
|
46
|
-
// Add the comment.
|
47
|
-
this._.comment = transformNamedItem( this._.comment, rules.comment, priority ) || this._.comment;
|
48
|
-
},
|
49
|
-
|
50
|
-
onElementName : function( name )
|
51
|
-
{
|
52
|
-
return filterName( name, this._.elementNames );
|
53
|
-
},
|
54
|
-
|
55
|
-
onAttributeName : function( name )
|
56
|
-
{
|
57
|
-
return filterName( name, this._.attributeNames );
|
58
|
-
},
|
59
|
-
|
60
|
-
onText : function( text )
|
61
|
-
{
|
62
|
-
var textFilter = this._.text;
|
63
|
-
return textFilter ? textFilter.filter( text ) : text;
|
64
|
-
},
|
65
|
-
|
66
|
-
onComment : function( commentText )
|
67
|
-
{
|
68
|
-
var textFilter = this._.comment;
|
69
|
-
return textFilter ? textFilter.filter( commentText ) : commentText;
|
70
|
-
},
|
71
|
-
|
72
|
-
onElement : function( element )
|
73
|
-
{
|
74
|
-
// We must apply filters set to the specific element name as
|
75
|
-
// well as those set to the generic $ name. So, add both to an
|
76
|
-
// array and process them in a small loop.
|
77
|
-
var filters = [ this._.elements[ element.name ], this._.elements.$ ],
|
78
|
-
filter, ret;
|
79
|
-
|
80
|
-
for ( var i = 0 ; i < 2 ; i++ )
|
81
|
-
{
|
82
|
-
filter = filters[ i ];
|
83
|
-
if ( filter )
|
84
|
-
{
|
85
|
-
ret = filter.filter( element, this );
|
86
|
-
|
87
|
-
if ( ret === false )
|
88
|
-
return null;
|
89
|
-
|
90
|
-
if ( ret && ret != element )
|
91
|
-
return this.onElement( ret );
|
92
|
-
}
|
93
|
-
}
|
94
|
-
|
95
|
-
return element;
|
96
|
-
},
|
97
|
-
|
98
|
-
onAttribute : function( element, name, value )
|
99
|
-
{
|
100
|
-
var filter = this._.attributes[ name ];
|
101
|
-
|
102
|
-
if ( filter )
|
103
|
-
{
|
104
|
-
var ret = filter.filter( value, element, this );
|
105
|
-
|
106
|
-
if ( ret === false )
|
107
|
-
return false;
|
108
|
-
|
109
|
-
if ( typeof ret != 'undefined' )
|
110
|
-
return ret;
|
111
|
-
}
|
112
|
-
|
113
|
-
return value;
|
114
|
-
}
|
115
|
-
}
|
116
|
-
});
|
117
|
-
|
118
|
-
function filterName( name, filters )
|
119
|
-
{
|
120
|
-
for ( var i = 0 ; name && i < filters.length ; i++ )
|
121
|
-
{
|
122
|
-
var filter = filters[ i ];
|
123
|
-
name = name.replace( filter[ 0 ], filter[ 1 ] );
|
124
|
-
}
|
125
|
-
return name;
|
126
|
-
}
|
127
|
-
|
128
|
-
function addItemsToList( list, items, priority )
|
129
|
-
{
|
130
|
-
var i, j,
|
131
|
-
listLength = list.length,
|
132
|
-
itemsLength = items && items.length;
|
133
|
-
|
134
|
-
if ( itemsLength )
|
135
|
-
{
|
136
|
-
// Find the index to insert the items at.
|
137
|
-
for ( i = 0 ; i < listLength && list[ i ].pri < priority ; i++ )
|
138
|
-
{ /*jsl:pass*/ }
|
139
|
-
|
140
|
-
// Add all new items to the list at the specific index.
|
141
|
-
for ( j = itemsLength - 1 ; j >= 0 ; j-- )
|
142
|
-
{
|
143
|
-
var item = items[ j ];
|
144
|
-
item.pri = priority;
|
145
|
-
list.splice( i, 0, item );
|
146
|
-
}
|
147
|
-
}
|
148
|
-
}
|
149
|
-
|
150
|
-
function addNamedItems( hashTable, items, priority )
|
151
|
-
{
|
152
|
-
if ( items )
|
153
|
-
{
|
154
|
-
for ( var name in items )
|
155
|
-
{
|
156
|
-
var current = hashTable[ name ];
|
157
|
-
|
158
|
-
hashTable[ name ] =
|
159
|
-
transformNamedItem(
|
160
|
-
current,
|
161
|
-
items[ name ],
|
162
|
-
priority );
|
163
|
-
|
164
|
-
if ( !current )
|
165
|
-
hashTable.$length++;
|
166
|
-
}
|
167
|
-
}
|
168
|
-
}
|
169
|
-
|
170
|
-
function transformNamedItem( current, item, priority )
|
171
|
-
{
|
172
|
-
if ( item )
|
173
|
-
{
|
174
|
-
item.pri = priority;
|
175
|
-
|
176
|
-
if ( current )
|
177
|
-
{
|
178
|
-
// If the current item is not an Array, transform it.
|
179
|
-
if ( !current.splice )
|
180
|
-
{
|
181
|
-
if ( current.pri > priority )
|
182
|
-
current = [ item, current ];
|
183
|
-
else
|
184
|
-
current = [ current, item ];
|
185
|
-
|
186
|
-
current.filter = callItems;
|
187
|
-
}
|
188
|
-
else
|
189
|
-
addItemsToList( current, item, priority );
|
190
|
-
|
191
|
-
return current;
|
192
|
-
}
|
193
|
-
else
|
194
|
-
{
|
195
|
-
item.filter = item;
|
196
|
-
return item;
|
197
|
-
}
|
198
|
-
}
|
199
|
-
}
|
200
|
-
|
201
|
-
function callItems( currentEntry )
|
202
|
-
{
|
203
|
-
var isObject = ( typeof currentEntry == 'object' );
|
204
|
-
|
205
|
-
for ( var i = 0 ; i < this.length ; i++ )
|
206
|
-
{
|
207
|
-
var item = this[ i ],
|
208
|
-
ret = item.apply( window, arguments );
|
209
|
-
|
210
|
-
if ( typeof ret != 'undefined' )
|
211
|
-
{
|
212
|
-
if ( ret === false )
|
213
|
-
return false;
|
214
|
-
|
215
|
-
if ( isObject && ret != currentEntry )
|
216
|
-
return ret;
|
217
|
-
}
|
218
|
-
}
|
219
|
-
|
220
|
-
return null;
|
221
|
-
}
|
222
|
-
})();
|
223
|
-
|
224
|
-
// "entities" plugin
|
225
|
-
/*
|
226
|
-
{
|
227
|
-
text : function( text )
|
228
|
-
{
|
229
|
-
// TODO : Process entities.
|
230
|
-
return text.toUpperCase();
|
231
|
-
}
|
232
|
-
};
|
233
|
-
*/
|
@@ -1,434 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.
|
3
|
-
For licensing, see LICENSE.html or http://ckeditor.com/license
|
4
|
-
*/
|
5
|
-
|
6
|
-
/**
|
7
|
-
* A lightweight representation of an HTML DOM structure.
|
8
|
-
* @constructor
|
9
|
-
* @example
|
10
|
-
*/
|
11
|
-
CKEDITOR.htmlParser.fragment = function()
|
12
|
-
{
|
13
|
-
/**
|
14
|
-
* The nodes contained in the root of this fragment.
|
15
|
-
* @type Array
|
16
|
-
* @example
|
17
|
-
* var fragment = CKEDITOR.htmlParser.fragment.fromHtml( '<b>Sample</b> Text' );
|
18
|
-
* alert( fragment.children.length ); "2"
|
19
|
-
*/
|
20
|
-
this.children = [];
|
21
|
-
|
22
|
-
/**
|
23
|
-
* Get the fragment parent. Should always be null.
|
24
|
-
* @type Object
|
25
|
-
* @default null
|
26
|
-
* @example
|
27
|
-
*/
|
28
|
-
this.parent = null;
|
29
|
-
|
30
|
-
/** @private */
|
31
|
-
this._ =
|
32
|
-
{
|
33
|
-
isBlockLike : true,
|
34
|
-
hasInlineStarted : false
|
35
|
-
};
|
36
|
-
};
|
37
|
-
|
38
|
-
(function()
|
39
|
-
{
|
40
|
-
// Elements which the end tag is marked as optional in the HTML 4.01 DTD
|
41
|
-
// (expect empty elements).
|
42
|
-
var optionalClose = {colgroup:1,dd:1,dt:1,li:1,option:1,p:1,td:1,tfoot:1,th:1,thead:1,tr:1};
|
43
|
-
|
44
|
-
// Block-level elements whose internal structure should be respected during
|
45
|
-
// parser fixing.
|
46
|
-
var nonBreakingBlocks = CKEDITOR.tools.extend(
|
47
|
-
{table:1,ul:1,ol:1,dl:1},
|
48
|
-
CKEDITOR.dtd.table, CKEDITOR.dtd.ul, CKEDITOR.dtd.ol, CKEDITOR.dtd.dl );
|
49
|
-
|
50
|
-
/**
|
51
|
-
* Creates a {@link CKEDITOR.htmlParser.fragment} from an HTML string.
|
52
|
-
* @param {String} fragmentHtml The HTML to be parsed, filling the fragment.
|
53
|
-
* @param {Number} [fixForBody=false] Wrap body with specified element if needed.
|
54
|
-
* @returns CKEDITOR.htmlParser.fragment The fragment created.
|
55
|
-
* @example
|
56
|
-
* var fragment = CKEDITOR.htmlParser.fragment.fromHtml( '<b>Sample</b> Text' );
|
57
|
-
* alert( fragment.children[0].name ); "b"
|
58
|
-
* alert( fragment.children[1].value ); " Text"
|
59
|
-
*/
|
60
|
-
CKEDITOR.htmlParser.fragment.fromHtml = function( fragmentHtml, fixForBody )
|
61
|
-
{
|
62
|
-
var parser = new CKEDITOR.htmlParser(),
|
63
|
-
html = [],
|
64
|
-
fragment = new CKEDITOR.htmlParser.fragment(),
|
65
|
-
pendingInline = [],
|
66
|
-
currentNode = fragment,
|
67
|
-
// Indicate we're inside a <pre> element, spaces should be touched differently.
|
68
|
-
inPre = false,
|
69
|
-
returnPoint;
|
70
|
-
|
71
|
-
function checkPending( newTagName )
|
72
|
-
{
|
73
|
-
if ( pendingInline.length > 0 )
|
74
|
-
{
|
75
|
-
for ( var i = 0 ; i < pendingInline.length ; i++ )
|
76
|
-
{
|
77
|
-
var pendingElement = pendingInline[ i ],
|
78
|
-
pendingName = pendingElement.name,
|
79
|
-
pendingDtd = CKEDITOR.dtd[ pendingName ],
|
80
|
-
currentDtd = currentNode.name && CKEDITOR.dtd[ currentNode.name ];
|
81
|
-
|
82
|
-
if ( ( !currentDtd || currentDtd[ pendingName ] ) && ( !newTagName || !pendingDtd || pendingDtd[ newTagName ] || !CKEDITOR.dtd[ newTagName ] ) )
|
83
|
-
{
|
84
|
-
// Get a clone for the pending element.
|
85
|
-
pendingElement = pendingElement.clone();
|
86
|
-
|
87
|
-
// Add it to the current node and make it the current,
|
88
|
-
// so the new element will be added inside of it.
|
89
|
-
pendingElement.parent = currentNode;
|
90
|
-
currentNode = pendingElement;
|
91
|
-
|
92
|
-
// Remove the pending element (back the index by one
|
93
|
-
// to properly process the next entry).
|
94
|
-
pendingInline.splice( i, 1 );
|
95
|
-
i--;
|
96
|
-
}
|
97
|
-
}
|
98
|
-
}
|
99
|
-
}
|
100
|
-
|
101
|
-
function addElement( element, target, enforceCurrent )
|
102
|
-
{
|
103
|
-
target = target || currentNode || fragment;
|
104
|
-
|
105
|
-
// If the target is the fragment and this element can't go inside
|
106
|
-
// body (if fixForBody).
|
107
|
-
if ( fixForBody && !target.type )
|
108
|
-
{
|
109
|
-
var elementName, realElementName;
|
110
|
-
if ( element.attributes
|
111
|
-
&& ( realElementName =
|
112
|
-
element.attributes[ '_cke_real_element_type' ] ) )
|
113
|
-
elementName = realElementName;
|
114
|
-
else
|
115
|
-
elementName = element.name;
|
116
|
-
if ( !( elementName in CKEDITOR.dtd.$body ) )
|
117
|
-
{
|
118
|
-
var savedCurrent = currentNode;
|
119
|
-
|
120
|
-
// Create a <p> in the fragment.
|
121
|
-
currentNode = target;
|
122
|
-
parser.onTagOpen( fixForBody, {} );
|
123
|
-
|
124
|
-
// The new target now is the <p>.
|
125
|
-
target = currentNode;
|
126
|
-
|
127
|
-
if ( enforceCurrent )
|
128
|
-
currentNode = savedCurrent;
|
129
|
-
}
|
130
|
-
}
|
131
|
-
|
132
|
-
// Rtrim empty spaces on block end boundary. (#3585)
|
133
|
-
if ( element._.isBlockLike
|
134
|
-
&& element.name != 'pre' )
|
135
|
-
{
|
136
|
-
|
137
|
-
var length = element.children.length,
|
138
|
-
lastChild = element.children[ length - 1 ],
|
139
|
-
text;
|
140
|
-
if ( lastChild && lastChild.type == CKEDITOR.NODE_TEXT )
|
141
|
-
{
|
142
|
-
if ( !( text = CKEDITOR.tools.rtrim( lastChild.value ) ) )
|
143
|
-
element.children.length = length -1;
|
144
|
-
else
|
145
|
-
lastChild.value = text;
|
146
|
-
}
|
147
|
-
}
|
148
|
-
|
149
|
-
target.add( element );
|
150
|
-
|
151
|
-
if ( element.returnPoint )
|
152
|
-
{
|
153
|
-
currentNode = element.returnPoint;
|
154
|
-
delete element.returnPoint;
|
155
|
-
}
|
156
|
-
}
|
157
|
-
|
158
|
-
parser.onTagOpen = function( tagName, attributes, selfClosing )
|
159
|
-
{
|
160
|
-
var element = new CKEDITOR.htmlParser.element( tagName, attributes );
|
161
|
-
|
162
|
-
// "isEmpty" will be always "false" for unknown elements, so we
|
163
|
-
// must force it if the parser has identified it as a selfClosing tag.
|
164
|
-
if ( element.isUnknown && selfClosing )
|
165
|
-
element.isEmpty = true;
|
166
|
-
|
167
|
-
// This is a tag to be removed if empty, so do not add it immediately.
|
168
|
-
if ( CKEDITOR.dtd.$removeEmpty[ tagName ] )
|
169
|
-
{
|
170
|
-
pendingInline.push( element );
|
171
|
-
return;
|
172
|
-
}
|
173
|
-
else if ( tagName == 'pre' )
|
174
|
-
inPre = true;
|
175
|
-
else if ( tagName == 'br' && inPre )
|
176
|
-
{
|
177
|
-
currentNode.add( new CKEDITOR.htmlParser.text( '\n' ) );
|
178
|
-
return;
|
179
|
-
}
|
180
|
-
|
181
|
-
var currentName = currentNode.name,
|
182
|
-
currentDtd = ( currentName && CKEDITOR.dtd[ currentName ] ) || ( currentNode._.isBlockLike ? CKEDITOR.dtd.div : CKEDITOR.dtd.span );
|
183
|
-
|
184
|
-
// If the element cannot be child of the current element.
|
185
|
-
if ( !element.isUnknown && !currentNode.isUnknown && !currentDtd[ tagName ] )
|
186
|
-
{
|
187
|
-
// If this is the fragment node, just ignore this tag and add
|
188
|
-
// its children.
|
189
|
-
if ( !currentName )
|
190
|
-
return;
|
191
|
-
|
192
|
-
var reApply = false;
|
193
|
-
|
194
|
-
// If the element name is the same as the current element name,
|
195
|
-
// then just close the current one and append the new one to the
|
196
|
-
// parent. This situation usually happens with <p>, <li>, <dt> and
|
197
|
-
// <dd>, specially in IE. Do not enter in this if block in this case.
|
198
|
-
if ( tagName == currentName )
|
199
|
-
{
|
200
|
-
addElement( currentNode, currentNode.parent );
|
201
|
-
}
|
202
|
-
else
|
203
|
-
{
|
204
|
-
if ( nonBreakingBlocks[ currentName ] )
|
205
|
-
{
|
206
|
-
if ( !returnPoint )
|
207
|
-
returnPoint = currentNode;
|
208
|
-
}
|
209
|
-
else
|
210
|
-
{
|
211
|
-
addElement( currentNode, currentNode.parent, true );
|
212
|
-
|
213
|
-
if ( !optionalClose[ currentName ] )
|
214
|
-
{
|
215
|
-
// The current element is an inline element, which
|
216
|
-
// cannot hold the new one. Put it in the pending list,
|
217
|
-
// and try adding the new one after it.
|
218
|
-
pendingInline.unshift( currentNode );
|
219
|
-
}
|
220
|
-
}
|
221
|
-
|
222
|
-
reApply = true;
|
223
|
-
}
|
224
|
-
|
225
|
-
// In any of the above cases, we'll be adding, or trying to
|
226
|
-
// add it to the parent.
|
227
|
-
currentNode = currentNode.returnPoint || currentNode.parent;
|
228
|
-
|
229
|
-
if ( reApply )
|
230
|
-
{
|
231
|
-
parser.onTagOpen.apply( this, arguments );
|
232
|
-
return;
|
233
|
-
}
|
234
|
-
}
|
235
|
-
|
236
|
-
checkPending( tagName );
|
237
|
-
|
238
|
-
element.parent = currentNode;
|
239
|
-
element.returnPoint = returnPoint;
|
240
|
-
returnPoint = 0;
|
241
|
-
|
242
|
-
if ( element.isEmpty )
|
243
|
-
addElement( element );
|
244
|
-
else
|
245
|
-
currentNode = element;
|
246
|
-
};
|
247
|
-
|
248
|
-
parser.onTagClose = function( tagName )
|
249
|
-
{
|
250
|
-
var index = 0,
|
251
|
-
pendingAdd = [],
|
252
|
-
candidate = currentNode;
|
253
|
-
|
254
|
-
while ( candidate.type && candidate.name != tagName )
|
255
|
-
{
|
256
|
-
// If this is an inline element, add it to the pending list, so
|
257
|
-
// it will continue after the closing tag.
|
258
|
-
if ( !candidate._.isBlockLike )
|
259
|
-
{
|
260
|
-
pendingInline.unshift( candidate );
|
261
|
-
|
262
|
-
// Increase the index, so it will not get checked again in
|
263
|
-
// the pending list check that follows.
|
264
|
-
index++;
|
265
|
-
}
|
266
|
-
|
267
|
-
// This node should be added to it's parent at this point. But,
|
268
|
-
// it should happen only if the closing tag is really closing
|
269
|
-
// one of the nodes. So, for now, we just cache it.
|
270
|
-
pendingAdd.push( candidate );
|
271
|
-
|
272
|
-
candidate = candidate.parent;
|
273
|
-
}
|
274
|
-
|
275
|
-
if ( candidate.type )
|
276
|
-
{
|
277
|
-
// Add all elements that have been found in the above loop.
|
278
|
-
for ( var i = 0 ; i < pendingAdd.length ; i++ )
|
279
|
-
{
|
280
|
-
var node = pendingAdd[ i ];
|
281
|
-
addElement( node, node.parent );
|
282
|
-
}
|
283
|
-
|
284
|
-
currentNode = candidate;
|
285
|
-
|
286
|
-
if( currentNode.name == 'pre' )
|
287
|
-
inPre = false;
|
288
|
-
|
289
|
-
addElement( candidate, candidate.parent );
|
290
|
-
|
291
|
-
// The parent should start receiving new nodes now, except if
|
292
|
-
// addElement changed the currentNode.
|
293
|
-
if ( candidate == currentNode )
|
294
|
-
currentNode = currentNode.parent;
|
295
|
-
}
|
296
|
-
// The tag is not actually closing anything, thus we need invalidate
|
297
|
-
// the pending elements.(#3862)
|
298
|
-
else
|
299
|
-
{
|
300
|
-
pendingInline.splice( 0, index );
|
301
|
-
index = 0;
|
302
|
-
}
|
303
|
-
|
304
|
-
// Check if there is any pending tag to be closed.
|
305
|
-
for ( ; index < pendingInline.length ; index++ )
|
306
|
-
{
|
307
|
-
// If found, just remove it from the list.
|
308
|
-
if ( tagName == pendingInline[ index ].name )
|
309
|
-
{
|
310
|
-
pendingInline.splice( index, 1 );
|
311
|
-
|
312
|
-
// Decrease the index so we continue from the next one.
|
313
|
-
index--;
|
314
|
-
}
|
315
|
-
}
|
316
|
-
};
|
317
|
-
|
318
|
-
parser.onText = function( text )
|
319
|
-
{
|
320
|
-
// Trim empty spaces at beginning of element contents except <pre>.
|
321
|
-
if ( !currentNode._.hasInlineStarted && !inPre )
|
322
|
-
{
|
323
|
-
text = CKEDITOR.tools.ltrim( text );
|
324
|
-
|
325
|
-
if ( text.length === 0 )
|
326
|
-
return;
|
327
|
-
}
|
328
|
-
|
329
|
-
checkPending();
|
330
|
-
|
331
|
-
if ( fixForBody && !currentNode.type )
|
332
|
-
this.onTagOpen( fixForBody, {} );
|
333
|
-
|
334
|
-
// Shrinking consequential spaces into one single for all elements
|
335
|
-
// text contents.
|
336
|
-
if ( !inPre )
|
337
|
-
text = text.replace( /[\t\r\n ]{2,}|[\t\r\n]/g, ' ' );
|
338
|
-
|
339
|
-
currentNode.add( new CKEDITOR.htmlParser.text( text ) );
|
340
|
-
};
|
341
|
-
|
342
|
-
parser.onCDATA = function( cdata )
|
343
|
-
{
|
344
|
-
currentNode.add( new CKEDITOR.htmlParser.cdata( cdata ) );
|
345
|
-
};
|
346
|
-
|
347
|
-
parser.onComment = function( comment )
|
348
|
-
{
|
349
|
-
currentNode.add( new CKEDITOR.htmlParser.comment( comment ) );
|
350
|
-
};
|
351
|
-
|
352
|
-
// Parse it.
|
353
|
-
parser.parse( fragmentHtml );
|
354
|
-
|
355
|
-
// Close all pending nodes.
|
356
|
-
while ( currentNode.type )
|
357
|
-
{
|
358
|
-
var parent = currentNode.parent,
|
359
|
-
node = currentNode;
|
360
|
-
|
361
|
-
if ( fixForBody && !parent.type && !CKEDITOR.dtd.$body[ node.name ] )
|
362
|
-
{
|
363
|
-
currentNode = parent;
|
364
|
-
parser.onTagOpen( fixForBody, {} );
|
365
|
-
parent = currentNode;
|
366
|
-
}
|
367
|
-
|
368
|
-
parent.add( node );
|
369
|
-
currentNode = parent;
|
370
|
-
}
|
371
|
-
|
372
|
-
return fragment;
|
373
|
-
};
|
374
|
-
|
375
|
-
CKEDITOR.htmlParser.fragment.prototype =
|
376
|
-
{
|
377
|
-
/**
|
378
|
-
* Adds a node to this fragment.
|
379
|
-
* @param {Object} node The node to be added. It can be any of of the
|
380
|
-
* following types: {@link CKEDITOR.htmlParser.element},
|
381
|
-
* {@link CKEDITOR.htmlParser.text} and
|
382
|
-
* {@link CKEDITOR.htmlParser.comment}.
|
383
|
-
* @example
|
384
|
-
*/
|
385
|
-
add : function( node )
|
386
|
-
{
|
387
|
-
var len = this.children.length,
|
388
|
-
previous = len > 0 && this.children[ len - 1 ] || null;
|
389
|
-
|
390
|
-
if ( previous )
|
391
|
-
{
|
392
|
-
// If the block to be appended is following text, trim spaces at
|
393
|
-
// the right of it.
|
394
|
-
if ( node._.isBlockLike && previous.type == CKEDITOR.NODE_TEXT )
|
395
|
-
{
|
396
|
-
previous.value = CKEDITOR.tools.rtrim( previous.value );
|
397
|
-
|
398
|
-
// If we have completely cleared the previous node.
|
399
|
-
if ( previous.value.length === 0 )
|
400
|
-
{
|
401
|
-
// Remove it from the list and add the node again.
|
402
|
-
this.children.pop();
|
403
|
-
this.add( node );
|
404
|
-
return;
|
405
|
-
}
|
406
|
-
}
|
407
|
-
|
408
|
-
previous.next = node;
|
409
|
-
}
|
410
|
-
|
411
|
-
node.previous = previous;
|
412
|
-
node.parent = this;
|
413
|
-
|
414
|
-
this.children.push( node );
|
415
|
-
|
416
|
-
this._.hasInlineStarted = node.type == CKEDITOR.NODE_TEXT || ( node.type == CKEDITOR.NODE_ELEMENT && !node._.isBlockLike );
|
417
|
-
},
|
418
|
-
|
419
|
-
/**
|
420
|
-
* Writes the fragment HTML to a CKEDITOR.htmlWriter.
|
421
|
-
* @param {CKEDITOR.htmlWriter} writer The writer to which write the HTML.
|
422
|
-
* @example
|
423
|
-
* var writer = new CKEDITOR.htmlWriter();
|
424
|
-
* var fragment = CKEDITOR.htmlParser.fragment.fromHtml( '<P><B>Example' );
|
425
|
-
* fragment.writeHtml( writer )
|
426
|
-
* alert( writer.getHtml() ); "<p><b>Example</b></p>"
|
427
|
-
*/
|
428
|
-
writeHtml : function( writer, filter )
|
429
|
-
{
|
430
|
-
for ( var i = 0, len = this.children.length ; i < len ; i++ )
|
431
|
-
this.children[i].writeHtml( writer, filter );
|
432
|
-
}
|
433
|
-
};
|
434
|
-
})();
|