forge-cli 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/lib/forge-cli/modules/base/manifest.yml +1 -1
- data/lib/forge-cli/modules/base/routes.rb +1 -1
- data/lib/forge-cli/modules/posts/routes.rb +3 -1
- data/lib/forge-cli/version.rb +1 -1
- data/lib/forge/Gemfile +1 -0
- data/lib/forge/app/assets/javascripts/ckeditor/config.js +35 -0
- data/lib/forge/{public → app/assets}/javascripts/ckeditor/contents.css +0 -0
- data/lib/forge/{public → app/assets}/javascripts/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +0 -0
- data/lib/forge/{public → app/assets}/javascripts/ckeditor/plugins/a11yhelp/lang/en.js +0 -0
- data/lib/forge/{public → app/assets}/javascripts/ckeditor/plugins/a11yhelp/lang/he.js +0 -0
- data/lib/forge/{public → app/assets}/javascripts/ckeditor/plugins/about/dialogs/about.js +0 -0
- data/lib/forge/{public/javascripts/ckeditor/_source → app/assets/javascripts/ckeditor}/plugins/about/dialogs/logo_ckeditor.png +0 -0
- data/lib/forge/{public → app/assets}/javascripts/ckeditor/plugins/ajax_save/plugin.js +0 -0
- data/lib/forge/{public → app/assets}/javascripts/ckeditor/plugins/attachment/dialogs/attachment.js +0 -0
- data/lib/forge/{public/javascripts/ckeditor/_source → app/assets/javascripts/ckeditor}/plugins/attachment/images/attachment.png +0 -0
- data/lib/forge/{public/javascripts/ckeditor/_source → app/assets/javascripts/ckeditor}/plugins/attachment/lang/en.js +0 -0
- data/lib/forge/{public/javascripts/ckeditor/_source → app/assets/javascripts/ckeditor}/plugins/attachment/lang/ru.js +0 -0
- data/lib/forge/{public/javascripts/ckeditor/_source → app/assets/javascripts/ckeditor}/plugins/attachment/lang/uk.js +0 -0
- data/lib/forge/{public → app/assets}/javascripts/ckeditor/plugins/attachment/plugin.js +0 -0
- data/lib/forge/{public → app/assets}/javascripts/ckeditor/plugins/autogrow/plugin.js +0 -0
- data/lib/forge/{public → app/assets}/javascripts/ckeditor/plugins/clipboard/dialogs/paste.js +0 -0
- data/lib/forge/{public → app/assets}/javascripts/ckeditor/plugins/colordialog/dialogs/colordialog.js +0 -0
- data/lib/forge/{public → app/assets}/javascripts/ckeditor/plugins/dialog/dialogDefinition.js +0 -0
- data/lib/forge/{public → app/assets}/javascripts/ckeditor/plugins/div/dialogs/div.js +0 -0
- data/lib/forge/{public → app/assets}/javascripts/ckeditor/plugins/embed/dialogs/embed.js +0 -0
- data/lib/forge/{public/javascripts/ckeditor/_source → app/assets/javascripts/ckeditor}/plugins/embed/images/embed.png +0 -0
- data/lib/forge/{public/javascripts/ckeditor/_source → app/assets/javascripts/ckeditor}/plugins/embed/lang/en.js +0 -0
- data/lib/forge/{public/javascripts/ckeditor/_source → app/assets/javascripts/ckeditor}/plugins/embed/lang/ru.js +0 -0
- data/lib/forge/{public/javascripts/ckeditor/_source → app/assets/javascripts/ckeditor}/plugins/embed/lang/uk.js +0 -0
- data/lib/forge/{public → app/assets}/javascripts/ckeditor/plugins/embed/plugin.js +0 -0
- data/lib/forge/{public → app/assets}/javascripts/ckeditor/plugins/find/dialogs/find.js +0 -0
- data/lib/forge/{public → app/assets}/javascripts/ckeditor/plugins/flash/dialogs/flash.js +0 -0
- data/lib/forge/{public/javascripts/ckeditor/_source → app/assets/javascripts/ckeditor}/plugins/flash/images/placeholder.png +0 -0
- data/lib/forge/{public → app/assets}/javascripts/ckeditor/plugins/forge_assets/plugin.js +2 -2
- data/lib/forge/{public → app/assets}/javascripts/ckeditor/plugins/forms/dialogs/button.js +0 -0
- data/lib/forge/{public → app/assets}/javascripts/ckeditor/plugins/forms/dialogs/checkbox.js +0 -0
- data/lib/forge/{public → app/assets}/javascripts/ckeditor/plugins/forms/dialogs/form.js +0 -0
- data/lib/forge/{public → app/assets}/javascripts/ckeditor/plugins/forms/dialogs/hiddenfield.js +0 -0
- data/lib/forge/{public → app/assets}/javascripts/ckeditor/plugins/forms/dialogs/radio.js +0 -0
- data/lib/forge/{public → app/assets}/javascripts/ckeditor/plugins/forms/dialogs/select.js +0 -0
- data/lib/forge/{public → app/assets}/javascripts/ckeditor/plugins/forms/dialogs/textarea.js +0 -0
- data/lib/forge/{public → app/assets}/javascripts/ckeditor/plugins/forms/dialogs/textfield.js +0 -0
- data/lib/forge/{public/javascripts/ckeditor/_source → app/assets/javascripts/ckeditor}/plugins/forms/images/hiddenfield.gif +0 -0
- data/lib/forge/{public → app/assets}/javascripts/ckeditor/plugins/iframedialog/plugin.js +0 -0
- data/lib/forge/{public → app/assets}/javascripts/ckeditor/plugins/image/dialogs/image.js +0 -0
- data/lib/forge/{public → app/assets}/javascripts/ckeditor/plugins/link/dialogs/anchor.js +0 -0
- data/lib/forge/{public → app/assets}/javascripts/ckeditor/plugins/link/dialogs/link.js +0 -0
- data/lib/forge/{public/javascripts/ckeditor/_source → app/assets/javascripts/ckeditor}/plugins/link/images/anchor.gif +0 -0
- data/lib/forge/{public → app/assets}/javascripts/ckeditor/plugins/liststyle/dialogs/liststyle.js +0 -0
- data/lib/forge/app/assets/javascripts/ckeditor/plugins/mediaembed/icons/hidpi/mediaembed.png +0 -0
- data/lib/forge/app/assets/javascripts/ckeditor/plugins/mediaembed/icons/mediaembed.png +0 -0
- data/lib/forge/app/assets/javascripts/ckeditor/plugins/mediaembed/plugin.js +64 -0
- data/lib/forge/{public/javascripts/ckeditor/_source → app/assets/javascripts/ckeditor}/plugins/pagebreak/images/pagebreak.gif +0 -0
- data/lib/forge/{public → app/assets}/javascripts/ckeditor/plugins/pastefromword/filter/default.js +0 -0
- data/lib/forge/{public → app/assets}/javascripts/ckeditor/plugins/pastetext/dialogs/pastetext.js +0 -0
- data/lib/forge/{public → app/assets}/javascripts/ckeditor/plugins/scayt/dialogs/options.js +0 -0
- data/lib/forge/{public → app/assets}/javascripts/ckeditor/plugins/scayt/dialogs/toolbar.css +0 -0
- data/lib/forge/{public/javascripts/ckeditor/_source → app/assets/javascripts/ckeditor}/plugins/showblocks/images/block_address.png +0 -0
- data/lib/forge/{public/javascripts/ckeditor/_source → app/assets/javascripts/ckeditor}/plugins/showblocks/images/block_blockquote.png +0 -0
- data/lib/forge/{public/javascripts/ckeditor/_source → app/assets/javascripts/ckeditor}/plugins/showblocks/images/block_div.png +0 -0
- data/lib/forge/{public/javascripts/ckeditor/_source → app/assets/javascripts/ckeditor}/plugins/showblocks/images/block_h1.png +0 -0
- data/lib/forge/{public/javascripts/ckeditor/_source → app/assets/javascripts/ckeditor}/plugins/showblocks/images/block_h2.png +0 -0
- data/lib/forge/{public/javascripts/ckeditor/_source → app/assets/javascripts/ckeditor}/plugins/showblocks/images/block_h3.png +0 -0
- data/lib/forge/{public/javascripts/ckeditor/_source → app/assets/javascripts/ckeditor}/plugins/showblocks/images/block_h4.png +0 -0
- data/lib/forge/{public/javascripts/ckeditor/_source → app/assets/javascripts/ckeditor}/plugins/showblocks/images/block_h5.png +0 -0
- data/lib/forge/{public/javascripts/ckeditor/_source → app/assets/javascripts/ckeditor}/plugins/showblocks/images/block_h6.png +0 -0
- data/lib/forge/{public/javascripts/ckeditor/_source → app/assets/javascripts/ckeditor}/plugins/showblocks/images/block_p.png +0 -0
- data/lib/forge/{public/javascripts/ckeditor/_source → app/assets/javascripts/ckeditor}/plugins/showblocks/images/block_pre.png +0 -0
- data/lib/forge/{public → app/assets}/javascripts/ckeditor/plugins/smiley/dialogs/smiley.js +0 -0
- data/lib/forge/{public/javascripts/ckeditor/_source → app/assets/javascripts/ckeditor}/plugins/smiley/images/angel_smile.gif +0 -0
- data/lib/forge/{public/javascripts/ckeditor/_source → app/assets/javascripts/ckeditor}/plugins/smiley/images/angry_smile.gif +0 -0
- data/lib/forge/{public/javascripts/ckeditor/_source → app/assets/javascripts/ckeditor}/plugins/smiley/images/broken_heart.gif +0 -0
- data/lib/forge/{public/javascripts/ckeditor/_source → app/assets/javascripts/ckeditor}/plugins/smiley/images/confused_smile.gif +0 -0
- data/lib/forge/{public/javascripts/ckeditor/_source → app/assets/javascripts/ckeditor}/plugins/smiley/images/cry_smile.gif +0 -0
- data/lib/forge/{public/javascripts/ckeditor/_source → app/assets/javascripts/ckeditor}/plugins/smiley/images/devil_smile.gif +0 -0
- data/lib/forge/{public/javascripts/ckeditor/_source → app/assets/javascripts/ckeditor}/plugins/smiley/images/embaressed_smile.gif +0 -0
- data/lib/forge/{public/javascripts/ckeditor/_source → app/assets/javascripts/ckeditor}/plugins/smiley/images/envelope.gif +0 -0
- data/lib/forge/{public/javascripts/ckeditor/_source → app/assets/javascripts/ckeditor}/plugins/smiley/images/heart.gif +0 -0
- data/lib/forge/{public/javascripts/ckeditor/_source → app/assets/javascripts/ckeditor}/plugins/smiley/images/kiss.gif +0 -0
- data/lib/forge/{public/javascripts/ckeditor/_source → app/assets/javascripts/ckeditor}/plugins/smiley/images/lightbulb.gif +0 -0
- data/lib/forge/{public/javascripts/ckeditor/_source → app/assets/javascripts/ckeditor}/plugins/smiley/images/omg_smile.gif +0 -0
- data/lib/forge/{public/javascripts/ckeditor/_source → app/assets/javascripts/ckeditor}/plugins/smiley/images/regular_smile.gif +0 -0
- data/lib/forge/{public/javascripts/ckeditor/_source → app/assets/javascripts/ckeditor}/plugins/smiley/images/sad_smile.gif +0 -0
- data/lib/forge/{public/javascripts/ckeditor/_source → app/assets/javascripts/ckeditor}/plugins/smiley/images/shades_smile.gif +0 -0
- data/lib/forge/{public/javascripts/ckeditor/_source → app/assets/javascripts/ckeditor}/plugins/smiley/images/teeth_smile.gif +0 -0
- data/lib/forge/{public/javascripts/ckeditor/_source → app/assets/javascripts/ckeditor}/plugins/smiley/images/thumbs_down.gif +0 -0
- data/lib/forge/{public/javascripts/ckeditor/_source → app/assets/javascripts/ckeditor}/plugins/smiley/images/thumbs_up.gif +0 -0
- data/lib/forge/{public/javascripts/ckeditor/_source → app/assets/javascripts/ckeditor}/plugins/smiley/images/tounge_smile.gif +0 -0
- data/lib/forge/{public/javascripts/ckeditor/_source → app/assets/javascripts/ckeditor}/plugins/smiley/images/whatchutalkingabout_smile.gif +0 -0
- data/lib/forge/{public/javascripts/ckeditor/_source → app/assets/javascripts/ckeditor}/plugins/smiley/images/wink_smile.gif +0 -0
- data/lib/forge/{public → app/assets}/javascripts/ckeditor/plugins/specialchar/dialogs/specialchar.js +0 -0
- data/lib/forge/{public → app/assets}/javascripts/ckeditor/plugins/styles/styles/default.js +0 -0
- data/lib/forge/{public → app/assets}/javascripts/ckeditor/plugins/table/dialogs/table.js +0 -0
- data/lib/forge/{public → app/assets}/javascripts/ckeditor/plugins/tableresize/plugin.js +0 -0
- data/lib/forge/{public → app/assets}/javascripts/ckeditor/plugins/tabletools/dialogs/tableCell.js +0 -0
- data/lib/forge/{public → app/assets}/javascripts/ckeditor/plugins/templates/dialogs/templates.js +0 -0
- data/lib/forge/{public → app/assets}/javascripts/ckeditor/plugins/templates/templates/default.js +0 -0
- data/lib/forge/{public/javascripts/ckeditor/_source → app/assets/javascripts/ckeditor}/plugins/templates/templates/images/template1.gif +0 -0
- data/lib/forge/{public/javascripts/ckeditor/_source → app/assets/javascripts/ckeditor}/plugins/templates/templates/images/template2.gif +0 -0
- data/lib/forge/{public/javascripts/ckeditor/_source → app/assets/javascripts/ckeditor}/plugins/templates/templates/images/template3.gif +0 -0
- data/lib/forge/{public → app/assets}/javascripts/ckeditor/plugins/uicolor/dialogs/uicolor.js +0 -0
- data/lib/forge/{public → app/assets}/javascripts/ckeditor/plugins/uicolor/lang/en.js +0 -0
- data/lib/forge/{public → app/assets}/javascripts/ckeditor/plugins/uicolor/plugin.js +0 -0
- data/lib/forge/{public/javascripts/ckeditor/_source → app/assets/javascripts/ckeditor}/plugins/uicolor/uicolor.gif +0 -0
- data/lib/forge/{public/javascripts/ckeditor/_source → app/assets/javascripts/ckeditor}/plugins/uicolor/yui/assets/hue_bg.png +0 -0
- data/lib/forge/{public/javascripts/ckeditor/_source → app/assets/javascripts/ckeditor}/plugins/uicolor/yui/assets/hue_thumb.png +0 -0
- data/lib/forge/{public/javascripts/ckeditor/_source → app/assets/javascripts/ckeditor}/plugins/uicolor/yui/assets/picker_mask.png +0 -0
- data/lib/forge/{public/javascripts/ckeditor/_source → app/assets/javascripts/ckeditor}/plugins/uicolor/yui/assets/picker_thumb.png +0 -0
- data/lib/forge/{public → app/assets}/javascripts/ckeditor/plugins/uicolor/yui/assets/yui.css +0 -0
- data/lib/forge/{public → app/assets}/javascripts/ckeditor/plugins/uicolor/yui/yui.js +0 -0
- data/lib/forge/{public/javascripts/ckeditor/_source → app/assets/javascripts/ckeditor}/plugins/wsc/dialogs/ciframe.html +0 -0
- data/lib/forge/{public/javascripts/ckeditor/_source → app/assets/javascripts/ckeditor}/plugins/wsc/dialogs/tmpFrameset.html +0 -0
- data/lib/forge/{public → app/assets}/javascripts/ckeditor/plugins/wsc/dialogs/wsc.css +0 -0
- data/lib/forge/{public → app/assets}/javascripts/ckeditor/plugins/wsc/dialogs/wsc.js +0 -0
- data/lib/forge/app/models/asset.rb +2 -1
- data/lib/forge/app/views/forge/pages/_form.html.haml +12 -5
- data/lib/forge/app/views/forge/posts/_form.html.haml +12 -6
- data/lib/forge/app/views/layouts/forge.html.haml +0 -3
- data/lib/forge/config/routes.rb +4 -2
- data/lib/forge/lib/assets/javascripts/forge/features/asset_dialog.js.erb +1 -1
- data/lib/forge/lib/assets/javascripts/forge/features/asset_drawer.js.erb +4 -4
- data/lib/forge/lib/assets/javascripts/forge/forge_manifest.js.erb +1 -0
- data/lib/forge/lib/generators/forge/scaffold/scaffold_generator.rb +1 -0
- data/lib/forge/lib/templates/active_record/model/model.rb +4 -1
- data/lib/forge/public/images/image_new.png +0 -0
- metadata +207 -699
- data/lib/forge/public/javascripts/ckeditor/CHANGES.html +0 -923
- data/lib/forge/public/javascripts/ckeditor/INSTALL.html +0 -92
- data/lib/forge/public/javascripts/ckeditor/LICENSE.html +0 -1334
- data/lib/forge/public/javascripts/ckeditor/_source/adapters/jquery.js +0 -297
- data/lib/forge/public/javascripts/ckeditor/_source/core/_bootstrap.js +0 -91
- data/lib/forge/public/javascripts/ckeditor/_source/core/ajax.js +0 -143
- data/lib/forge/public/javascripts/ckeditor/_source/core/ckeditor.js +0 -113
- data/lib/forge/public/javascripts/ckeditor/_source/core/ckeditor_base.js +0 -193
- data/lib/forge/public/javascripts/ckeditor/_source/core/ckeditor_basic.js +0 -242
- data/lib/forge/public/javascripts/ckeditor/_source/core/command.js +0 -73
- data/lib/forge/public/javascripts/ckeditor/_source/core/commanddefinition.js +0 -102
- data/lib/forge/public/javascripts/ckeditor/_source/core/config.js +0 -405
- data/lib/forge/public/javascripts/ckeditor/_source/core/dataprocessor.js +0 -66
- data/lib/forge/public/javascripts/ckeditor/_source/core/dom.js +0 -21
- data/lib/forge/public/javascripts/ckeditor/_source/core/dom/comment.js +0 -32
- data/lib/forge/public/javascripts/ckeditor/_source/core/dom/document.js +0 -224
- data/lib/forge/public/javascripts/ckeditor/_source/core/dom/documentfragment.js +0 -49
- data/lib/forge/public/javascripts/ckeditor/_source/core/dom/domobject.js +0 -251
- data/lib/forge/public/javascripts/ckeditor/_source/core/dom/element.js +0 -1556
- data/lib/forge/public/javascripts/ckeditor/_source/core/dom/elementpath.js +0 -116
- data/lib/forge/public/javascripts/ckeditor/_source/core/dom/event.js +0 -142
- data/lib/forge/public/javascripts/ckeditor/_source/core/dom/node.js +0 -683
- data/lib/forge/public/javascripts/ckeditor/_source/core/dom/nodelist.js +0 -23
- data/lib/forge/public/javascripts/ckeditor/_source/core/dom/range.js +0 -1880
- data/lib/forge/public/javascripts/ckeditor/_source/core/dom/rangelist.js +0 -163
- data/lib/forge/public/javascripts/ckeditor/_source/core/dom/text.js +0 -123
- data/lib/forge/public/javascripts/ckeditor/_source/core/dom/walker.js +0 -445
- data/lib/forge/public/javascripts/ckeditor/_source/core/dom/window.js +0 -96
- data/lib/forge/public/javascripts/ckeditor/_source/core/dtd.js +0 -233
- data/lib/forge/public/javascripts/ckeditor/_source/core/editor.js +0 -759
- data/lib/forge/public/javascripts/ckeditor/_source/core/editor_basic.js +0 -182
- data/lib/forge/public/javascripts/ckeditor/_source/core/env.js +0 -229
- data/lib/forge/public/javascripts/ckeditor/_source/core/event.js +0 -336
- data/lib/forge/public/javascripts/ckeditor/_source/core/eventInfo.js +0 -120
- data/lib/forge/public/javascripts/ckeditor/_source/core/focusmanager.js +0 -137
- data/lib/forge/public/javascripts/ckeditor/_source/core/htmlparser.js +0 -218
- data/lib/forge/public/javascripts/ckeditor/_source/core/htmlparser/basicwriter.js +0 -145
- data/lib/forge/public/javascripts/ckeditor/_source/core/htmlparser/cdata.js +0 -43
- data/lib/forge/public/javascripts/ckeditor/_source/core/htmlparser/comment.js +0 -60
- data/lib/forge/public/javascripts/ckeditor/_source/core/htmlparser/element.js +0 -240
- data/lib/forge/public/javascripts/ckeditor/_source/core/htmlparser/filter.js +0 -288
- data/lib/forge/public/javascripts/ckeditor/_source/core/htmlparser/fragment.js +0 -497
- data/lib/forge/public/javascripts/ckeditor/_source/core/htmlparser/text.js +0 -55
- data/lib/forge/public/javascripts/ckeditor/_source/core/imagecacher.js +0 -59
- data/lib/forge/public/javascripts/ckeditor/_source/core/lang.js +0 -152
- data/lib/forge/public/javascripts/ckeditor/_source/core/loader.js +0 -243
- data/lib/forge/public/javascripts/ckeditor/_source/core/plugindefinition.js +0 -66
- data/lib/forge/public/javascripts/ckeditor/_source/core/plugins.js +0 -85
- data/lib/forge/public/javascripts/ckeditor/_source/core/resourcemanager.js +0 -238
- data/lib/forge/public/javascripts/ckeditor/_source/core/scriptloader.js +0 -198
- data/lib/forge/public/javascripts/ckeditor/_source/core/skins.js +0 -204
- data/lib/forge/public/javascripts/ckeditor/_source/core/themes.js +0 -19
- data/lib/forge/public/javascripts/ckeditor/_source/core/tools.js +0 -747
- data/lib/forge/public/javascripts/ckeditor/_source/core/ui.js +0 -116
- data/lib/forge/public/javascripts/ckeditor/_source/core/xml.js +0 -165
- data/lib/forge/public/javascripts/ckeditor/_source/lang/_languages.js +0 -83
- data/lib/forge/public/javascripts/ckeditor/_source/lang/_translationstatus.txt +0 -60
- data/lib/forge/public/javascripts/ckeditor/_source/lang/af.js +0 -758
- data/lib/forge/public/javascripts/ckeditor/_source/lang/ar.js +0 -758
- data/lib/forge/public/javascripts/ckeditor/_source/lang/bg.js +0 -758
- data/lib/forge/public/javascripts/ckeditor/_source/lang/bn.js +0 -758
- data/lib/forge/public/javascripts/ckeditor/_source/lang/bs.js +0 -758
- data/lib/forge/public/javascripts/ckeditor/_source/lang/ca.js +0 -758
- data/lib/forge/public/javascripts/ckeditor/_source/lang/cs.js +0 -758
- data/lib/forge/public/javascripts/ckeditor/_source/lang/cy.js +0 -758
- data/lib/forge/public/javascripts/ckeditor/_source/lang/da.js +0 -758
- data/lib/forge/public/javascripts/ckeditor/_source/lang/de.js +0 -758
- data/lib/forge/public/javascripts/ckeditor/_source/lang/el.js +0 -758
- data/lib/forge/public/javascripts/ckeditor/_source/lang/en-au.js +0 -758
- data/lib/forge/public/javascripts/ckeditor/_source/lang/en-ca.js +0 -758
- data/lib/forge/public/javascripts/ckeditor/_source/lang/en-gb.js +0 -758
- data/lib/forge/public/javascripts/ckeditor/_source/lang/en.js +0 -758
- data/lib/forge/public/javascripts/ckeditor/_source/lang/eo.js +0 -758
- data/lib/forge/public/javascripts/ckeditor/_source/lang/es.js +0 -758
- data/lib/forge/public/javascripts/ckeditor/_source/lang/et.js +0 -758
- data/lib/forge/public/javascripts/ckeditor/_source/lang/eu.js +0 -758
- data/lib/forge/public/javascripts/ckeditor/_source/lang/fa.js +0 -758
- data/lib/forge/public/javascripts/ckeditor/_source/lang/fi.js +0 -758
- data/lib/forge/public/javascripts/ckeditor/_source/lang/fo.js +0 -758
- data/lib/forge/public/javascripts/ckeditor/_source/lang/fr-ca.js +0 -758
- data/lib/forge/public/javascripts/ckeditor/_source/lang/fr.js +0 -758
- data/lib/forge/public/javascripts/ckeditor/_source/lang/gl.js +0 -758
- data/lib/forge/public/javascripts/ckeditor/_source/lang/gu.js +0 -758
- data/lib/forge/public/javascripts/ckeditor/_source/lang/he.js +0 -758
- data/lib/forge/public/javascripts/ckeditor/_source/lang/hi.js +0 -758
- data/lib/forge/public/javascripts/ckeditor/_source/lang/hr.js +0 -758
- data/lib/forge/public/javascripts/ckeditor/_source/lang/hu.js +0 -758
- data/lib/forge/public/javascripts/ckeditor/_source/lang/is.js +0 -758
- data/lib/forge/public/javascripts/ckeditor/_source/lang/it.js +0 -758
- data/lib/forge/public/javascripts/ckeditor/_source/lang/ja.js +0 -758
- data/lib/forge/public/javascripts/ckeditor/_source/lang/km.js +0 -758
- data/lib/forge/public/javascripts/ckeditor/_source/lang/ko.js +0 -758
- data/lib/forge/public/javascripts/ckeditor/_source/lang/lt.js +0 -758
- data/lib/forge/public/javascripts/ckeditor/_source/lang/lv.js +0 -758
- data/lib/forge/public/javascripts/ckeditor/_source/lang/mn.js +0 -758
- data/lib/forge/public/javascripts/ckeditor/_source/lang/ms.js +0 -758
- data/lib/forge/public/javascripts/ckeditor/_source/lang/nb.js +0 -758
- data/lib/forge/public/javascripts/ckeditor/_source/lang/nl.js +0 -758
- data/lib/forge/public/javascripts/ckeditor/_source/lang/no.js +0 -758
- data/lib/forge/public/javascripts/ckeditor/_source/lang/pl.js +0 -758
- data/lib/forge/public/javascripts/ckeditor/_source/lang/pt-br.js +0 -757
- data/lib/forge/public/javascripts/ckeditor/_source/lang/pt.js +0 -758
- data/lib/forge/public/javascripts/ckeditor/_source/lang/ro.js +0 -758
- data/lib/forge/public/javascripts/ckeditor/_source/lang/ru.js +0 -758
- data/lib/forge/public/javascripts/ckeditor/_source/lang/sk.js +0 -758
- data/lib/forge/public/javascripts/ckeditor/_source/lang/sl.js +0 -758
- data/lib/forge/public/javascripts/ckeditor/_source/lang/sr-latn.js +0 -758
- data/lib/forge/public/javascripts/ckeditor/_source/lang/sr.js +0 -758
- data/lib/forge/public/javascripts/ckeditor/_source/lang/sv.js +0 -758
- data/lib/forge/public/javascripts/ckeditor/_source/lang/th.js +0 -758
- data/lib/forge/public/javascripts/ckeditor/_source/lang/tr.js +0 -757
- data/lib/forge/public/javascripts/ckeditor/_source/lang/uk.js +0 -758
- data/lib/forge/public/javascripts/ckeditor/_source/lang/vi.js +0 -758
- data/lib/forge/public/javascripts/ckeditor/_source/lang/zh-cn.js +0 -758
- data/lib/forge/public/javascripts/ckeditor/_source/lang/zh.js +0 -758
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/a11yhelp/dialogs/a11yhelp.js +0 -211
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/a11yhelp/lang/en.js +0 -108
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/a11yhelp/lang/he.js +0 -216
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/a11yhelp/plugin.js +0 -46
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/about/dialogs/about.js +0 -73
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/about/plugin.js +0 -23
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/ajax_save/plugin.js +0 -43
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/attachment/dialogs/attachment.js +0 -384
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/attachment/plugin.js +0 -44
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/autogrow/plugin.js +0 -79
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/basicstyles/plugin.js +0 -101
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/bidi/plugin.js +0 -247
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/blockquote/plugin.js +0 -301
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/button/plugin.js +0 -277
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/clipboard/dialogs/paste.js +0 -205
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/clipboard/plugin.js +0 -412
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/colorbutton/plugin.js +0 -251
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/colordialog/dialogs/colordialog.js +0 -340
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/colordialog/plugin.js +0 -13
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/contextmenu/plugin.js +0 -276
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/dialog/dialogDefinition.js +0 -315
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/dialog/plugin.js +0 -3016
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/dialogadvtab/plugin.js +0 -207
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/dialogui/plugin.js +0 -1522
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/div/dialogs/div.js +0 -535
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/div/plugin.js +0 -121
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/domiterator/plugin.js +0 -350
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/editingblock/plugin.js +0 -230
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/elementspath/plugin.js +0 -206
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/embed/dialogs/embed.js +0 -65
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/embed/plugin.js +0 -43
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/enterkey/plugin.js +0 -363
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/entities/plugin.js +0 -227
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/fakeobjects/plugin.js +0 -122
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/filebrowser/plugin.js +0 -491
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/find/dialogs/find.js +0 -885
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/find/plugin.js +0 -46
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/flash/dialogs/flash.js +0 -698
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/flash/plugin.js +0 -174
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/floatpanel/plugin.js +0 -398
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/font/plugin.js +0 -234
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/format/plugin.js +0 -194
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/forms/dialogs/button.js +0 -135
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/forms/dialogs/checkbox.js +0 -155
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/forms/dialogs/form.js +0 -177
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/forms/dialogs/hiddenfield.js +0 -98
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/forms/dialogs/radio.js +0 -135
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/forms/dialogs/select.js +0 -556
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/forms/dialogs/textarea.js +0 -114
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/forms/dialogs/textfield.js +0 -199
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/forms/plugin.js +0 -281
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/horizontalrule/plugin.js +0 -36
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/htmldataprocessor/plugin.js +0 -494
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/htmlwriter/plugin.js +0 -314
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/iframedialog/plugin.js +0 -136
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/image/dialogs/image.js +0 -1396
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/image/plugin.js +0 -81
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/indent/plugin.js +0 -447
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/justify/plugin.js +0 -190
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/keystrokes/plugin.js +0 -229
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/link/dialogs/anchor.js +0 -99
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/link/dialogs/link.js +0 -1420
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/link/plugin.js +0 -238
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/list/plugin.js +0 -683
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/listblock/plugin.js +0 -257
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/liststyle/dialogs/liststyle.js +0 -203
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/liststyle/plugin.js +0 -66
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/maximize/plugin.js +0 -343
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/menu/plugin.js +0 -409
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/menubutton/plugin.js +0 -94
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/newpage/plugin.js +0 -54
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/pagebreak/plugin.js +0 -121
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/panel/plugin.js +0 -398
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/panelbutton/plugin.js +0 -147
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/pastefromword/filter/default.js +0 -1170
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/pastefromword/plugin.js +0 -122
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/pastetext/dialogs/pastetext.js +0 -70
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/pastetext/plugin.js +0 -145
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/popup/plugin.js +0 -64
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/preview/plugin.js +0 -108
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/print/plugin.js +0 -41
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/removeformat/plugin.js +0 -184
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/resize/plugin.js +0 -157
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/richcombo/plugin.js +0 -370
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/save/plugin.js +0 -55
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/scayt/dialogs/options.js +0 -533
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/scayt/dialogs/toolbar.css +0 -71
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/scayt/plugin.js +0 -943
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/selection/plugin.js +0 -1367
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/showblocks/plugin.js +0 -156
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/showborders/plugin.js +0 -201
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/smiley/dialogs/smiley.js +0 -216
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/smiley/plugin.js +0 -94
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/sourcearea/plugin.js +0 -207
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/specialchar/dialogs/specialchar.js +0 -409
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/specialchar/plugin.js +0 -29
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/styles/plugin.js +0 -1445
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/styles/styles/default.js +0 -88
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/stylescombo/plugin.js +0 -207
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/tab/plugin.js +0 -367
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/table/dialogs/table.js +0 -673
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/table/plugin.js +0 -78
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/tableresize/plugin.js +0 -450
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/tabletools/dialogs/tableCell.js +0 -533
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/tabletools/plugin.js +0 -1120
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/templates/dialogs/templates.js +0 -231
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/templates/plugin.js +0 -100
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/templates/templates/default.js +0 -94
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/toolbar/plugin.js +0 -481
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/uicolor/dialogs/uicolor.js +0 -205
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/uicolor/lang/en.js +0 -15
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/uicolor/plugin.js +0 -37
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/uicolor/yui/assets/yui.css +0 -15
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/uicolor/yui/yui.js +0 -71
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/undo/plugin.js +0 -555
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/wsc/dialogs/wsc.css +0 -82
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/wsc/dialogs/wsc.js +0 -176
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/wsc/plugin.js +0 -33
- data/lib/forge/public/javascripts/ckeditor/_source/plugins/wysiwygarea/plugin.js +0 -1126
- data/lib/forge/public/javascripts/ckeditor/_source/skins/kama/dialog.css +0 -856
- data/lib/forge/public/javascripts/ckeditor/_source/skins/kama/editor.css +0 -25
- data/lib/forge/public/javascripts/ckeditor/_source/skins/kama/elementspath.css +0 -73
- data/lib/forge/public/javascripts/ckeditor/_source/skins/kama/icons.css +0 -357
- data/lib/forge/public/javascripts/ckeditor/_source/skins/kama/icons.png +0 -0
- data/lib/forge/public/javascripts/ckeditor/_source/skins/kama/icons_rtl.png +0 -0
- data/lib/forge/public/javascripts/ckeditor/_source/skins/kama/images/dialog_sides.gif +0 -0
- data/lib/forge/public/javascripts/ckeditor/_source/skins/kama/images/dialog_sides.png +0 -0
- data/lib/forge/public/javascripts/ckeditor/_source/skins/kama/images/dialog_sides_rtl.png +0 -0
- data/lib/forge/public/javascripts/ckeditor/_source/skins/kama/images/mini.gif +0 -0
- data/lib/forge/public/javascripts/ckeditor/_source/skins/kama/images/noimage.png +0 -0
- data/lib/forge/public/javascripts/ckeditor/_source/skins/kama/images/sprites.png +0 -0
- data/lib/forge/public/javascripts/ckeditor/_source/skins/kama/images/sprites_ie6.png +0 -0
- data/lib/forge/public/javascripts/ckeditor/_source/skins/kama/images/toolbar_start.gif +0 -0
- data/lib/forge/public/javascripts/ckeditor/_source/skins/kama/mainui.css +0 -195
- data/lib/forge/public/javascripts/ckeditor/_source/skins/kama/menu.css +0 -202
- data/lib/forge/public/javascripts/ckeditor/_source/skins/kama/panel.css +0 -217
- data/lib/forge/public/javascripts/ckeditor/_source/skins/kama/presets.css +0 -49
- data/lib/forge/public/javascripts/ckeditor/_source/skins/kama/reset.css +0 -84
- data/lib/forge/public/javascripts/ckeditor/_source/skins/kama/richcombo.css +0 -277
- data/lib/forge/public/javascripts/ckeditor/_source/skins/kama/skin.js +0 -268
- data/lib/forge/public/javascripts/ckeditor/_source/skins/kama/templates.css +0 -88
- data/lib/forge/public/javascripts/ckeditor/_source/skins/kama/toolbar.css +0 -409
- data/lib/forge/public/javascripts/ckeditor/_source/skins/office2003/dialog.css +0 -765
- data/lib/forge/public/javascripts/ckeditor/_source/skins/office2003/editor.css +0 -25
- data/lib/forge/public/javascripts/ckeditor/_source/skins/office2003/elementspath.css +0 -74
- data/lib/forge/public/javascripts/ckeditor/_source/skins/office2003/icons.css +0 -354
- data/lib/forge/public/javascripts/ckeditor/_source/skins/office2003/icons.png +0 -0
- data/lib/forge/public/javascripts/ckeditor/_source/skins/office2003/icons_rtl.png +0 -0
- data/lib/forge/public/javascripts/ckeditor/_source/skins/office2003/images/dialog_sides.gif +0 -0
- data/lib/forge/public/javascripts/ckeditor/_source/skins/office2003/images/dialog_sides.png +0 -0
- data/lib/forge/public/javascripts/ckeditor/_source/skins/office2003/images/dialog_sides_rtl.png +0 -0
- data/lib/forge/public/javascripts/ckeditor/_source/skins/office2003/images/mini.gif +0 -0
- data/lib/forge/public/javascripts/ckeditor/_source/skins/office2003/images/noimage.png +0 -0
- data/lib/forge/public/javascripts/ckeditor/_source/skins/office2003/images/sprites.png +0 -0
- data/lib/forge/public/javascripts/ckeditor/_source/skins/office2003/images/sprites_ie6.png +0 -0
- data/lib/forge/public/javascripts/ckeditor/_source/skins/office2003/mainui.css +0 -145
- data/lib/forge/public/javascripts/ckeditor/_source/skins/office2003/menu.css +0 -199
- data/lib/forge/public/javascripts/ckeditor/_source/skins/office2003/panel.css +0 -212
- data/lib/forge/public/javascripts/ckeditor/_source/skins/office2003/presets.css +0 -49
- data/lib/forge/public/javascripts/ckeditor/_source/skins/office2003/reset.css +0 -84
- data/lib/forge/public/javascripts/ckeditor/_source/skins/office2003/richcombo.css +0 -297
- data/lib/forge/public/javascripts/ckeditor/_source/skins/office2003/skin.js +0 -81
- data/lib/forge/public/javascripts/ckeditor/_source/skins/office2003/templates.css +0 -87
- data/lib/forge/public/javascripts/ckeditor/_source/skins/office2003/toolbar.css +0 -470
- data/lib/forge/public/javascripts/ckeditor/_source/skins/v2/dialog.css +0 -780
- data/lib/forge/public/javascripts/ckeditor/_source/skins/v2/editor.css +0 -25
- data/lib/forge/public/javascripts/ckeditor/_source/skins/v2/elementspath.css +0 -74
- data/lib/forge/public/javascripts/ckeditor/_source/skins/v2/icons.css +0 -354
- data/lib/forge/public/javascripts/ckeditor/_source/skins/v2/icons.png +0 -0
- data/lib/forge/public/javascripts/ckeditor/_source/skins/v2/icons_rtl.png +0 -0
- data/lib/forge/public/javascripts/ckeditor/_source/skins/v2/images/dialog_sides.gif +0 -0
- data/lib/forge/public/javascripts/ckeditor/_source/skins/v2/images/dialog_sides.png +0 -0
- data/lib/forge/public/javascripts/ckeditor/_source/skins/v2/images/dialog_sides_rtl.png +0 -0
- data/lib/forge/public/javascripts/ckeditor/_source/skins/v2/images/mini.gif +0 -0
- data/lib/forge/public/javascripts/ckeditor/_source/skins/v2/images/noimage.png +0 -0
- data/lib/forge/public/javascripts/ckeditor/_source/skins/v2/images/sprites.png +0 -0
- data/lib/forge/public/javascripts/ckeditor/_source/skins/v2/images/sprites_ie6.png +0 -0
- data/lib/forge/public/javascripts/ckeditor/_source/skins/v2/images/toolbar_start.gif +0 -0
- data/lib/forge/public/javascripts/ckeditor/_source/skins/v2/mainui.css +0 -154
- data/lib/forge/public/javascripts/ckeditor/_source/skins/v2/menu.css +0 -201
- data/lib/forge/public/javascripts/ckeditor/_source/skins/v2/panel.css +0 -212
- data/lib/forge/public/javascripts/ckeditor/_source/skins/v2/presets.css +0 -50
- data/lib/forge/public/javascripts/ckeditor/_source/skins/v2/reset.css +0 -84
- data/lib/forge/public/javascripts/ckeditor/_source/skins/v2/richcombo.css +0 -297
- data/lib/forge/public/javascripts/ckeditor/_source/skins/v2/skin.js +0 -77
- data/lib/forge/public/javascripts/ckeditor/_source/skins/v2/templates.css +0 -87
- data/lib/forge/public/javascripts/ckeditor/_source/skins/v2/toolbar.css +0 -423
- data/lib/forge/public/javascripts/ckeditor/_source/themes/default/theme.js +0 -356
- data/lib/forge/public/javascripts/ckeditor/adapters/jquery.js +0 -6
- data/lib/forge/public/javascripts/ckeditor/ckeditor.js +0 -135
- data/lib/forge/public/javascripts/ckeditor/ckeditor.pack +0 -211
- data/lib/forge/public/javascripts/ckeditor/ckeditor_basic.js +0 -8
- data/lib/forge/public/javascripts/ckeditor/ckeditor_basic_source.js +0 -20
- data/lib/forge/public/javascripts/ckeditor/ckeditor_source.js +0 -25
- data/lib/forge/public/javascripts/ckeditor/config.js +0 -47
- data/lib/forge/public/javascripts/ckeditor/css/ckfinder.css +0 -299
- data/lib/forge/public/javascripts/ckeditor/css/fck_dialog.css +0 -119
- data/lib/forge/public/javascripts/ckeditor/css/fck_editor.css +0 -448
- data/lib/forge/public/javascripts/ckeditor/css/swfupload.css +0 -94
- data/lib/forge/public/javascripts/ckeditor/images/add.gif +0 -0
- data/lib/forge/public/javascripts/ckeditor/images/cancelbutton.gif +0 -0
- data/lib/forge/public/javascripts/ckeditor/images/ckfnothumb.gif +0 -0
- data/lib/forge/public/javascripts/ckeditor/images/doc.gif +0 -0
- data/lib/forge/public/javascripts/ckeditor/images/image_new.gif +0 -0
- data/lib/forge/public/javascripts/ckeditor/images/mp3.gif +0 -0
- data/lib/forge/public/javascripts/ckeditor/images/pdf.gif +0 -0
- data/lib/forge/public/javascripts/ckeditor/images/rar.gif +0 -0
- data/lib/forge/public/javascripts/ckeditor/images/refresh.gif +0 -0
- data/lib/forge/public/javascripts/ckeditor/images/select_files.png +0 -0
- data/lib/forge/public/javascripts/ckeditor/images/spacer.gif +0 -0
- data/lib/forge/public/javascripts/ckeditor/images/swf.gif +0 -0
- data/lib/forge/public/javascripts/ckeditor/images/toolbar.start.gif +0 -0
- data/lib/forge/public/javascripts/ckeditor/images/xls.gif +0 -0
- data/lib/forge/public/javascripts/ckeditor/lang/_languages.js +0 -6
- data/lib/forge/public/javascripts/ckeditor/lang/_translationstatus.txt +0 -60
- data/lib/forge/public/javascripts/ckeditor/lang/af.js +0 -6
- data/lib/forge/public/javascripts/ckeditor/lang/ar.js +0 -6
- data/lib/forge/public/javascripts/ckeditor/lang/bg.js +0 -6
- data/lib/forge/public/javascripts/ckeditor/lang/bn.js +0 -6
- data/lib/forge/public/javascripts/ckeditor/lang/bs.js +0 -6
- data/lib/forge/public/javascripts/ckeditor/lang/ca.js +0 -6
- data/lib/forge/public/javascripts/ckeditor/lang/cs.js +0 -6
- data/lib/forge/public/javascripts/ckeditor/lang/cy.js +0 -6
- data/lib/forge/public/javascripts/ckeditor/lang/da.js +0 -6
- data/lib/forge/public/javascripts/ckeditor/lang/de.js +0 -6
- data/lib/forge/public/javascripts/ckeditor/lang/el.js +0 -6
- data/lib/forge/public/javascripts/ckeditor/lang/en-au.js +0 -6
- data/lib/forge/public/javascripts/ckeditor/lang/en-ca.js +0 -6
- data/lib/forge/public/javascripts/ckeditor/lang/en-gb.js +0 -6
- data/lib/forge/public/javascripts/ckeditor/lang/en.js +0 -6
- data/lib/forge/public/javascripts/ckeditor/lang/eo.js +0 -6
- data/lib/forge/public/javascripts/ckeditor/lang/es.js +0 -6
- data/lib/forge/public/javascripts/ckeditor/lang/et.js +0 -6
- data/lib/forge/public/javascripts/ckeditor/lang/eu.js +0 -6
- data/lib/forge/public/javascripts/ckeditor/lang/fa.js +0 -6
- data/lib/forge/public/javascripts/ckeditor/lang/fi.js +0 -6
- data/lib/forge/public/javascripts/ckeditor/lang/fo.js +0 -6
- data/lib/forge/public/javascripts/ckeditor/lang/fr-ca.js +0 -6
- data/lib/forge/public/javascripts/ckeditor/lang/fr.js +0 -6
- data/lib/forge/public/javascripts/ckeditor/lang/gl.js +0 -6
- data/lib/forge/public/javascripts/ckeditor/lang/gu.js +0 -6
- data/lib/forge/public/javascripts/ckeditor/lang/he.js +0 -6
- data/lib/forge/public/javascripts/ckeditor/lang/hi.js +0 -6
- data/lib/forge/public/javascripts/ckeditor/lang/hr.js +0 -6
- data/lib/forge/public/javascripts/ckeditor/lang/hu.js +0 -6
- data/lib/forge/public/javascripts/ckeditor/lang/is.js +0 -6
- data/lib/forge/public/javascripts/ckeditor/lang/it.js +0 -6
- data/lib/forge/public/javascripts/ckeditor/lang/ja.js +0 -6
- data/lib/forge/public/javascripts/ckeditor/lang/km.js +0 -6
- data/lib/forge/public/javascripts/ckeditor/lang/ko.js +0 -6
- data/lib/forge/public/javascripts/ckeditor/lang/lt.js +0 -6
- data/lib/forge/public/javascripts/ckeditor/lang/lv.js +0 -6
- data/lib/forge/public/javascripts/ckeditor/lang/mn.js +0 -6
- data/lib/forge/public/javascripts/ckeditor/lang/ms.js +0 -6
- data/lib/forge/public/javascripts/ckeditor/lang/nb.js +0 -6
- data/lib/forge/public/javascripts/ckeditor/lang/nl.js +0 -6
- data/lib/forge/public/javascripts/ckeditor/lang/no.js +0 -6
- data/lib/forge/public/javascripts/ckeditor/lang/pl.js +0 -6
- data/lib/forge/public/javascripts/ckeditor/lang/pt-br.js +0 -6
- data/lib/forge/public/javascripts/ckeditor/lang/pt.js +0 -6
- data/lib/forge/public/javascripts/ckeditor/lang/ro.js +0 -6
- data/lib/forge/public/javascripts/ckeditor/lang/ru.js +0 -6
- data/lib/forge/public/javascripts/ckeditor/lang/sk.js +0 -6
- data/lib/forge/public/javascripts/ckeditor/lang/sl.js +0 -6
- data/lib/forge/public/javascripts/ckeditor/lang/sr-latn.js +0 -6
- data/lib/forge/public/javascripts/ckeditor/lang/sr.js +0 -6
- data/lib/forge/public/javascripts/ckeditor/lang/sv.js +0 -6
- data/lib/forge/public/javascripts/ckeditor/lang/th.js +0 -6
- data/lib/forge/public/javascripts/ckeditor/lang/tr.js +0 -6
- data/lib/forge/public/javascripts/ckeditor/lang/uk.js +0 -6
- data/lib/forge/public/javascripts/ckeditor/lang/vi.js +0 -6
- data/lib/forge/public/javascripts/ckeditor/lang/zh-cn.js +0 -6
- data/lib/forge/public/javascripts/ckeditor/lang/zh.js +0 -6
- data/lib/forge/public/javascripts/ckeditor/plugins/about/dialogs/logo_ckeditor.png +0 -0
- data/lib/forge/public/javascripts/ckeditor/plugins/attachment/images/attachment.png +0 -0
- data/lib/forge/public/javascripts/ckeditor/plugins/attachment/lang/en.js +0 -10
- data/lib/forge/public/javascripts/ckeditor/plugins/attachment/lang/ru.js +0 -10
- data/lib/forge/public/javascripts/ckeditor/plugins/attachment/lang/uk.js +0 -10
- data/lib/forge/public/javascripts/ckeditor/plugins/embed/images/embed.png +0 -0
- data/lib/forge/public/javascripts/ckeditor/plugins/embed/lang/en.js +0 -9
- data/lib/forge/public/javascripts/ckeditor/plugins/embed/lang/ru.js +0 -9
- data/lib/forge/public/javascripts/ckeditor/plugins/embed/lang/uk.js +0 -9
- data/lib/forge/public/javascripts/ckeditor/plugins/flash/images/placeholder.png +0 -0
- data/lib/forge/public/javascripts/ckeditor/plugins/forms/images/hiddenfield.gif +0 -0
- data/lib/forge/public/javascripts/ckeditor/plugins/link/images/anchor.gif +0 -0
- data/lib/forge/public/javascripts/ckeditor/plugins/pagebreak/images/pagebreak.gif +0 -0
- data/lib/forge/public/javascripts/ckeditor/plugins/showblocks/images/block_address.png +0 -0
- data/lib/forge/public/javascripts/ckeditor/plugins/showblocks/images/block_blockquote.png +0 -0
- data/lib/forge/public/javascripts/ckeditor/plugins/showblocks/images/block_div.png +0 -0
- data/lib/forge/public/javascripts/ckeditor/plugins/showblocks/images/block_h1.png +0 -0
- data/lib/forge/public/javascripts/ckeditor/plugins/showblocks/images/block_h2.png +0 -0
- data/lib/forge/public/javascripts/ckeditor/plugins/showblocks/images/block_h3.png +0 -0
- data/lib/forge/public/javascripts/ckeditor/plugins/showblocks/images/block_h4.png +0 -0
- data/lib/forge/public/javascripts/ckeditor/plugins/showblocks/images/block_h5.png +0 -0
- data/lib/forge/public/javascripts/ckeditor/plugins/showblocks/images/block_h6.png +0 -0
- data/lib/forge/public/javascripts/ckeditor/plugins/showblocks/images/block_p.png +0 -0
- data/lib/forge/public/javascripts/ckeditor/plugins/showblocks/images/block_pre.png +0 -0
- data/lib/forge/public/javascripts/ckeditor/plugins/smiley/images/angel_smile.gif +0 -0
- data/lib/forge/public/javascripts/ckeditor/plugins/smiley/images/angry_smile.gif +0 -0
- data/lib/forge/public/javascripts/ckeditor/plugins/smiley/images/broken_heart.gif +0 -0
- data/lib/forge/public/javascripts/ckeditor/plugins/smiley/images/confused_smile.gif +0 -0
- data/lib/forge/public/javascripts/ckeditor/plugins/smiley/images/cry_smile.gif +0 -0
- data/lib/forge/public/javascripts/ckeditor/plugins/smiley/images/devil_smile.gif +0 -0
- data/lib/forge/public/javascripts/ckeditor/plugins/smiley/images/embaressed_smile.gif +0 -0
- data/lib/forge/public/javascripts/ckeditor/plugins/smiley/images/envelope.gif +0 -0
- data/lib/forge/public/javascripts/ckeditor/plugins/smiley/images/heart.gif +0 -0
- data/lib/forge/public/javascripts/ckeditor/plugins/smiley/images/kiss.gif +0 -0
- data/lib/forge/public/javascripts/ckeditor/plugins/smiley/images/lightbulb.gif +0 -0
- data/lib/forge/public/javascripts/ckeditor/plugins/smiley/images/omg_smile.gif +0 -0
- data/lib/forge/public/javascripts/ckeditor/plugins/smiley/images/regular_smile.gif +0 -0
- data/lib/forge/public/javascripts/ckeditor/plugins/smiley/images/sad_smile.gif +0 -0
- data/lib/forge/public/javascripts/ckeditor/plugins/smiley/images/shades_smile.gif +0 -0
- data/lib/forge/public/javascripts/ckeditor/plugins/smiley/images/teeth_smile.gif +0 -0
- data/lib/forge/public/javascripts/ckeditor/plugins/smiley/images/thumbs_down.gif +0 -0
- data/lib/forge/public/javascripts/ckeditor/plugins/smiley/images/thumbs_up.gif +0 -0
- data/lib/forge/public/javascripts/ckeditor/plugins/smiley/images/tounge_smile.gif +0 -0
- data/lib/forge/public/javascripts/ckeditor/plugins/smiley/images/whatchutalkingabout_smile.gif +0 -0
- data/lib/forge/public/javascripts/ckeditor/plugins/smiley/images/wink_smile.gif +0 -0
- data/lib/forge/public/javascripts/ckeditor/plugins/templates/templates/images/template1.gif +0 -0
- data/lib/forge/public/javascripts/ckeditor/plugins/templates/templates/images/template2.gif +0 -0
- data/lib/forge/public/javascripts/ckeditor/plugins/templates/templates/images/template3.gif +0 -0
- data/lib/forge/public/javascripts/ckeditor/plugins/uicolor/uicolor.gif +0 -0
- data/lib/forge/public/javascripts/ckeditor/plugins/uicolor/yui/assets/hue_bg.png +0 -0
- data/lib/forge/public/javascripts/ckeditor/plugins/uicolor/yui/assets/hue_thumb.png +0 -0
- data/lib/forge/public/javascripts/ckeditor/plugins/uicolor/yui/assets/picker_mask.png +0 -0
- data/lib/forge/public/javascripts/ckeditor/plugins/uicolor/yui/assets/picker_thumb.png +0 -0
- data/lib/forge/public/javascripts/ckeditor/plugins/wsc/dialogs/ciframe.html +0 -49
- data/lib/forge/public/javascripts/ckeditor/plugins/wsc/dialogs/tmpFrameset.html +0 -52
- data/lib/forge/public/javascripts/ckeditor/skins/kama/dialog.css +0 -9
- data/lib/forge/public/javascripts/ckeditor/skins/kama/editor.css +0 -12
- data/lib/forge/public/javascripts/ckeditor/skins/kama/icons.png +0 -0
- data/lib/forge/public/javascripts/ckeditor/skins/kama/icons_rtl.png +0 -0
- data/lib/forge/public/javascripts/ckeditor/skins/kama/images/dialog_sides.gif +0 -0
- data/lib/forge/public/javascripts/ckeditor/skins/kama/images/dialog_sides.png +0 -0
- data/lib/forge/public/javascripts/ckeditor/skins/kama/images/dialog_sides_rtl.png +0 -0
- data/lib/forge/public/javascripts/ckeditor/skins/kama/images/mini.gif +0 -0
- data/lib/forge/public/javascripts/ckeditor/skins/kama/images/noimage.png +0 -0
- data/lib/forge/public/javascripts/ckeditor/skins/kama/images/sprites.png +0 -0
- data/lib/forge/public/javascripts/ckeditor/skins/kama/images/sprites_ie6.png +0 -0
- data/lib/forge/public/javascripts/ckeditor/skins/kama/images/toolbar_start.gif +0 -0
- data/lib/forge/public/javascripts/ckeditor/skins/kama/skin.js +0 -7
- data/lib/forge/public/javascripts/ckeditor/skins/kama/templates.css +0 -6
- data/lib/forge/public/javascripts/ckeditor/skins/office2003/dialog.css +0 -9
- data/lib/forge/public/javascripts/ckeditor/skins/office2003/editor.css +0 -13
- data/lib/forge/public/javascripts/ckeditor/skins/office2003/icons.png +0 -0
- data/lib/forge/public/javascripts/ckeditor/skins/office2003/icons_rtl.png +0 -0
- data/lib/forge/public/javascripts/ckeditor/skins/office2003/images/dialog_sides.gif +0 -0
- data/lib/forge/public/javascripts/ckeditor/skins/office2003/images/dialog_sides.png +0 -0
- data/lib/forge/public/javascripts/ckeditor/skins/office2003/images/dialog_sides_rtl.png +0 -0
- data/lib/forge/public/javascripts/ckeditor/skins/office2003/images/mini.gif +0 -0
- data/lib/forge/public/javascripts/ckeditor/skins/office2003/images/noimage.png +0 -0
- data/lib/forge/public/javascripts/ckeditor/skins/office2003/images/sprites.png +0 -0
- data/lib/forge/public/javascripts/ckeditor/skins/office2003/images/sprites_ie6.png +0 -0
- data/lib/forge/public/javascripts/ckeditor/skins/office2003/skin.js +0 -6
- data/lib/forge/public/javascripts/ckeditor/skins/office2003/templates.css +0 -6
- data/lib/forge/public/javascripts/ckeditor/skins/v2/dialog.css +0 -8
- data/lib/forge/public/javascripts/ckeditor/skins/v2/editor.css +0 -12
- data/lib/forge/public/javascripts/ckeditor/skins/v2/icons.png +0 -0
- data/lib/forge/public/javascripts/ckeditor/skins/v2/icons_rtl.png +0 -0
- data/lib/forge/public/javascripts/ckeditor/skins/v2/images/dialog_sides.gif +0 -0
- data/lib/forge/public/javascripts/ckeditor/skins/v2/images/dialog_sides.png +0 -0
- data/lib/forge/public/javascripts/ckeditor/skins/v2/images/dialog_sides_rtl.png +0 -0
- data/lib/forge/public/javascripts/ckeditor/skins/v2/images/mini.gif +0 -0
- data/lib/forge/public/javascripts/ckeditor/skins/v2/images/noimage.png +0 -0
- data/lib/forge/public/javascripts/ckeditor/skins/v2/images/sprites.png +0 -0
- data/lib/forge/public/javascripts/ckeditor/skins/v2/images/sprites_ie6.png +0 -0
- data/lib/forge/public/javascripts/ckeditor/skins/v2/images/toolbar_start.gif +0 -0
- data/lib/forge/public/javascripts/ckeditor/skins/v2/skin.js +0 -6
- data/lib/forge/public/javascripts/ckeditor/skins/v2/templates.css +0 -6
- data/lib/forge/public/javascripts/ckeditor/swfupload/fileprogress.js +0 -275
- data/lib/forge/public/javascripts/ckeditor/swfupload/handlers.js +0 -170
- data/lib/forge/public/javascripts/ckeditor/swfupload/mootools-1.2.3-core-yc.js +0 -356
- data/lib/forge/public/javascripts/ckeditor/swfupload/querystring.js +0 -40
- data/lib/forge/public/javascripts/ckeditor/swfupload/swfupload.js +0 -1
- data/lib/forge/public/javascripts/ckeditor/swfupload/swfupload.queue.js +0 -1
- data/lib/forge/public/javascripts/ckeditor/swfupload/swfupload.swf +0 -0
- data/lib/forge/public/javascripts/ckeditor/swfupload/swfupload.swfobject.js +0 -111
- data/lib/forge/public/javascripts/ckeditor/themes/default/theme.js +0 -8
@@ -1,29 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
|
3
|
-
For licensing, see LICENSE.html or http://ckeditor.com/license
|
4
|
-
*/
|
5
|
-
|
6
|
-
/**
|
7
|
-
* @file Special Character plugin
|
8
|
-
*/
|
9
|
-
|
10
|
-
CKEDITOR.plugins.add( 'specialchar',
|
11
|
-
{
|
12
|
-
init : function( editor )
|
13
|
-
{
|
14
|
-
var pluginName = 'specialchar';
|
15
|
-
|
16
|
-
// Register the dialog.
|
17
|
-
CKEDITOR.dialog.add( pluginName, this.path + 'dialogs/specialchar.js' );
|
18
|
-
|
19
|
-
// Register the command.
|
20
|
-
editor.addCommand( pluginName, new CKEDITOR.dialogCommand( pluginName ) );
|
21
|
-
|
22
|
-
// Register the toolbar button.
|
23
|
-
editor.ui.addButton( 'SpecialChar',
|
24
|
-
{
|
25
|
-
label : editor.lang.specialChar.toolbar,
|
26
|
-
command : pluginName
|
27
|
-
});
|
28
|
-
}
|
29
|
-
} );
|
@@ -1,1445 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
|
3
|
-
For licensing, see LICENSE.html or http://ckeditor.com/license
|
4
|
-
*/
|
5
|
-
|
6
|
-
CKEDITOR.plugins.add( 'styles',
|
7
|
-
{
|
8
|
-
requires : [ 'selection' ]
|
9
|
-
});
|
10
|
-
|
11
|
-
/**
|
12
|
-
* Registers a function to be called whenever a style changes its state in the
|
13
|
-
* editing area. The current state is passed to the function. The possible
|
14
|
-
* states are {@link CKEDITOR.TRISTATE_ON} and {@link CKEDITOR.TRISTATE_OFF}.
|
15
|
-
* @param {CKEDITOR.style} The style to be watched.
|
16
|
-
* @param {Function} The function to be called when the style state changes.
|
17
|
-
* @example
|
18
|
-
* // Create a style object for the <b> element.
|
19
|
-
* var style = new CKEDITOR.style( { element : 'b' } );
|
20
|
-
* var editor = CKEDITOR.instances.editor1;
|
21
|
-
* editor.attachStyleStateChange( style, function( state )
|
22
|
-
* {
|
23
|
-
* if ( state == CKEDITOR.TRISTATE_ON )
|
24
|
-
* alert( 'The current state for the B element is ON' );
|
25
|
-
* else
|
26
|
-
* alert( 'The current state for the B element is OFF' );
|
27
|
-
* });
|
28
|
-
*/
|
29
|
-
CKEDITOR.editor.prototype.attachStyleStateChange = function( style, callback )
|
30
|
-
{
|
31
|
-
// Try to get the list of attached callbacks.
|
32
|
-
var styleStateChangeCallbacks = this._.styleStateChangeCallbacks;
|
33
|
-
|
34
|
-
// If it doesn't exist, it means this is the first call. So, let's create
|
35
|
-
// all the structure to manage the style checks and the callback calls.
|
36
|
-
if ( !styleStateChangeCallbacks )
|
37
|
-
{
|
38
|
-
// Create the callbacks array.
|
39
|
-
styleStateChangeCallbacks = this._.styleStateChangeCallbacks = [];
|
40
|
-
|
41
|
-
// Attach to the selectionChange event, so we can check the styles at
|
42
|
-
// that point.
|
43
|
-
this.on( 'selectionChange', function( ev )
|
44
|
-
{
|
45
|
-
// Loop throw all registered callbacks.
|
46
|
-
for ( var i = 0 ; i < styleStateChangeCallbacks.length ; i++ )
|
47
|
-
{
|
48
|
-
var callback = styleStateChangeCallbacks[ i ];
|
49
|
-
|
50
|
-
// Check the current state for the style defined for that
|
51
|
-
// callback.
|
52
|
-
var currentState = callback.style.checkActive( ev.data.path ) ? CKEDITOR.TRISTATE_ON : CKEDITOR.TRISTATE_OFF;
|
53
|
-
|
54
|
-
// If the state changed since the last check.
|
55
|
-
if ( callback.state !== currentState )
|
56
|
-
{
|
57
|
-
// Call the callback function, passing the current
|
58
|
-
// state to it.
|
59
|
-
callback.fn.call( this, currentState );
|
60
|
-
|
61
|
-
// Save the current state, so it can be compared next
|
62
|
-
// time.
|
63
|
-
callback.state = currentState;
|
64
|
-
}
|
65
|
-
}
|
66
|
-
});
|
67
|
-
}
|
68
|
-
|
69
|
-
// Save the callback info, so it can be checked on the next occurrence of
|
70
|
-
// selectionChange.
|
71
|
-
styleStateChangeCallbacks.push( { style : style, fn : callback } );
|
72
|
-
};
|
73
|
-
|
74
|
-
CKEDITOR.STYLE_BLOCK = 1;
|
75
|
-
CKEDITOR.STYLE_INLINE = 2;
|
76
|
-
CKEDITOR.STYLE_OBJECT = 3;
|
77
|
-
|
78
|
-
(function()
|
79
|
-
{
|
80
|
-
var blockElements = { address:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,p:1,pre:1 };
|
81
|
-
var objectElements = { a:1,embed:1,hr:1,img:1,li:1,object:1,ol:1,table:1,td:1,tr:1,th:1,ul:1,dl:1,dt:1,dd:1,form:1};
|
82
|
-
|
83
|
-
var semicolonFixRegex = /\s*(?:;\s*|$)/;
|
84
|
-
|
85
|
-
CKEDITOR.style = function( styleDefinition, variablesValues )
|
86
|
-
{
|
87
|
-
if ( variablesValues )
|
88
|
-
{
|
89
|
-
styleDefinition = CKEDITOR.tools.clone( styleDefinition );
|
90
|
-
|
91
|
-
replaceVariables( styleDefinition.attributes, variablesValues );
|
92
|
-
replaceVariables( styleDefinition.styles, variablesValues );
|
93
|
-
}
|
94
|
-
|
95
|
-
var element = this.element = ( styleDefinition.element || '*' ).toLowerCase();
|
96
|
-
|
97
|
-
this.type =
|
98
|
-
( element == '#' || blockElements[ element ] ) ?
|
99
|
-
CKEDITOR.STYLE_BLOCK
|
100
|
-
: objectElements[ element ] ?
|
101
|
-
CKEDITOR.STYLE_OBJECT
|
102
|
-
:
|
103
|
-
CKEDITOR.STYLE_INLINE;
|
104
|
-
|
105
|
-
this._ =
|
106
|
-
{
|
107
|
-
definition : styleDefinition
|
108
|
-
};
|
109
|
-
};
|
110
|
-
|
111
|
-
CKEDITOR.style.prototype =
|
112
|
-
{
|
113
|
-
apply : function( document )
|
114
|
-
{
|
115
|
-
applyStyle.call( this, document, false );
|
116
|
-
},
|
117
|
-
|
118
|
-
remove : function( document )
|
119
|
-
{
|
120
|
-
applyStyle.call( this, document, true );
|
121
|
-
},
|
122
|
-
|
123
|
-
applyToRange : function( range )
|
124
|
-
{
|
125
|
-
return ( this.applyToRange =
|
126
|
-
this.type == CKEDITOR.STYLE_INLINE ?
|
127
|
-
applyInlineStyle
|
128
|
-
: this.type == CKEDITOR.STYLE_BLOCK ?
|
129
|
-
applyBlockStyle
|
130
|
-
: this.type == CKEDITOR.STYLE_OBJECT ?
|
131
|
-
applyObjectStyle
|
132
|
-
: null ).call( this, range );
|
133
|
-
},
|
134
|
-
|
135
|
-
removeFromRange : function( range )
|
136
|
-
{
|
137
|
-
return ( this.removeFromRange =
|
138
|
-
this.type == CKEDITOR.STYLE_INLINE ?
|
139
|
-
removeInlineStyle
|
140
|
-
: this.type == CKEDITOR.STYLE_OBJECT ?
|
141
|
-
removeObjectStyle
|
142
|
-
: null ).call( this, range );
|
143
|
-
},
|
144
|
-
|
145
|
-
applyToObject : function( element )
|
146
|
-
{
|
147
|
-
setupElement( element, this );
|
148
|
-
},
|
149
|
-
|
150
|
-
/**
|
151
|
-
* Get the style state inside an element path. Returns "true" if the
|
152
|
-
* element is active in the path.
|
153
|
-
*/
|
154
|
-
checkActive : function( elementPath )
|
155
|
-
{
|
156
|
-
switch ( this.type )
|
157
|
-
{
|
158
|
-
case CKEDITOR.STYLE_BLOCK :
|
159
|
-
return this.checkElementRemovable( elementPath.block || elementPath.blockLimit, true );
|
160
|
-
|
161
|
-
case CKEDITOR.STYLE_OBJECT :
|
162
|
-
case CKEDITOR.STYLE_INLINE :
|
163
|
-
|
164
|
-
var elements = elementPath.elements;
|
165
|
-
|
166
|
-
for ( var i = 0, element ; i < elements.length ; i++ )
|
167
|
-
{
|
168
|
-
element = elements[ i ];
|
169
|
-
|
170
|
-
if ( this.type == CKEDITOR.STYLE_INLINE
|
171
|
-
&& ( element == elementPath.block || element == elementPath.blockLimit ) )
|
172
|
-
continue;
|
173
|
-
|
174
|
-
if( this.type == CKEDITOR.STYLE_OBJECT
|
175
|
-
&& !( element.getName() in objectElements ) )
|
176
|
-
continue;
|
177
|
-
|
178
|
-
if ( this.checkElementRemovable( element, true ) )
|
179
|
-
return true;
|
180
|
-
}
|
181
|
-
}
|
182
|
-
return false;
|
183
|
-
},
|
184
|
-
|
185
|
-
/**
|
186
|
-
* Whether this style can be applied at the element path.
|
187
|
-
* @param elementPath
|
188
|
-
*/
|
189
|
-
checkApplicable : function( elementPath )
|
190
|
-
{
|
191
|
-
switch ( this.type )
|
192
|
-
{
|
193
|
-
case CKEDITOR.STYLE_INLINE :
|
194
|
-
case CKEDITOR.STYLE_BLOCK :
|
195
|
-
break;
|
196
|
-
|
197
|
-
case CKEDITOR.STYLE_OBJECT :
|
198
|
-
return elementPath.lastElement.getAscendant( this.element, true );
|
199
|
-
}
|
200
|
-
|
201
|
-
return true;
|
202
|
-
},
|
203
|
-
|
204
|
-
// Checks if an element, or any of its attributes, is removable by the
|
205
|
-
// current style definition.
|
206
|
-
checkElementRemovable : function( element, fullMatch )
|
207
|
-
{
|
208
|
-
if ( !element )
|
209
|
-
return false;
|
210
|
-
|
211
|
-
var def = this._.definition,
|
212
|
-
attribs;
|
213
|
-
|
214
|
-
// If the element name is the same as the style name.
|
215
|
-
if ( element.getName() == this.element )
|
216
|
-
{
|
217
|
-
// If no attributes are defined in the element.
|
218
|
-
if ( !fullMatch && !element.hasAttributes() )
|
219
|
-
return true;
|
220
|
-
|
221
|
-
attribs = getAttributesForComparison( def );
|
222
|
-
|
223
|
-
if ( attribs._length )
|
224
|
-
{
|
225
|
-
for ( var attName in attribs )
|
226
|
-
{
|
227
|
-
if ( attName == '_length' )
|
228
|
-
continue;
|
229
|
-
|
230
|
-
var elementAttr = element.getAttribute( attName ) || '';
|
231
|
-
|
232
|
-
// Special treatment for 'style' attribute is required.
|
233
|
-
if ( attName == 'style' ?
|
234
|
-
compareCssText( attribs[ attName ], normalizeCssText( elementAttr, false ) )
|
235
|
-
: attribs[ attName ] == elementAttr )
|
236
|
-
{
|
237
|
-
if ( !fullMatch )
|
238
|
-
return true;
|
239
|
-
}
|
240
|
-
else if ( fullMatch )
|
241
|
-
return false;
|
242
|
-
}
|
243
|
-
if ( fullMatch )
|
244
|
-
return true;
|
245
|
-
}
|
246
|
-
else
|
247
|
-
return true;
|
248
|
-
}
|
249
|
-
|
250
|
-
// Check if the element can be somehow overriden.
|
251
|
-
var override = getOverrides( this )[ element.getName() ] ;
|
252
|
-
if ( override )
|
253
|
-
{
|
254
|
-
// If no attributes have been defined, remove the element.
|
255
|
-
if ( !( attribs = override.attributes ) )
|
256
|
-
return true;
|
257
|
-
|
258
|
-
for ( var i = 0 ; i < attribs.length ; i++ )
|
259
|
-
{
|
260
|
-
attName = attribs[i][0];
|
261
|
-
var actualAttrValue = element.getAttribute( attName );
|
262
|
-
if ( actualAttrValue )
|
263
|
-
{
|
264
|
-
var attValue = attribs[i][1];
|
265
|
-
|
266
|
-
// Remove the attribute if:
|
267
|
-
// - The override definition value is null;
|
268
|
-
// - The override definition value is a string that
|
269
|
-
// matches the attribute value exactly.
|
270
|
-
// - The override definition value is a regex that
|
271
|
-
// has matches in the attribute value.
|
272
|
-
if ( attValue === null ||
|
273
|
-
( typeof attValue == 'string' && actualAttrValue == attValue ) ||
|
274
|
-
attValue.test( actualAttrValue ) )
|
275
|
-
return true;
|
276
|
-
}
|
277
|
-
}
|
278
|
-
}
|
279
|
-
return false;
|
280
|
-
},
|
281
|
-
|
282
|
-
// Builds the preview HTML based on the styles definition.
|
283
|
-
buildPreview : function()
|
284
|
-
{
|
285
|
-
var styleDefinition = this._.definition,
|
286
|
-
html = [],
|
287
|
-
elementName = styleDefinition.element;
|
288
|
-
|
289
|
-
// Avoid <bdo> in the preview.
|
290
|
-
if ( elementName == 'bdo' )
|
291
|
-
elementName = 'span';
|
292
|
-
|
293
|
-
html = [ '<', elementName ];
|
294
|
-
|
295
|
-
// Assign all defined attributes.
|
296
|
-
var attribs = styleDefinition.attributes;
|
297
|
-
if ( attribs )
|
298
|
-
{
|
299
|
-
for ( var att in attribs )
|
300
|
-
{
|
301
|
-
html.push( ' ', att, '="', attribs[ att ], '"' );
|
302
|
-
}
|
303
|
-
}
|
304
|
-
|
305
|
-
// Assign the style attribute.
|
306
|
-
var cssStyle = CKEDITOR.style.getStyleText( styleDefinition );
|
307
|
-
if ( cssStyle )
|
308
|
-
html.push( ' style="', cssStyle, '"' );
|
309
|
-
|
310
|
-
html.push( '>', styleDefinition.name, '</', elementName, '>' );
|
311
|
-
|
312
|
-
return html.join( '' );
|
313
|
-
}
|
314
|
-
};
|
315
|
-
|
316
|
-
// Build the cssText based on the styles definition.
|
317
|
-
CKEDITOR.style.getStyleText = function( styleDefinition )
|
318
|
-
{
|
319
|
-
// If we have already computed it, just return it.
|
320
|
-
var stylesDef = styleDefinition._ST;
|
321
|
-
if ( stylesDef )
|
322
|
-
return stylesDef;
|
323
|
-
|
324
|
-
stylesDef = styleDefinition.styles;
|
325
|
-
|
326
|
-
// Builds the StyleText.
|
327
|
-
var stylesText = ( styleDefinition.attributes && styleDefinition.attributes[ 'style' ] ) || '',
|
328
|
-
specialStylesText = '';
|
329
|
-
|
330
|
-
if ( stylesText.length )
|
331
|
-
stylesText = stylesText.replace( semicolonFixRegex, ';' );
|
332
|
-
|
333
|
-
for ( var style in stylesDef )
|
334
|
-
{
|
335
|
-
var styleVal = stylesDef[ style ],
|
336
|
-
text = ( style + ':' + styleVal ).replace( semicolonFixRegex, ';' );
|
337
|
-
|
338
|
-
// Some browsers don't support 'inherit' property value, leave them intact. (#5242)
|
339
|
-
if ( styleVal == 'inherit' )
|
340
|
-
specialStylesText += text;
|
341
|
-
else
|
342
|
-
stylesText += text;
|
343
|
-
}
|
344
|
-
|
345
|
-
// Browsers make some changes to the style when applying them. So, here
|
346
|
-
// we normalize it to the browser format.
|
347
|
-
if ( stylesText.length )
|
348
|
-
stylesText = normalizeCssText( stylesText );
|
349
|
-
|
350
|
-
stylesText += specialStylesText;
|
351
|
-
|
352
|
-
// Return it, saving it to the next request.
|
353
|
-
return ( styleDefinition._ST = stylesText );
|
354
|
-
};
|
355
|
-
|
356
|
-
function applyInlineStyle( range )
|
357
|
-
{
|
358
|
-
var document = range.document;
|
359
|
-
|
360
|
-
if ( range.collapsed )
|
361
|
-
{
|
362
|
-
// Create the element to be inserted in the DOM.
|
363
|
-
var collapsedElement = getElement( this, document );
|
364
|
-
|
365
|
-
// Insert the empty element into the DOM at the range position.
|
366
|
-
range.insertNode( collapsedElement );
|
367
|
-
|
368
|
-
// Place the selection right inside the empty element.
|
369
|
-
range.moveToPosition( collapsedElement, CKEDITOR.POSITION_BEFORE_END );
|
370
|
-
|
371
|
-
return;
|
372
|
-
}
|
373
|
-
|
374
|
-
var elementName = this.element;
|
375
|
-
var def = this._.definition;
|
376
|
-
var isUnknownElement;
|
377
|
-
|
378
|
-
// Get the DTD definition for the element. Defaults to "span".
|
379
|
-
var dtd = CKEDITOR.dtd[ elementName ] || ( isUnknownElement = true, CKEDITOR.dtd.span );
|
380
|
-
|
381
|
-
// Expand the range.
|
382
|
-
range.enlarge( CKEDITOR.ENLARGE_ELEMENT );
|
383
|
-
range.trim();
|
384
|
-
|
385
|
-
// Get the first node to be processed and the last, which concludes the
|
386
|
-
// processing.
|
387
|
-
var boundaryNodes = range.createBookmark(),
|
388
|
-
firstNode = boundaryNodes.startNode,
|
389
|
-
lastNode = boundaryNodes.endNode;
|
390
|
-
|
391
|
-
var currentNode = firstNode;
|
392
|
-
|
393
|
-
var styleRange;
|
394
|
-
|
395
|
-
while ( currentNode )
|
396
|
-
{
|
397
|
-
var applyStyle = false;
|
398
|
-
|
399
|
-
if ( currentNode.equals( lastNode ) )
|
400
|
-
{
|
401
|
-
currentNode = null;
|
402
|
-
applyStyle = true;
|
403
|
-
}
|
404
|
-
else
|
405
|
-
{
|
406
|
-
var nodeType = currentNode.type;
|
407
|
-
var nodeName = nodeType == CKEDITOR.NODE_ELEMENT ? currentNode.getName() : null;
|
408
|
-
|
409
|
-
if ( nodeName && currentNode.getAttribute( '_cke_bookmark' ) )
|
410
|
-
{
|
411
|
-
currentNode = currentNode.getNextSourceNode( true );
|
412
|
-
continue;
|
413
|
-
}
|
414
|
-
|
415
|
-
// Check if the current node can be a child of the style element.
|
416
|
-
if ( !nodeName || ( dtd[ nodeName ]
|
417
|
-
&& ( currentNode.getPosition( lastNode ) | CKEDITOR.POSITION_PRECEDING | CKEDITOR.POSITION_IDENTICAL | CKEDITOR.POSITION_IS_CONTAINED ) == ( CKEDITOR.POSITION_PRECEDING + CKEDITOR.POSITION_IDENTICAL + CKEDITOR.POSITION_IS_CONTAINED )
|
418
|
-
&& ( !def.childRule || def.childRule( currentNode ) ) ) )
|
419
|
-
{
|
420
|
-
var currentParent = currentNode.getParent();
|
421
|
-
|
422
|
-
// Check if the style element can be a child of the current
|
423
|
-
// node parent or if the element is not defined in the DTD.
|
424
|
-
if ( currentParent
|
425
|
-
&& ( ( currentParent.getDtd() || CKEDITOR.dtd.span )[ elementName ] || isUnknownElement )
|
426
|
-
&& ( !def.parentRule || def.parentRule( currentParent ) ) )
|
427
|
-
{
|
428
|
-
// This node will be part of our range, so if it has not
|
429
|
-
// been started, place its start right before the node.
|
430
|
-
// In the case of an element node, it will be included
|
431
|
-
// only if it is entirely inside the range.
|
432
|
-
if ( !styleRange && ( !nodeName || !CKEDITOR.dtd.$removeEmpty[ nodeName ] || ( currentNode.getPosition( lastNode ) | CKEDITOR.POSITION_PRECEDING | CKEDITOR.POSITION_IDENTICAL | CKEDITOR.POSITION_IS_CONTAINED ) == ( CKEDITOR.POSITION_PRECEDING + CKEDITOR.POSITION_IDENTICAL + CKEDITOR.POSITION_IS_CONTAINED ) ) )
|
433
|
-
{
|
434
|
-
styleRange = new CKEDITOR.dom.range( document );
|
435
|
-
styleRange.setStartBefore( currentNode );
|
436
|
-
}
|
437
|
-
|
438
|
-
// Non element nodes, or empty elements can be added
|
439
|
-
// completely to the range.
|
440
|
-
if ( nodeType == CKEDITOR.NODE_TEXT || ( nodeType == CKEDITOR.NODE_ELEMENT && !currentNode.getChildCount() ) )
|
441
|
-
{
|
442
|
-
var includedNode = currentNode;
|
443
|
-
var parentNode;
|
444
|
-
|
445
|
-
// This node is about to be included completelly, but,
|
446
|
-
// if this is the last node in its parent, we must also
|
447
|
-
// check if the parent itself can be added completelly
|
448
|
-
// to the range.
|
449
|
-
while ( !includedNode.$.nextSibling
|
450
|
-
&& ( parentNode = includedNode.getParent(), dtd[ parentNode.getName() ] )
|
451
|
-
&& ( parentNode.getPosition( firstNode ) | CKEDITOR.POSITION_FOLLOWING | CKEDITOR.POSITION_IDENTICAL | CKEDITOR.POSITION_IS_CONTAINED ) == ( CKEDITOR.POSITION_FOLLOWING + CKEDITOR.POSITION_IDENTICAL + CKEDITOR.POSITION_IS_CONTAINED )
|
452
|
-
&& ( !def.childRule || def.childRule( parentNode ) ) )
|
453
|
-
{
|
454
|
-
includedNode = parentNode;
|
455
|
-
}
|
456
|
-
|
457
|
-
styleRange.setEndAfter( includedNode );
|
458
|
-
|
459
|
-
// If the included node still is the last node in its
|
460
|
-
// parent, it means that the parent can't be included
|
461
|
-
// in this style DTD, so apply the style immediately.
|
462
|
-
if ( !includedNode.$.nextSibling )
|
463
|
-
applyStyle = true;
|
464
|
-
|
465
|
-
}
|
466
|
-
}
|
467
|
-
else
|
468
|
-
applyStyle = true;
|
469
|
-
}
|
470
|
-
else
|
471
|
-
applyStyle = true;
|
472
|
-
|
473
|
-
// Get the next node to be processed.
|
474
|
-
currentNode = currentNode.getNextSourceNode();
|
475
|
-
}
|
476
|
-
|
477
|
-
// Apply the style if we have something to which apply it.
|
478
|
-
if ( applyStyle && styleRange && !styleRange.collapsed )
|
479
|
-
{
|
480
|
-
// Build the style element, based on the style object definition.
|
481
|
-
var styleNode = getElement( this, document );
|
482
|
-
|
483
|
-
// Get the element that holds the entire range.
|
484
|
-
var parent = styleRange.getCommonAncestor();
|
485
|
-
|
486
|
-
// Loop through the parents, removing the redundant attributes
|
487
|
-
// from the element to be applied.
|
488
|
-
while ( styleNode && parent )
|
489
|
-
{
|
490
|
-
if ( parent.getName() == elementName )
|
491
|
-
{
|
492
|
-
for ( var attName in def.attributes )
|
493
|
-
{
|
494
|
-
if ( styleNode.getAttribute( attName ) == parent.getAttribute( attName ) )
|
495
|
-
styleNode.removeAttribute( attName );
|
496
|
-
}
|
497
|
-
|
498
|
-
for ( var styleName in def.styles )
|
499
|
-
{
|
500
|
-
if ( styleNode.getStyle( styleName ) == parent.getStyle( styleName ) )
|
501
|
-
styleNode.removeStyle( styleName );
|
502
|
-
}
|
503
|
-
|
504
|
-
if ( !styleNode.hasAttributes() )
|
505
|
-
{
|
506
|
-
styleNode = null;
|
507
|
-
break;
|
508
|
-
}
|
509
|
-
}
|
510
|
-
|
511
|
-
parent = parent.getParent();
|
512
|
-
}
|
513
|
-
|
514
|
-
if ( styleNode )
|
515
|
-
{
|
516
|
-
// Move the contents of the range to the style element.
|
517
|
-
styleRange.extractContents().appendTo( styleNode );
|
518
|
-
|
519
|
-
// Here we do some cleanup, removing all duplicated
|
520
|
-
// elements from the style element.
|
521
|
-
removeFromInsideElement( this, styleNode );
|
522
|
-
|
523
|
-
// Insert it into the range position (it is collapsed after
|
524
|
-
// extractContents.
|
525
|
-
styleRange.insertNode( styleNode );
|
526
|
-
|
527
|
-
// Let's merge our new style with its neighbors, if possible.
|
528
|
-
styleNode.mergeSiblings();
|
529
|
-
|
530
|
-
// As the style system breaks text nodes constantly, let's normalize
|
531
|
-
// things for performance.
|
532
|
-
// With IE, some paragraphs get broken when calling normalize()
|
533
|
-
// repeatedly. Also, for IE, we must normalize body, not documentElement.
|
534
|
-
// IE is also known for having a "crash effect" with normalize().
|
535
|
-
// We should try to normalize with IE too in some way, somewhere.
|
536
|
-
if ( !CKEDITOR.env.ie )
|
537
|
-
styleNode.$.normalize();
|
538
|
-
}
|
539
|
-
|
540
|
-
// Style applied, let's release the range, so it gets
|
541
|
-
// re-initialization in the next loop.
|
542
|
-
styleRange = null;
|
543
|
-
}
|
544
|
-
}
|
545
|
-
|
546
|
-
// Remove the bookmark nodes.
|
547
|
-
range.moveToBookmark( boundaryNodes );
|
548
|
-
|
549
|
-
// Minimize the result range to exclude empty text nodes. (#5374)
|
550
|
-
range.shrink( CKEDITOR.SHRINK_TEXT );
|
551
|
-
}
|
552
|
-
|
553
|
-
function removeInlineStyle( range )
|
554
|
-
{
|
555
|
-
/*
|
556
|
-
* Make sure our range has included all "collpased" parent inline nodes so
|
557
|
-
* that our operation logic can be simpler.
|
558
|
-
*/
|
559
|
-
range.enlarge( CKEDITOR.ENLARGE_ELEMENT );
|
560
|
-
|
561
|
-
var bookmark = range.createBookmark(),
|
562
|
-
startNode = bookmark.startNode;
|
563
|
-
|
564
|
-
if ( range.collapsed )
|
565
|
-
{
|
566
|
-
|
567
|
-
var startPath = new CKEDITOR.dom.elementPath( startNode.getParent() ),
|
568
|
-
// The topmost element in elementspatch which we should jump out of.
|
569
|
-
boundaryElement;
|
570
|
-
|
571
|
-
|
572
|
-
for ( var i = 0, element ; i < startPath.elements.length
|
573
|
-
&& ( element = startPath.elements[i] ) ; i++ )
|
574
|
-
{
|
575
|
-
/*
|
576
|
-
* 1. If it's collaped inside text nodes, try to remove the style from the whole element.
|
577
|
-
*
|
578
|
-
* 2. Otherwise if it's collapsed on element boundaries, moving the selection
|
579
|
-
* outside the styles instead of removing the whole tag,
|
580
|
-
* also make sure other inner styles were well preserverd.(#3309)
|
581
|
-
*/
|
582
|
-
if ( element == startPath.block || element == startPath.blockLimit )
|
583
|
-
break;
|
584
|
-
|
585
|
-
if ( this.checkElementRemovable( element ) )
|
586
|
-
{
|
587
|
-
var isStart;
|
588
|
-
|
589
|
-
if ( range.collapsed && (
|
590
|
-
range.checkBoundaryOfElement( element, CKEDITOR.END ) ||
|
591
|
-
( isStart = range.checkBoundaryOfElement( element, CKEDITOR.START ) ) ) )
|
592
|
-
{
|
593
|
-
boundaryElement = element;
|
594
|
-
boundaryElement.match = isStart ? 'start' : 'end';
|
595
|
-
}
|
596
|
-
else
|
597
|
-
{
|
598
|
-
/*
|
599
|
-
* Before removing the style node, there may be a sibling to the style node
|
600
|
-
* that's exactly the same to the one to be removed. To the user, it makes
|
601
|
-
* no difference that they're separate entities in the DOM tree. So, merge
|
602
|
-
* them before removal.
|
603
|
-
*/
|
604
|
-
element.mergeSiblings();
|
605
|
-
removeFromElement( this, element );
|
606
|
-
|
607
|
-
}
|
608
|
-
}
|
609
|
-
}
|
610
|
-
|
611
|
-
// Re-create the style tree after/before the boundary element,
|
612
|
-
// the replication start from bookmark start node to define the
|
613
|
-
// new range.
|
614
|
-
if ( boundaryElement )
|
615
|
-
{
|
616
|
-
var clonedElement = startNode;
|
617
|
-
for ( i = 0 ;; i++ )
|
618
|
-
{
|
619
|
-
var newElement = startPath.elements[ i ];
|
620
|
-
if ( newElement.equals( boundaryElement ) )
|
621
|
-
break;
|
622
|
-
// Avoid copying any matched element.
|
623
|
-
else if ( newElement.match )
|
624
|
-
continue;
|
625
|
-
else
|
626
|
-
newElement = newElement.clone();
|
627
|
-
newElement.append( clonedElement );
|
628
|
-
clonedElement = newElement;
|
629
|
-
}
|
630
|
-
clonedElement[ boundaryElement.match == 'start' ?
|
631
|
-
'insertBefore' : 'insertAfter' ]( boundaryElement );
|
632
|
-
}
|
633
|
-
}
|
634
|
-
else
|
635
|
-
{
|
636
|
-
/*
|
637
|
-
* Now our range isn't collapsed. Lets walk from the start node to the end
|
638
|
-
* node via DFS and remove the styles one-by-one.
|
639
|
-
*/
|
640
|
-
var endNode = bookmark.endNode,
|
641
|
-
me = this;
|
642
|
-
|
643
|
-
/*
|
644
|
-
* Find out the style ancestor that needs to be broken down at startNode
|
645
|
-
* and endNode.
|
646
|
-
*/
|
647
|
-
function breakNodes()
|
648
|
-
{
|
649
|
-
var startPath = new CKEDITOR.dom.elementPath( startNode.getParent() ),
|
650
|
-
endPath = new CKEDITOR.dom.elementPath( endNode.getParent() ),
|
651
|
-
breakStart = null,
|
652
|
-
breakEnd = null;
|
653
|
-
for ( var i = 0 ; i < startPath.elements.length ; i++ )
|
654
|
-
{
|
655
|
-
var element = startPath.elements[ i ];
|
656
|
-
|
657
|
-
if ( element == startPath.block || element == startPath.blockLimit )
|
658
|
-
break;
|
659
|
-
|
660
|
-
if ( me.checkElementRemovable( element ) )
|
661
|
-
breakStart = element;
|
662
|
-
}
|
663
|
-
for ( i = 0 ; i < endPath.elements.length ; i++ )
|
664
|
-
{
|
665
|
-
element = endPath.elements[ i ];
|
666
|
-
|
667
|
-
if ( element == endPath.block || element == endPath.blockLimit )
|
668
|
-
break;
|
669
|
-
|
670
|
-
if ( me.checkElementRemovable( element ) )
|
671
|
-
breakEnd = element;
|
672
|
-
}
|
673
|
-
|
674
|
-
if ( breakEnd )
|
675
|
-
endNode.breakParent( breakEnd );
|
676
|
-
if ( breakStart )
|
677
|
-
startNode.breakParent( breakStart );
|
678
|
-
}
|
679
|
-
breakNodes();
|
680
|
-
|
681
|
-
// Now, do the DFS walk.
|
682
|
-
var currentNode = startNode.getNext();
|
683
|
-
while ( !currentNode.equals( endNode ) )
|
684
|
-
{
|
685
|
-
/*
|
686
|
-
* Need to get the next node first because removeFromElement() can remove
|
687
|
-
* the current node from DOM tree.
|
688
|
-
*/
|
689
|
-
var nextNode = currentNode.getNextSourceNode();
|
690
|
-
if ( currentNode.type == CKEDITOR.NODE_ELEMENT && this.checkElementRemovable( currentNode ) )
|
691
|
-
{
|
692
|
-
// Remove style from element or overriding element.
|
693
|
-
if ( currentNode.getName() == this.element )
|
694
|
-
removeFromElement( this, currentNode );
|
695
|
-
else
|
696
|
-
removeOverrides( currentNode, getOverrides( this )[ currentNode.getName() ] );
|
697
|
-
|
698
|
-
/*
|
699
|
-
* removeFromElement() may have merged the next node with something before
|
700
|
-
* the startNode via mergeSiblings(). In that case, the nextNode would
|
701
|
-
* contain startNode and we'll have to call breakNodes() again and also
|
702
|
-
* reassign the nextNode to something after startNode.
|
703
|
-
*/
|
704
|
-
if ( nextNode.type == CKEDITOR.NODE_ELEMENT && nextNode.contains( startNode ) )
|
705
|
-
{
|
706
|
-
breakNodes();
|
707
|
-
nextNode = startNode.getNext();
|
708
|
-
}
|
709
|
-
}
|
710
|
-
currentNode = nextNode;
|
711
|
-
}
|
712
|
-
}
|
713
|
-
|
714
|
-
range.moveToBookmark( bookmark );
|
715
|
-
}
|
716
|
-
|
717
|
-
function applyObjectStyle( range )
|
718
|
-
{
|
719
|
-
var root = range.getCommonAncestor( true, true ),
|
720
|
-
element = root.getAscendant( this.element, true );
|
721
|
-
element && setupElement( element, this );
|
722
|
-
}
|
723
|
-
|
724
|
-
function removeObjectStyle( range )
|
725
|
-
{
|
726
|
-
var root = range.getCommonAncestor( true, true ),
|
727
|
-
element = root.getAscendant( this.element, true );
|
728
|
-
|
729
|
-
if ( !element )
|
730
|
-
return;
|
731
|
-
|
732
|
-
var style = this;
|
733
|
-
var def = style._.definition;
|
734
|
-
var attributes = def.attributes;
|
735
|
-
var styles = CKEDITOR.style.getStyleText( def );
|
736
|
-
|
737
|
-
// Remove all defined attributes.
|
738
|
-
if ( attributes )
|
739
|
-
{
|
740
|
-
for ( var att in attributes )
|
741
|
-
{
|
742
|
-
element.removeAttribute( att, attributes[ att ] );
|
743
|
-
}
|
744
|
-
}
|
745
|
-
|
746
|
-
// Assign all defined styles.
|
747
|
-
if ( def.styles )
|
748
|
-
{
|
749
|
-
for ( var i in def.styles )
|
750
|
-
{
|
751
|
-
if ( !def.styles.hasOwnProperty( i ) )
|
752
|
-
continue;
|
753
|
-
|
754
|
-
element.removeStyle( i );
|
755
|
-
}
|
756
|
-
}
|
757
|
-
}
|
758
|
-
|
759
|
-
function applyBlockStyle( range )
|
760
|
-
{
|
761
|
-
// Serializible bookmarks is needed here since
|
762
|
-
// elements may be merged.
|
763
|
-
var bookmark = range.createBookmark( true );
|
764
|
-
|
765
|
-
var iterator = range.createIterator();
|
766
|
-
iterator.enforceRealBlocks = true;
|
767
|
-
|
768
|
-
// make recognize <br /> tag as a separator in ENTER_BR mode (#5121)
|
769
|
-
if ( this._.enterMode )
|
770
|
-
iterator.enlargeBr = ( this._.enterMode != CKEDITOR.ENTER_BR );
|
771
|
-
|
772
|
-
var block;
|
773
|
-
var doc = range.document;
|
774
|
-
var previousPreBlock;
|
775
|
-
|
776
|
-
while ( ( block = iterator.getNextParagraph() ) ) // Only one =
|
777
|
-
{
|
778
|
-
var newBlock = getElement( this, doc );
|
779
|
-
replaceBlock( block, newBlock );
|
780
|
-
}
|
781
|
-
|
782
|
-
range.moveToBookmark( bookmark );
|
783
|
-
}
|
784
|
-
|
785
|
-
// Replace the original block with new one, with special treatment
|
786
|
-
// for <pre> blocks to make sure content format is well preserved, and merging/splitting adjacent
|
787
|
-
// when necessary.(#3188)
|
788
|
-
function replaceBlock( block, newBlock )
|
789
|
-
{
|
790
|
-
var newBlockIsPre = newBlock.is( 'pre' );
|
791
|
-
var blockIsPre = block.is( 'pre' );
|
792
|
-
|
793
|
-
var isToPre = newBlockIsPre && !blockIsPre;
|
794
|
-
var isFromPre = !newBlockIsPre && blockIsPre;
|
795
|
-
|
796
|
-
if ( isToPre )
|
797
|
-
newBlock = toPre( block, newBlock );
|
798
|
-
else if ( isFromPre )
|
799
|
-
// Split big <pre> into pieces before start to convert.
|
800
|
-
newBlock = fromPres( splitIntoPres( block ), newBlock );
|
801
|
-
else
|
802
|
-
block.moveChildren( newBlock );
|
803
|
-
|
804
|
-
newBlock.replace( block );
|
805
|
-
|
806
|
-
if ( newBlockIsPre )
|
807
|
-
{
|
808
|
-
// Merge previous <pre> blocks.
|
809
|
-
mergePre( newBlock );
|
810
|
-
}
|
811
|
-
}
|
812
|
-
|
813
|
-
var nonWhitespaces = CKEDITOR.dom.walker.whitespaces( true );
|
814
|
-
/**
|
815
|
-
* Merge a <pre> block with a previous sibling if available.
|
816
|
-
*/
|
817
|
-
function mergePre( preBlock )
|
818
|
-
{
|
819
|
-
var previousBlock;
|
820
|
-
if ( !( ( previousBlock = preBlock.getPrevious( nonWhitespaces ) )
|
821
|
-
&& previousBlock.is
|
822
|
-
&& previousBlock.is( 'pre') ) )
|
823
|
-
return;
|
824
|
-
|
825
|
-
// Merge the previous <pre> block contents into the current <pre>
|
826
|
-
// block.
|
827
|
-
//
|
828
|
-
// Another thing to be careful here is that currentBlock might contain
|
829
|
-
// a '\n' at the beginning, and previousBlock might contain a '\n'
|
830
|
-
// towards the end. These new lines are not normally displayed but they
|
831
|
-
// become visible after merging.
|
832
|
-
var mergedHtml = replace( previousBlock.getHtml(), /\n$/, '' ) + '\n\n' +
|
833
|
-
replace( preBlock.getHtml(), /^\n/, '' ) ;
|
834
|
-
|
835
|
-
// Krugle: IE normalizes innerHTML from <pre>, breaking whitespaces.
|
836
|
-
if ( CKEDITOR.env.ie )
|
837
|
-
preBlock.$.outerHTML = '<pre>' + mergedHtml + '</pre>';
|
838
|
-
else
|
839
|
-
preBlock.setHtml( mergedHtml );
|
840
|
-
|
841
|
-
previousBlock.remove();
|
842
|
-
}
|
843
|
-
|
844
|
-
/**
|
845
|
-
* Split into multiple <pre> blocks separated by double line-break.
|
846
|
-
* @param preBlock
|
847
|
-
*/
|
848
|
-
function splitIntoPres( preBlock )
|
849
|
-
{
|
850
|
-
// Exclude the ones at header OR at tail,
|
851
|
-
// and ignore bookmark content between them.
|
852
|
-
var duoBrRegex = /(\S\s*)\n(?:\s|(<span[^>]+_cke_bookmark.*?\/span>))*\n(?!$)/gi,
|
853
|
-
blockName = preBlock.getName(),
|
854
|
-
splitedHtml = replace( preBlock.getOuterHtml(),
|
855
|
-
duoBrRegex,
|
856
|
-
function( match, charBefore, bookmark )
|
857
|
-
{
|
858
|
-
return charBefore + '</pre>' + bookmark + '<pre>';
|
859
|
-
} );
|
860
|
-
|
861
|
-
var pres = [];
|
862
|
-
splitedHtml.replace( /<pre\b.*?>([\s\S]*?)<\/pre>/gi, function( match, preContent ){
|
863
|
-
pres.push( preContent );
|
864
|
-
} );
|
865
|
-
return pres;
|
866
|
-
}
|
867
|
-
|
868
|
-
// Wrapper function of String::replace without considering of head/tail bookmarks nodes.
|
869
|
-
function replace( str, regexp, replacement )
|
870
|
-
{
|
871
|
-
var headBookmark = '',
|
872
|
-
tailBookmark = '';
|
873
|
-
|
874
|
-
str = str.replace( /(^<span[^>]+_cke_bookmark.*?\/span>)|(<span[^>]+_cke_bookmark.*?\/span>$)/gi,
|
875
|
-
function( str, m1, m2 ){
|
876
|
-
m1 && ( headBookmark = m1 );
|
877
|
-
m2 && ( tailBookmark = m2 );
|
878
|
-
return '';
|
879
|
-
} );
|
880
|
-
return headBookmark + str.replace( regexp, replacement ) + tailBookmark;
|
881
|
-
}
|
882
|
-
/**
|
883
|
-
* Converting a list of <pre> into blocks with format well preserved.
|
884
|
-
*/
|
885
|
-
function fromPres( preHtmls, newBlock )
|
886
|
-
{
|
887
|
-
var docFrag = new CKEDITOR.dom.documentFragment( newBlock.getDocument() );
|
888
|
-
for ( var i = 0 ; i < preHtmls.length ; i++ )
|
889
|
-
{
|
890
|
-
var blockHtml = preHtmls[ i ];
|
891
|
-
|
892
|
-
// 1. Trim the first and last line-breaks immediately after and before <pre>,
|
893
|
-
// they're not visible.
|
894
|
-
blockHtml = blockHtml.replace( /(\r\n|\r)/g, '\n' ) ;
|
895
|
-
blockHtml = replace( blockHtml, /^[ \t]*\n/, '' ) ;
|
896
|
-
blockHtml = replace( blockHtml, /\n$/, '' ) ;
|
897
|
-
// 2. Convert spaces or tabs at the beginning or at the end to
|
898
|
-
blockHtml = replace( blockHtml, /^[ \t]+|[ \t]+$/g, function( match, offset, s )
|
899
|
-
{
|
900
|
-
if ( match.length == 1 ) // one space, preserve it
|
901
|
-
return ' ' ;
|
902
|
-
else if ( !offset ) // beginning of block
|
903
|
-
return CKEDITOR.tools.repeat( ' ', match.length - 1 ) + ' ';
|
904
|
-
else // end of block
|
905
|
-
return ' ' + CKEDITOR.tools.repeat( ' ', match.length - 1 );
|
906
|
-
} ) ;
|
907
|
-
|
908
|
-
// 3. Convert \n to <BR>.
|
909
|
-
// 4. Convert contiguous (i.e. non-singular) spaces or tabs to
|
910
|
-
blockHtml = blockHtml.replace( /\n/g, '<br>' ) ;
|
911
|
-
blockHtml = blockHtml.replace( /[ \t]{2,}/g,
|
912
|
-
function ( match )
|
913
|
-
{
|
914
|
-
return CKEDITOR.tools.repeat( ' ', match.length - 1 ) + ' ' ;
|
915
|
-
} ) ;
|
916
|
-
|
917
|
-
var newBlockClone = newBlock.clone();
|
918
|
-
newBlockClone.setHtml( blockHtml );
|
919
|
-
docFrag.append( newBlockClone );
|
920
|
-
}
|
921
|
-
return docFrag;
|
922
|
-
}
|
923
|
-
|
924
|
-
/**
|
925
|
-
* Converting from a non-PRE block to a PRE block in formatting operations.
|
926
|
-
*/
|
927
|
-
function toPre( block, newBlock )
|
928
|
-
{
|
929
|
-
// First trim the block content.
|
930
|
-
var preHtml = block.getHtml();
|
931
|
-
|
932
|
-
// 1. Trim head/tail spaces, they're not visible.
|
933
|
-
preHtml = replace( preHtml, /(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g, '' );
|
934
|
-
// 2. Delete ANSI whitespaces immediately before and after <BR> because
|
935
|
-
// they are not visible.
|
936
|
-
preHtml = preHtml.replace( /[ \t\r\n]*(<br[^>]*>)[ \t\r\n]*/gi, '$1' );
|
937
|
-
// 3. Compress other ANSI whitespaces since they're only visible as one
|
938
|
-
// single space previously.
|
939
|
-
// 4. Convert to spaces since is no longer needed in <PRE>.
|
940
|
-
preHtml = preHtml.replace( /([ \t\n\r]+| )/g, ' ' );
|
941
|
-
// 5. Convert any <BR /> to \n. This must not be done earlier because
|
942
|
-
// the \n would then get compressed.
|
943
|
-
preHtml = preHtml.replace( /<br\b[^>]*>/gi, '\n' );
|
944
|
-
|
945
|
-
// Krugle: IE normalizes innerHTML to <pre>, breaking whitespaces.
|
946
|
-
if ( CKEDITOR.env.ie )
|
947
|
-
{
|
948
|
-
var temp = block.getDocument().createElement( 'div' );
|
949
|
-
temp.append( newBlock );
|
950
|
-
newBlock.$.outerHTML = '<pre>' + preHtml + '</pre>';
|
951
|
-
newBlock = temp.getFirst().remove();
|
952
|
-
}
|
953
|
-
else
|
954
|
-
newBlock.setHtml( preHtml );
|
955
|
-
|
956
|
-
return newBlock;
|
957
|
-
}
|
958
|
-
|
959
|
-
// Removes a style from an element itself, don't care about its subtree.
|
960
|
-
function removeFromElement( style, element )
|
961
|
-
{
|
962
|
-
var def = style._.definition,
|
963
|
-
attributes = CKEDITOR.tools.extend( {}, def.attributes, getOverrides( style )[ element.getName() ] ),
|
964
|
-
styles = def.styles,
|
965
|
-
// If the style is only about the element itself, we have to remove the element.
|
966
|
-
removeEmpty = CKEDITOR.tools.isEmpty( attributes ) && CKEDITOR.tools.isEmpty( styles );
|
967
|
-
|
968
|
-
// Remove definition attributes/style from the elemnt.
|
969
|
-
for ( var attName in attributes )
|
970
|
-
{
|
971
|
-
// The 'class' element value must match (#1318).
|
972
|
-
if ( ( attName == 'class' || style._.definition.fullMatch )
|
973
|
-
&& element.getAttribute( attName ) != normalizeProperty( attName, attributes[ attName ] ) )
|
974
|
-
continue;
|
975
|
-
removeEmpty = element.hasAttribute( attName );
|
976
|
-
element.removeAttribute( attName );
|
977
|
-
}
|
978
|
-
|
979
|
-
for ( var styleName in styles )
|
980
|
-
{
|
981
|
-
// Full match style insist on having fully equivalence. (#5018)
|
982
|
-
if ( style._.definition.fullMatch
|
983
|
-
&& element.getStyle( styleName ) != normalizeProperty( styleName, styles[ styleName ], true ) )
|
984
|
-
continue;
|
985
|
-
|
986
|
-
removeEmpty = removeEmpty || !!element.getStyle( styleName );
|
987
|
-
element.removeStyle( styleName );
|
988
|
-
}
|
989
|
-
|
990
|
-
removeEmpty && removeNoAttribsElement( element );
|
991
|
-
}
|
992
|
-
|
993
|
-
// Removes a style from inside an element.
|
994
|
-
function removeFromInsideElement( style, element )
|
995
|
-
{
|
996
|
-
var def = style._.definition,
|
997
|
-
attribs = def.attributes,
|
998
|
-
styles = def.styles,
|
999
|
-
overrides = getOverrides( style );
|
1000
|
-
|
1001
|
-
var innerElements = element.getElementsByTag( style.element );
|
1002
|
-
|
1003
|
-
for ( var i = innerElements.count(); --i >= 0 ; )
|
1004
|
-
removeFromElement( style, innerElements.getItem( i ) );
|
1005
|
-
|
1006
|
-
// Now remove any other element with different name that is
|
1007
|
-
// defined to be overriden.
|
1008
|
-
for ( var overrideElement in overrides )
|
1009
|
-
{
|
1010
|
-
if ( overrideElement != style.element )
|
1011
|
-
{
|
1012
|
-
innerElements = element.getElementsByTag( overrideElement ) ;
|
1013
|
-
for ( i = innerElements.count() - 1 ; i >= 0 ; i-- )
|
1014
|
-
{
|
1015
|
-
var innerElement = innerElements.getItem( i );
|
1016
|
-
removeOverrides( innerElement, overrides[ overrideElement ] ) ;
|
1017
|
-
}
|
1018
|
-
}
|
1019
|
-
}
|
1020
|
-
|
1021
|
-
}
|
1022
|
-
|
1023
|
-
/**
|
1024
|
-
* Remove overriding styles/attributes from the specific element.
|
1025
|
-
* Note: Remove the element if no attributes remain.
|
1026
|
-
* @param {Object} element
|
1027
|
-
* @param {Object} overrides
|
1028
|
-
*/
|
1029
|
-
function removeOverrides( element, overrides )
|
1030
|
-
{
|
1031
|
-
var attributes = overrides && overrides.attributes ;
|
1032
|
-
|
1033
|
-
if ( attributes )
|
1034
|
-
{
|
1035
|
-
for ( var i = 0 ; i < attributes.length ; i++ )
|
1036
|
-
{
|
1037
|
-
var attName = attributes[i][0], actualAttrValue ;
|
1038
|
-
|
1039
|
-
if ( ( actualAttrValue = element.getAttribute( attName ) ) )
|
1040
|
-
{
|
1041
|
-
var attValue = attributes[i][1] ;
|
1042
|
-
|
1043
|
-
// Remove the attribute if:
|
1044
|
-
// - The override definition value is null ;
|
1045
|
-
// - The override definition valie is a string that
|
1046
|
-
// matches the attribute value exactly.
|
1047
|
-
// - The override definition value is a regex that
|
1048
|
-
// has matches in the attribute value.
|
1049
|
-
if ( attValue === null ||
|
1050
|
-
( attValue.test && attValue.test( actualAttrValue ) ) ||
|
1051
|
-
( typeof attValue == 'string' && actualAttrValue == attValue ) )
|
1052
|
-
element.removeAttribute( attName ) ;
|
1053
|
-
}
|
1054
|
-
}
|
1055
|
-
}
|
1056
|
-
|
1057
|
-
removeNoAttribsElement( element );
|
1058
|
-
}
|
1059
|
-
|
1060
|
-
// If the element has no more attributes, remove it.
|
1061
|
-
function removeNoAttribsElement( element )
|
1062
|
-
{
|
1063
|
-
// If no more attributes remained in the element, remove it,
|
1064
|
-
// leaving its children.
|
1065
|
-
if ( !element.hasAttributes() )
|
1066
|
-
{
|
1067
|
-
// Removing elements may open points where merging is possible,
|
1068
|
-
// so let's cache the first and last nodes for later checking.
|
1069
|
-
var firstChild = element.getFirst();
|
1070
|
-
var lastChild = element.getLast();
|
1071
|
-
|
1072
|
-
element.remove( true );
|
1073
|
-
|
1074
|
-
if ( firstChild )
|
1075
|
-
{
|
1076
|
-
// Check the cached nodes for merging.
|
1077
|
-
firstChild.type == CKEDITOR.NODE_ELEMENT && firstChild.mergeSiblings();
|
1078
|
-
|
1079
|
-
if ( lastChild && !firstChild.equals( lastChild )
|
1080
|
-
&& lastChild.type == CKEDITOR.NODE_ELEMENT )
|
1081
|
-
lastChild.mergeSiblings();
|
1082
|
-
}
|
1083
|
-
}
|
1084
|
-
}
|
1085
|
-
|
1086
|
-
function getElement( style, targetDocument )
|
1087
|
-
{
|
1088
|
-
var el;
|
1089
|
-
|
1090
|
-
var def = style._.definition;
|
1091
|
-
|
1092
|
-
var elementName = style.element;
|
1093
|
-
|
1094
|
-
// The "*" element name will always be a span for this function.
|
1095
|
-
if ( elementName == '*' )
|
1096
|
-
elementName = 'span';
|
1097
|
-
|
1098
|
-
// Create the element.
|
1099
|
-
el = new CKEDITOR.dom.element( elementName, targetDocument );
|
1100
|
-
|
1101
|
-
return setupElement( el, style );
|
1102
|
-
}
|
1103
|
-
|
1104
|
-
function setupElement( el, style )
|
1105
|
-
{
|
1106
|
-
var def = style._.definition;
|
1107
|
-
var attributes = def.attributes;
|
1108
|
-
var styles = CKEDITOR.style.getStyleText( def );
|
1109
|
-
|
1110
|
-
// Assign all defined attributes.
|
1111
|
-
if ( attributes )
|
1112
|
-
{
|
1113
|
-
for ( var att in attributes )
|
1114
|
-
{
|
1115
|
-
el.setAttribute( att, attributes[ att ] );
|
1116
|
-
}
|
1117
|
-
}
|
1118
|
-
|
1119
|
-
// Assign all defined styles.
|
1120
|
-
if ( def.styles )
|
1121
|
-
{
|
1122
|
-
for ( var i in def.styles )
|
1123
|
-
{
|
1124
|
-
if ( !def.styles.hasOwnProperty( i ) )
|
1125
|
-
continue;
|
1126
|
-
|
1127
|
-
el.setStyle( i, def.styles[ i ] );
|
1128
|
-
}
|
1129
|
-
}
|
1130
|
-
|
1131
|
-
return el;
|
1132
|
-
}
|
1133
|
-
|
1134
|
-
var varRegex = /#\((.+?)\)/g;
|
1135
|
-
function replaceVariables( list, variablesValues )
|
1136
|
-
{
|
1137
|
-
for ( var item in list )
|
1138
|
-
{
|
1139
|
-
list[ item ] = list[ item ].replace( varRegex, function( match, varName )
|
1140
|
-
{
|
1141
|
-
return variablesValues[ varName ];
|
1142
|
-
});
|
1143
|
-
}
|
1144
|
-
}
|
1145
|
-
|
1146
|
-
|
1147
|
-
// Returns an object that can be used for style matching comparison.
|
1148
|
-
// Attributes names and values are all lowercased, and the styles get
|
1149
|
-
// merged with the style attribute.
|
1150
|
-
function getAttributesForComparison( styleDefinition )
|
1151
|
-
{
|
1152
|
-
// If we have already computed it, just return it.
|
1153
|
-
var attribs = styleDefinition._AC;
|
1154
|
-
if ( attribs )
|
1155
|
-
return attribs;
|
1156
|
-
|
1157
|
-
attribs = {};
|
1158
|
-
|
1159
|
-
var length = 0;
|
1160
|
-
|
1161
|
-
// Loop through all defined attributes.
|
1162
|
-
var styleAttribs = styleDefinition.attributes;
|
1163
|
-
if ( styleAttribs )
|
1164
|
-
{
|
1165
|
-
for ( var styleAtt in styleAttribs )
|
1166
|
-
{
|
1167
|
-
length++;
|
1168
|
-
attribs[ styleAtt ] = styleAttribs[ styleAtt ];
|
1169
|
-
}
|
1170
|
-
}
|
1171
|
-
|
1172
|
-
// Includes the style definitions.
|
1173
|
-
var styleText = CKEDITOR.style.getStyleText( styleDefinition );
|
1174
|
-
if ( styleText )
|
1175
|
-
{
|
1176
|
-
if ( !attribs[ 'style' ] )
|
1177
|
-
length++;
|
1178
|
-
attribs[ 'style' ] = styleText;
|
1179
|
-
}
|
1180
|
-
|
1181
|
-
// Appends the "length" information to the object.
|
1182
|
-
attribs._length = length;
|
1183
|
-
|
1184
|
-
// Return it, saving it to the next request.
|
1185
|
-
return ( styleDefinition._AC = attribs );
|
1186
|
-
}
|
1187
|
-
|
1188
|
-
/**
|
1189
|
-
* Get the the collection used to compare the elements and attributes,
|
1190
|
-
* defined in this style overrides, with other element. All information in
|
1191
|
-
* it is lowercased.
|
1192
|
-
* @param {CKEDITOR.style} style
|
1193
|
-
*/
|
1194
|
-
function getOverrides( style )
|
1195
|
-
{
|
1196
|
-
if ( style._.overrides )
|
1197
|
-
return style._.overrides;
|
1198
|
-
|
1199
|
-
var overrides = ( style._.overrides = {} ),
|
1200
|
-
definition = style._.definition.overrides;
|
1201
|
-
|
1202
|
-
if ( definition )
|
1203
|
-
{
|
1204
|
-
// The override description can be a string, object or array.
|
1205
|
-
// Internally, well handle arrays only, so transform it if needed.
|
1206
|
-
if ( !CKEDITOR.tools.isArray( definition ) )
|
1207
|
-
definition = [ definition ];
|
1208
|
-
|
1209
|
-
// Loop through all override definitions.
|
1210
|
-
for ( var i = 0 ; i < definition.length ; i++ )
|
1211
|
-
{
|
1212
|
-
var override = definition[i];
|
1213
|
-
var elementName;
|
1214
|
-
var overrideEl;
|
1215
|
-
var attrs;
|
1216
|
-
|
1217
|
-
// If can be a string with the element name.
|
1218
|
-
if ( typeof override == 'string' )
|
1219
|
-
elementName = override.toLowerCase();
|
1220
|
-
// Or an object.
|
1221
|
-
else
|
1222
|
-
{
|
1223
|
-
elementName = override.element ? override.element.toLowerCase() : style.element;
|
1224
|
-
attrs = override.attributes;
|
1225
|
-
}
|
1226
|
-
|
1227
|
-
// We can have more than one override definition for the same
|
1228
|
-
// element name, so we attempt to simply append information to
|
1229
|
-
// it if it already exists.
|
1230
|
-
overrideEl = overrides[ elementName ] || ( overrides[ elementName ] = {} );
|
1231
|
-
|
1232
|
-
if ( attrs )
|
1233
|
-
{
|
1234
|
-
// The returning attributes list is an array, because we
|
1235
|
-
// could have different override definitions for the same
|
1236
|
-
// attribute name.
|
1237
|
-
var overrideAttrs = ( overrideEl.attributes = overrideEl.attributes || new Array() );
|
1238
|
-
for ( var attName in attrs )
|
1239
|
-
{
|
1240
|
-
// Each item in the attributes array is also an array,
|
1241
|
-
// where [0] is the attribute name and [1] is the
|
1242
|
-
// override value.
|
1243
|
-
overrideAttrs.push( [ attName.toLowerCase(), attrs[ attName ] ] );
|
1244
|
-
}
|
1245
|
-
}
|
1246
|
-
}
|
1247
|
-
}
|
1248
|
-
|
1249
|
-
return overrides;
|
1250
|
-
}
|
1251
|
-
|
1252
|
-
// Make the comparison of attribute value easier by standardizing it.
|
1253
|
-
function normalizeProperty( name, value, isStyle )
|
1254
|
-
{
|
1255
|
-
var temp = new CKEDITOR.dom.element( 'span' );
|
1256
|
-
temp [ isStyle ? 'setStyle' : 'setAttribute' ]( name, value );
|
1257
|
-
return temp[ isStyle ? 'getStyle' : 'getAttribute' ]( name );
|
1258
|
-
}
|
1259
|
-
|
1260
|
-
// Make the comparison of style text easier by standardizing it.
|
1261
|
-
function normalizeCssText( unparsedCssText, nativeNormalize )
|
1262
|
-
{
|
1263
|
-
var styleText;
|
1264
|
-
if ( nativeNormalize !== false )
|
1265
|
-
{
|
1266
|
-
// Injects the style in a temporary span object, so the browser parses it,
|
1267
|
-
// retrieving its final format.
|
1268
|
-
var temp = new CKEDITOR.dom.element( 'span' );
|
1269
|
-
temp.setAttribute( 'style', unparsedCssText );
|
1270
|
-
styleText = temp.getAttribute( 'style' ) || '';
|
1271
|
-
}
|
1272
|
-
else
|
1273
|
-
styleText = unparsedCssText;
|
1274
|
-
|
1275
|
-
// Shrinking white-spaces around colon and semi-colon (#4147).
|
1276
|
-
// Compensate tail semi-colon.
|
1277
|
-
return styleText.replace( /\s*([;:])\s*/, '$1' )
|
1278
|
-
.replace( /([^\s;])$/, '$1;')
|
1279
|
-
.replace( /,\s+/g, ',' ) // Trimming spaces after comma (e.g. font-family name)(#4107).
|
1280
|
-
.toLowerCase();
|
1281
|
-
}
|
1282
|
-
|
1283
|
-
// Turn inline style text properties into one hash.
|
1284
|
-
function parseStyleText( styleText )
|
1285
|
-
{
|
1286
|
-
var retval = {};
|
1287
|
-
styleText
|
1288
|
-
.replace( /"/g, '"' )
|
1289
|
-
.replace( /\s*([^ :;]+)\s*:\s*([^;]+)\s*(?=;|$)/g, function( match, name, value )
|
1290
|
-
{
|
1291
|
-
retval[ name ] = value;
|
1292
|
-
} );
|
1293
|
-
return retval;
|
1294
|
-
}
|
1295
|
-
|
1296
|
-
/**
|
1297
|
-
* Compare two bunch of styles, with the speciality that value 'inherit'
|
1298
|
-
* is treated as a wildcard which will match any value.
|
1299
|
-
* @param {Object|String} source
|
1300
|
-
* @param {Object|String} target
|
1301
|
-
*/
|
1302
|
-
function compareCssText( source, target )
|
1303
|
-
{
|
1304
|
-
typeof source == 'string' && ( source = parseStyleText( source ) );
|
1305
|
-
typeof target == 'string' && ( target = parseStyleText( target ) );
|
1306
|
-
for( var name in source )
|
1307
|
-
{
|
1308
|
-
if ( !( name in target &&
|
1309
|
-
( target[ name ] == source[ name ]
|
1310
|
-
|| source[ name ] == 'inherit'
|
1311
|
-
|| target[ name ] == 'inherit' ) ) )
|
1312
|
-
{
|
1313
|
-
return false;
|
1314
|
-
}
|
1315
|
-
}
|
1316
|
-
return true;
|
1317
|
-
}
|
1318
|
-
|
1319
|
-
function applyStyle( document, remove )
|
1320
|
-
{
|
1321
|
-
var selection = document.getSelection(),
|
1322
|
-
// Bookmark the range so we can re-select it after processing.
|
1323
|
-
bookmarks = selection.createBookmarks(),
|
1324
|
-
ranges = selection.getRanges( true ),
|
1325
|
-
func = remove ? this.removeFromRange : this.applyToRange,
|
1326
|
-
range;
|
1327
|
-
|
1328
|
-
var iterator = ranges.createIterator();
|
1329
|
-
while ( ( range = iterator.getNextRange() ) )
|
1330
|
-
func.call( this, range );
|
1331
|
-
|
1332
|
-
if ( bookmarks.length == 1 && bookmarks[0].collapsed )
|
1333
|
-
{
|
1334
|
-
selection.selectRanges( ranges );
|
1335
|
-
bookmarks[0].startNode.remove();
|
1336
|
-
}
|
1337
|
-
else
|
1338
|
-
selection.selectBookmarks( bookmarks );
|
1339
|
-
}
|
1340
|
-
})();
|
1341
|
-
|
1342
|
-
CKEDITOR.styleCommand = function( style )
|
1343
|
-
{
|
1344
|
-
this.style = style;
|
1345
|
-
};
|
1346
|
-
|
1347
|
-
CKEDITOR.styleCommand.prototype.exec = function( editor )
|
1348
|
-
{
|
1349
|
-
editor.focus();
|
1350
|
-
|
1351
|
-
var doc = editor.document;
|
1352
|
-
|
1353
|
-
if ( doc )
|
1354
|
-
{
|
1355
|
-
if ( this.state == CKEDITOR.TRISTATE_OFF )
|
1356
|
-
this.style.apply( doc );
|
1357
|
-
else if ( this.state == CKEDITOR.TRISTATE_ON )
|
1358
|
-
this.style.remove( doc );
|
1359
|
-
}
|
1360
|
-
|
1361
|
-
return !!doc;
|
1362
|
-
};
|
1363
|
-
|
1364
|
-
CKEDITOR.stylesSet = new CKEDITOR.resourceManager( '', 'stylesSet' );
|
1365
|
-
|
1366
|
-
// Backward compatibility (#5025).
|
1367
|
-
CKEDITOR.addStylesSet = CKEDITOR.tools.bind( CKEDITOR.stylesSet.add, CKEDITOR.stylesSet );
|
1368
|
-
CKEDITOR.loadStylesSet = function( name, url, callback )
|
1369
|
-
{
|
1370
|
-
CKEDITOR.stylesSet.addExternal( name, url, '' );
|
1371
|
-
CKEDITOR.stylesSet.load( name, callback );
|
1372
|
-
};
|
1373
|
-
|
1374
|
-
|
1375
|
-
/**
|
1376
|
-
* Gets the current styleSet for this instance
|
1377
|
-
* @param {Function} The function to be called with the styles data.
|
1378
|
-
* @example
|
1379
|
-
* editor.getStylesSet( function( stylesDefinitions ) {} );
|
1380
|
-
*/
|
1381
|
-
CKEDITOR.editor.prototype.getStylesSet = function( callback )
|
1382
|
-
{
|
1383
|
-
if ( !this._.stylesDefinitions )
|
1384
|
-
{
|
1385
|
-
var editor = this,
|
1386
|
-
// Respect the backwards compatible definition entry
|
1387
|
-
configStyleSet = editor.config.stylesCombo_stylesSet || editor.config.stylesSet || 'default';
|
1388
|
-
|
1389
|
-
// #5352 Allow to define the styles directly in the config object
|
1390
|
-
if ( configStyleSet instanceof Array )
|
1391
|
-
{
|
1392
|
-
editor._.stylesDefinitions = configStyleSet;
|
1393
|
-
callback( configStyleSet );
|
1394
|
-
return;
|
1395
|
-
}
|
1396
|
-
|
1397
|
-
var partsStylesSet = configStyleSet.split( ':' ),
|
1398
|
-
styleSetName = partsStylesSet[ 0 ],
|
1399
|
-
externalPath = partsStylesSet[ 1 ],
|
1400
|
-
pluginPath = CKEDITOR.plugins.registered.styles.path;
|
1401
|
-
|
1402
|
-
CKEDITOR.stylesSet.addExternal( styleSetName,
|
1403
|
-
externalPath ?
|
1404
|
-
partsStylesSet.slice( 1 ).join( ':' ) :
|
1405
|
-
pluginPath + 'styles/' + styleSetName + '.js', '' );
|
1406
|
-
|
1407
|
-
CKEDITOR.stylesSet.load( styleSetName, function( stylesSet )
|
1408
|
-
{
|
1409
|
-
editor._.stylesDefinitions = stylesSet[ styleSetName ];
|
1410
|
-
callback( editor._.stylesDefinitions );
|
1411
|
-
} ) ;
|
1412
|
-
}
|
1413
|
-
else
|
1414
|
-
callback( this._.stylesDefinitions );
|
1415
|
-
};
|
1416
|
-
|
1417
|
-
/**
|
1418
|
-
* The "styles definition set" to use in the editor. They will be used in the
|
1419
|
-
* styles combo and the Style selector of the div container. <br>
|
1420
|
-
* The styles may be defined in the page containing the editor, or can be
|
1421
|
-
* loaded on demand from an external file. In the second case, if this setting
|
1422
|
-
* contains only a name, the styles definition file will be loaded from the
|
1423
|
-
* "styles" folder inside the styles plugin folder.
|
1424
|
-
* Otherwise, this setting has the "name:url" syntax, making it
|
1425
|
-
* possible to set the URL from which loading the styles file.<br>
|
1426
|
-
* Previously this setting was available as config.stylesCombo_stylesSet<br>
|
1427
|
-
* @name CKEDITOR.config.stylesSet
|
1428
|
-
* @type String|Array
|
1429
|
-
* @default 'default'
|
1430
|
-
* @since 3.3
|
1431
|
-
* @example
|
1432
|
-
* // Load from the styles' styles folder (mystyles.js file).
|
1433
|
-
* config.stylesSet = 'mystyles';
|
1434
|
-
* @example
|
1435
|
-
* // Load from a relative URL.
|
1436
|
-
* config.stylesSet = 'mystyles:/editorstyles/styles.js';
|
1437
|
-
* @example
|
1438
|
-
* // Load from a full URL.
|
1439
|
-
* config.stylesSet = 'mystyles:http://www.example.com/editorstyles/styles.js';
|
1440
|
-
* @example
|
1441
|
-
* // Load from a list of definitions.
|
1442
|
-
* config.stylesSet = [
|
1443
|
-
* { name : 'Strong Emphasis', element : 'strong' },
|
1444
|
-
* { name : 'Emphasis', element : 'em' }, ... ];
|
1445
|
-
*/
|