promethee 1.4.8 → 1.4.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -6
- data/app/assets/javascripts/promethee.js +4 -0
- data/app/assets/stylesheets/promethee-edit.sass +1 -0
- data/config/initializers/assets.rb +1 -0
- data/lib/promethee/rails/version.rb +1 -1
- data/node_modules/angular-summernote/CHANGELOG.md +149 -0
- data/node_modules/angular-summernote/LICENSE-MIT +22 -0
- data/node_modules/angular-summernote/README.md +270 -0
- data/node_modules/angular-summernote/bower.json +49 -0
- data/{vendor/assets/javascripts → node_modules/angular-summernote/dist}/angular-summernote.js +0 -0
- data/node_modules/angular-summernote/dist/angular-summernote.min.js +2 -0
- data/node_modules/angular-summernote/examples/fontstyle-plugin.html +48 -0
- data/node_modules/angular-summernote/examples/index.html +180 -0
- data/node_modules/angular-summernote/examples/index2.html +60 -0
- data/node_modules/angular-summernote/examples/index3.html +57 -0
- data/node_modules/angular-summernote/gulpfile.js +115 -0
- data/node_modules/angular-summernote/package.json +53 -0
- data/node_modules/angular-summernote/src/angular-summernote.js +206 -0
- data/node_modules/angular-summernote/test/angular-summernote.test.js +660 -0
- data/node_modules/angular-summernote/test/chai.conf.js +6 -0
- data/node_modules/angular-summernote/test/coverage/Chrome 37.0.2062 (Mac OS X 10.9.4)/index.html +350 -0
- data/node_modules/angular-summernote/test/coverage/Chrome 37.0.2062 (Mac OS X 10.9.4)/prettify.css +1 -0
- data/node_modules/angular-summernote/test/coverage/Chrome 37.0.2062 (Mac OS X 10.9.4)/prettify.js +1 -0
- data/node_modules/angular-summernote/test/coverage/Chrome 37.0.2062 (Mac OS X 10.9.4)/src/angular-summernote.js.html +694 -0
- data/node_modules/angular-summernote/test/coverage/Chrome 37.0.2062 (Mac OS X 10.9.4)/src/index.html +350 -0
- data/node_modules/angular-summernote/test/karma-angular-1-2-x.conf.js +33 -0
- data/node_modules/angular-summernote/test/karma-angular-1-3-x.conf.js +33 -0
- data/node_modules/angular-summernote/test/karma-angular-1-4-x.conf.js +33 -0
- data/node_modules/angular-summernote/test/karma-shared.conf.js +64 -0
- data/node_modules/angular-summernote/test/karma.conf.js +33 -0
- data/{vendor/assets/javascripts/summernote/locales/de-DE.js → node_modules/angular-summernote/test/lang/summernote-de-DE.js} +2 -17
- data/node_modules/angular-summernote/test/mocha.conf.js +3 -0
- data/node_modules/angular-ui-sortable/API.md +84 -0
- data/node_modules/angular-ui-sortable/CONTRIBUTING.md +12 -0
- data/node_modules/angular-ui-sortable/LICENSE +21 -0
- data/node_modules/angular-ui-sortable/README.md +350 -0
- data/node_modules/angular-ui-sortable/bower.json +26 -0
- data/node_modules/angular-ui-sortable/demo/demo.css +34 -0
- data/node_modules/angular-ui-sortable/demo/demo.html +29 -0
- data/node_modules/angular-ui-sortable/demo/demo.js +41 -0
- data/node_modules/angular-ui-sortable/dist/sortable.js +593 -0
- data/node_modules/angular-ui-sortable/dist/sortable.min.js +8 -0
- data/node_modules/angular-ui-sortable/gruntFile.js +202 -0
- data/node_modules/angular-ui-sortable/package.json +48 -0
- data/node_modules/angular-ui-sortable/publish.js +41 -0
- data/{vendor/assets/javascripts/ui-sortable.js → node_modules/angular-ui-sortable/src/sortable.js} +106 -200
- data/node_modules/angular-ui-sortable/test/bower_overrides.json +13 -0
- data/node_modules/angular-ui-sortable/test/karma.conf.js +85 -0
- data/node_modules/angular-ui-sortable/test/libs/jquery.simulate.dragandrevert.js +60 -0
- data/node_modules/angular-ui-sortable/test/sortable.e2e.callbacks.attr.spec.js +199 -0
- data/node_modules/angular-ui-sortable/test/sortable.e2e.callbacks.spec.js +729 -0
- data/node_modules/angular-ui-sortable/test/sortable.e2e.directiveoptions.spec.js +554 -0
- data/node_modules/angular-ui-sortable/test/sortable.e2e.directives.spec.js +371 -0
- data/node_modules/angular-ui-sortable/test/sortable.e2e.events.spec.js +167 -0
- data/node_modules/angular-ui-sortable/test/sortable.e2e.multi.spec.js +1232 -0
- data/node_modules/angular-ui-sortable/test/sortable.e2e.nested.spec.js +186 -0
- data/node_modules/angular-ui-sortable/test/sortable.e2e.spec.js +895 -0
- data/node_modules/angular-ui-sortable/test/sortable.spec.js +440 -0
- data/node_modules/angular-ui-sortable/test/sortable.test-directives.js +54 -0
- data/node_modules/angular-ui-sortable/test/sortable.test-helper.js +114 -0
- data/node_modules/angular-ui-sortable/test/sortable.tests.css +12 -0
- data/node_modules/ng-file-upload/LICENSE +20 -0
- data/node_modules/ng-file-upload/README.md +616 -0
- data/{vendor/assets/javascripts/ng-file-upload → node_modules/ng-file-upload/dist}/FileAPI.flash.swf +0 -0
- data/{vendor/assets/javascripts/ng-file-upload → node_modules/ng-file-upload/dist}/FileAPI.js +0 -0
- data/{vendor/assets/javascripts/ng-file-upload → node_modules/ng-file-upload/dist}/FileAPI.min.js +0 -0
- data/{vendor/assets/javascripts/ng-file-upload → node_modules/ng-file-upload/dist}/ng-file-upload-all.js +0 -0
- data/{vendor/assets/javascripts/ng-file-upload → node_modules/ng-file-upload/dist}/ng-file-upload-all.min.js +0 -0
- data/{vendor/assets/javascripts/ng-file-upload → node_modules/ng-file-upload/dist}/ng-file-upload-shim.js +0 -0
- data/{vendor/assets/javascripts/ng-file-upload → node_modules/ng-file-upload/dist}/ng-file-upload-shim.min.js +0 -0
- data/{vendor/assets/javascripts/ng-file-upload → node_modules/ng-file-upload/dist}/ng-file-upload.js +0 -0
- data/{vendor/assets/javascripts/ng-file-upload → node_modules/ng-file-upload/dist}/ng-file-upload.min.js +0 -0
- data/node_modules/ng-file-upload/index.js +2 -0
- data/node_modules/ng-file-upload/package.json +42 -0
- data/node_modules/summernote/CODE_OF_CONDUCT.md +46 -0
- data/node_modules/summernote/CONTRIBUTING.md +67 -0
- data/node_modules/summernote/ISSUE_TEMPLATE.md +14 -0
- data/node_modules/summernote/LICENSE +21 -0
- data/node_modules/summernote/PULL_REQUEST_TEMPLATE.md +28 -0
- data/node_modules/summernote/README.md +90 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/base.css +213 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/index.html +262 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/prettify.css +1 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/prettify.js +1 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/sort-arrow-sprite.png +0 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/sorter.js +158 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/Context.js.html +758 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/core/async.js.html +206 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/core/dom.js.html +3329 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/core/env.js.html +386 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/core/func.js.html +551 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/core/index.html +171 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/core/key.js.html +341 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/core/lists.js.html +695 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/core/range.js.html +2441 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/editing/Bullet.js.html +668 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/editing/History.js.html +380 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/editing/Style.js.html +539 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/editing/Table.js.html +1787 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/editing/Typing.js.html +335 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/editing/index.html +145 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/index.html +119 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/module/AirPopover.js.html +284 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/module/AutoLink.js.html +248 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/module/AutoSync.js.html +122 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/module/Buttons.js.html +2504 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/module/Clipboard.js.html +149 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/module/Codeview.js.html +434 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/module/Dropzone.js.html +410 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/module/Editor.js.html +2648 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/module/Fullscreen.js.html +218 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/module/Handle.js.html +494 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/module/HelpDialog.js.html +302 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/module/HintPopover.js.html +743 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/module/ImageDialog.js.html +458 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/module/ImagePopover.js.html +239 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/module/LinkDialog.js.html +587 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/module/LinkPopover.js.html +272 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/module/Placeholder.js.html +182 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/module/Statusbar.js.html +191 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/module/TablePopover.js.html +278 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/module/Toolbar.js.html +473 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/module/VideoDialog.js.html +680 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/module/index.html +353 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/renderer.js.html +263 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/base/summernote-en-US.js.html +542 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/bs3/index.html +106 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/bs3/settings.js.html +956 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/bs3/ui.js.html +776 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/bs4/index.html +106 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/bs4/settings.js.html +968 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/bs4/ui.js.html +791 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/index.html +93 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/lite/index.html +106 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/lite/settings.js.html +953 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/lite/ui.js.html +1919 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/lite/ui/DropdownUI.js.html +260 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/lite/ui/ModalUI.js.html +167 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/lite/ui/PopoverUI.js.html +347 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/lite/ui/TooltipUI.js.html +344 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/lite/ui/index.html +132 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/src/js/summernote.js.html +203 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/test/unit/base/Context.spec.js.html +323 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/test/unit/base/core/dom.spec.js.html +1046 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/test/unit/base/core/func.spec.js.html +482 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/test/unit/base/core/index.html +145 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/test/unit/base/core/key.spec.js.html +140 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/test/unit/base/core/lists.spec.js.html +419 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/test/unit/base/core/range.spec.js.html +1286 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/test/unit/base/editing/Table.spec.js.html +1724 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/test/unit/base/editing/index.html +106 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/test/unit/base/editing/style.spec.js.html +341 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/test/unit/base/index.html +93 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/test/unit/base/module/Codeview.spec.js.html +161 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/test/unit/base/module/Editor.spec.js.html +1235 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/test/unit/base/module/Fullscreen.spec.js.html +161 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/test/unit/base/module/index.html +119 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/test/unit/bs/module/Buttons.spec.js.html +770 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/test/unit/bs/module/VideoDialog.spec.js.html +209 -0
- data/node_modules/summernote/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/html/test/unit/bs/module/index.html +106 -0
- data/node_modules/summernote/dist/font/summernote.eot +0 -0
- data/node_modules/summernote/dist/font/summernote.ttf +0 -0
- data/node_modules/summernote/dist/font/summernote.woff +0 -0
- data/{vendor/assets/javascripts/summernote/locales/ar-AR.js → node_modules/summernote/dist/lang/summernote-ar-AR.js} +55 -4
- data/node_modules/summernote/dist/lang/summernote-ar-AR.min.js +3 -0
- data/{vendor/assets/javascripts/summernote/locales/bg-BG.js → node_modules/summernote/dist/lang/summernote-bg-BG.js} +60 -4
- data/node_modules/summernote/dist/lang/summernote-bg-BG.min.js +3 -0
- data/{vendor/assets/javascripts/summernote/locales/ca-ES.js → node_modules/summernote/dist/lang/summernote-ca-ES.js} +12 -4
- data/node_modules/summernote/dist/lang/summernote-ca-ES.min.js +3 -0
- data/{vendor/assets/javascripts/summernote/locales/cs-CZ.js → node_modules/summernote/dist/lang/summernote-cs-CZ.js} +50 -4
- data/node_modules/summernote/dist/lang/summernote-cs-CZ.min.js +3 -0
- data/{vendor/assets/javascripts/summernote/locales/da-DK.js → node_modules/summernote/dist/lang/summernote-da-DK.js} +46 -5
- data/node_modules/summernote/dist/lang/summernote-da-DK.min.js +3 -0
- data/node_modules/summernote/dist/lang/summernote-de-DE.js +154 -0
- data/node_modules/summernote/dist/lang/summernote-de-DE.min.js +3 -0
- data/{vendor/assets/javascripts/summernote/locales/el-GR.js → node_modules/summernote/dist/lang/summernote-el-GR.js} +11 -3
- data/node_modules/summernote/dist/lang/summernote-el-GR.min.js +3 -0
- data/{vendor/assets/javascripts/summernote/locales/es-ES.js → node_modules/summernote/dist/lang/summernote-es-ES.js} +12 -4
- data/node_modules/summernote/dist/lang/summernote-es-ES.min.js +3 -0
- data/{vendor/assets/javascripts/summernote/locales/es-EU.js → node_modules/summernote/dist/lang/summernote-es-EU.js} +55 -4
- data/node_modules/summernote/dist/lang/summernote-es-EU.min.js +3 -0
- data/{vendor/assets/javascripts/summernote/locales/fa-IR.js → node_modules/summernote/dist/lang/summernote-fa-IR.js} +55 -5
- data/node_modules/summernote/dist/lang/summernote-fa-IR.min.js +3 -0
- data/{vendor/assets/javascripts/summernote/locales/fi-FI.js → node_modules/summernote/dist/lang/summernote-fi-FI.js} +52 -3
- data/node_modules/summernote/dist/lang/summernote-fi-FI.min.js +3 -0
- data/{vendor/assets/javascripts/summernote/locales/fr-FR.js → node_modules/summernote/dist/lang/summernote-fr-FR.js} +3 -2
- data/node_modules/summernote/dist/lang/summernote-fr-FR.min.js +3 -0
- data/{vendor/assets/javascripts/summernote/locales/gl-ES.js → node_modules/summernote/dist/lang/summernote-gl-ES.js} +12 -4
- data/node_modules/summernote/dist/lang/summernote-gl-ES.min.js +3 -0
- data/{vendor/assets/javascripts/summernote/locales/he-IL.js → node_modules/summernote/dist/lang/summernote-he-IL.js} +51 -3
- data/node_modules/summernote/dist/lang/summernote-he-IL.min.js +3 -0
- data/{vendor/assets/javascripts/summernote/locales/hr-HR.js → node_modules/summernote/dist/lang/summernote-hr-HR.js} +54 -3
- data/node_modules/summernote/dist/lang/summernote-hr-HR.min.js +3 -0
- data/{vendor/assets/javascripts/summernote/locales/hu-HU.js → node_modules/summernote/dist/lang/summernote-hu-HU.js} +25 -5
- data/node_modules/summernote/dist/lang/summernote-hu-HU.min.js +3 -0
- data/{vendor/assets/javascripts/summernote/locales/id-ID.js → node_modules/summernote/dist/lang/summernote-id-ID.js} +56 -4
- data/node_modules/summernote/dist/lang/summernote-id-ID.min.js +3 -0
- data/{vendor/assets/javascripts/summernote/locales/it-IT.js → node_modules/summernote/dist/lang/summernote-it-IT.js} +55 -4
- data/node_modules/summernote/dist/lang/summernote-it-IT.min.js +3 -0
- data/{vendor/assets/javascripts/summernote/locales/ja-JP.js → node_modules/summernote/dist/lang/summernote-ja-JP.js} +32 -10
- data/node_modules/summernote/dist/lang/summernote-ja-JP.min.js +3 -0
- data/{vendor/assets/javascripts/summernote/locales/ko-KR.js → node_modules/summernote/dist/lang/summernote-ko-KR.js} +44 -4
- data/node_modules/summernote/dist/lang/summernote-ko-KR.min.js +3 -0
- data/{vendor/assets/javascripts/summernote/locales/lt-LT.js → node_modules/summernote/dist/lang/summernote-lt-LT.js} +52 -4
- data/node_modules/summernote/dist/lang/summernote-lt-LT.min.js +3 -0
- data/{vendor/assets/javascripts/summernote/locales/lt-LV.js → node_modules/summernote/dist/lang/summernote-lt-LV.js} +27 -7
- data/node_modules/summernote/dist/lang/summernote-lt-LV.min.js +3 -0
- data/{vendor/assets/javascripts/summernote/locales/mn-MN.js → node_modules/summernote/dist/lang/summernote-mn-MN.js} +43 -4
- data/node_modules/summernote/dist/lang/summernote-mn-MN.min.js +3 -0
- data/{vendor/assets/javascripts/summernote/locales/nb-NO.js → node_modules/summernote/dist/lang/summernote-nb-NO.js} +53 -3
- data/node_modules/summernote/dist/lang/summernote-nb-NO.min.js +3 -0
- data/{vendor/assets/javascripts/summernote/locales/nl-NL.js → node_modules/summernote/dist/lang/summernote-nl-NL.js} +55 -4
- data/node_modules/summernote/dist/lang/summernote-nl-NL.min.js +3 -0
- data/{vendor/assets/javascripts/summernote/locales/pl-PL.js → node_modules/summernote/dist/lang/summernote-pl-PL.js} +46 -3
- data/node_modules/summernote/dist/lang/summernote-pl-PL.min.js +3 -0
- data/{vendor/assets/javascripts/summernote/locales/pt-BR.js → node_modules/summernote/dist/lang/summernote-pt-BR.js} +25 -8
- data/node_modules/summernote/dist/lang/summernote-pt-BR.min.js +3 -0
- data/{vendor/assets/javascripts/summernote/locales/pt-PT.js → node_modules/summernote/dist/lang/summernote-pt-PT.js} +54 -3
- data/node_modules/summernote/dist/lang/summernote-pt-PT.min.js +3 -0
- data/node_modules/summernote/dist/lang/summernote-ro-RO.js +155 -0
- data/node_modules/summernote/dist/lang/summernote-ro-RO.min.js +3 -0
- data/{vendor/assets/javascripts/summernote/locales/ru-RU.js → node_modules/summernote/dist/lang/summernote-ru-RU.js} +46 -3
- data/node_modules/summernote/dist/lang/summernote-ru-RU.min.js +3 -0
- data/{vendor/assets/javascripts/summernote/locales/sk-SK.js → node_modules/summernote/dist/lang/summernote-sk-SK.js} +54 -3
- data/node_modules/summernote/dist/lang/summernote-sk-SK.min.js +3 -0
- data/{vendor/assets/javascripts/summernote/locales/sl-SI.js → node_modules/summernote/dist/lang/summernote-sl-SI.js} +53 -4
- data/node_modules/summernote/dist/lang/summernote-sl-SI.min.js +3 -0
- data/{vendor/assets/javascripts/summernote/locales/sr-RS-Latin.js → node_modules/summernote/dist/lang/summernote-sr-RS-Latin.js} +54 -3
- data/node_modules/summernote/dist/lang/summernote-sr-RS-Latin.min.js +3 -0
- data/{vendor/assets/javascripts/summernote/locales/sr-RS.js → node_modules/summernote/dist/lang/summernote-sr-RS.js} +54 -3
- data/node_modules/summernote/dist/lang/summernote-sr-RS.min.js +3 -0
- data/{vendor/assets/javascripts/summernote/locales/sv-SE.js → node_modules/summernote/dist/lang/summernote-sv-SE.js} +55 -4
- data/node_modules/summernote/dist/lang/summernote-sv-SE.min.js +3 -0
- data/{vendor/assets/javascripts/summernote/locales/ta-IN.js → node_modules/summernote/dist/lang/summernote-ta-IN.js} +46 -4
- data/node_modules/summernote/dist/lang/summernote-ta-IN.min.js +3 -0
- data/node_modules/summernote/dist/lang/summernote-th-TH.js +155 -0
- data/node_modules/summernote/dist/lang/summernote-th-TH.min.js +3 -0
- data/{vendor/assets/javascripts/summernote/locales/tr-TR.js → node_modules/summernote/dist/lang/summernote-tr-TR.js} +3 -2
- data/node_modules/summernote/dist/lang/summernote-tr-TR.min.js +3 -0
- data/{vendor/assets/javascripts/summernote/locales/uk-UA.js → node_modules/summernote/dist/lang/summernote-uk-UA.js} +48 -4
- data/node_modules/summernote/dist/lang/summernote-uk-UA.min.js +3 -0
- data/node_modules/summernote/dist/lang/summernote-uz-UZ.js +112 -0
- data/node_modules/summernote/dist/lang/summernote-uz-UZ.min.js +3 -0
- data/{vendor/assets/javascripts/summernote/locales/vi-VN.js → node_modules/summernote/dist/lang/summernote-vi-VN.js} +55 -4
- data/node_modules/summernote/dist/lang/summernote-vi-VN.min.js +3 -0
- data/{vendor/assets/javascripts/summernote/locales/zh-CN.js → node_modules/summernote/dist/lang/summernote-zh-CN.js} +20 -7
- data/node_modules/summernote/dist/lang/summernote-zh-CN.min.js +3 -0
- data/{vendor/assets/javascripts/summernote/locales/zh-TW.js → node_modules/summernote/dist/lang/summernote-zh-TW.js} +45 -3
- data/node_modules/summernote/dist/lang/summernote-zh-TW.min.js +3 -0
- data/node_modules/summernote/dist/summernote-0.8.10-dist.zip +0 -0
- data/node_modules/summernote/dist/summernote-bs4.css +1 -0
- data/node_modules/summernote/dist/summernote-bs4.js +7323 -0
- data/node_modules/summernote/dist/summernote-bs4.js.map +1 -0
- data/node_modules/summernote/dist/summernote-bs4.min.js +3 -0
- data/node_modules/summernote/dist/summernote-lite.css +1 -0
- data/node_modules/summernote/dist/summernote-lite.js +7837 -0
- data/node_modules/summernote/dist/summernote-lite.js.map +1 -0
- data/node_modules/summernote/dist/summernote.css +1 -0
- data/node_modules/summernote/dist/summernote.js +7315 -0
- data/node_modules/summernote/dist/summernote.js.map +1 -0
- data/node_modules/summernote/dist/summernote.min.js +3 -0
- data/node_modules/summernote/examples/airmode.html +35 -0
- data/node_modules/summernote/examples/bs3.html +60 -0
- data/node_modules/summernote/examples/bs4.html +57 -0
- data/node_modules/summernote/examples/codemirror.html +45 -0
- data/node_modules/summernote/examples/external-api.html +76 -0
- data/node_modules/summernote/examples/hint-emoji.html +61 -0
- data/node_modules/summernote/examples/hint-symbols_mathematical-symbols_Greek-letters.html +54 -0
- data/node_modules/summernote/examples/hint-userdefine.html +48 -0
- data/node_modules/summernote/examples/ie8.html +32 -0
- data/node_modules/summernote/examples/jquery-custom-event.html +119 -0
- data/node_modules/summernote/examples/jquery19lt.html +25 -0
- data/node_modules/summernote/examples/lang.html +33 -0
- data/node_modules/summernote/examples/link-blank.html +33 -0
- data/node_modules/summernote/examples/lite.html +24 -0
- data/node_modules/summernote/examples/nativestyle.html +32 -0
- data/node_modules/summernote/examples/ondialog-multitab.html +77 -0
- data/node_modules/summernote/examples/ondialog.html +58 -0
- data/node_modules/summernote/examples/plugin-hello.html +37 -0
- data/node_modules/summernote/examples/rtl.html +32 -0
- data/node_modules/summernote/examples/symbols_mathematical-symbols_Greek-letters.json +1118 -0
- data/node_modules/summernote/examples/textarea.html +46 -0
- data/node_modules/summernote/examples/toolbar-container.html +35 -0
- data/node_modules/summernote/examples/with-google-font.html +50 -0
- data/node_modules/summernote/index.html +33 -0
- data/node_modules/summernote/karma.conf.js +42 -0
- data/node_modules/summernote/lang/summernote-ar-AR.js +155 -0
- data/node_modules/summernote/lang/summernote-bg-BG.js +155 -0
- data/node_modules/summernote/lang/summernote-ca-ES.js +155 -0
- data/node_modules/summernote/lang/summernote-cs-CZ.js +149 -0
- data/node_modules/summernote/lang/summernote-da-DK.js +155 -0
- data/node_modules/summernote/lang/summernote-de-DE.js +154 -0
- data/node_modules/summernote/lang/summernote-el-GR.js +155 -0
- data/node_modules/summernote/lang/summernote-es-ES.js +155 -0
- data/node_modules/summernote/lang/summernote-es-EU.js +154 -0
- data/node_modules/summernote/lang/summernote-fa-IR.js +155 -0
- data/node_modules/summernote/lang/summernote-fi-FI.js +153 -0
- data/node_modules/summernote/lang/summernote-fr-FR.js +155 -0
- data/node_modules/summernote/lang/summernote-gl-ES.js +155 -0
- data/node_modules/summernote/lang/summernote-he-IL.js +155 -0
- data/node_modules/summernote/lang/summernote-hr-HR.js +155 -0
- data/node_modules/summernote/lang/summernote-hu-HU.js +155 -0
- data/node_modules/summernote/lang/summernote-id-ID.js +155 -0
- data/node_modules/summernote/lang/summernote-it-IT.js +155 -0
- data/node_modules/summernote/lang/summernote-ja-JP.js +155 -0
- data/node_modules/summernote/lang/summernote-ko-KR.js +155 -0
- data/node_modules/summernote/lang/summernote-lt-LT.js +155 -0
- data/node_modules/summernote/lang/summernote-lt-LV.js +155 -0
- data/node_modules/summernote/lang/summernote-mn-MN.js +157 -0
- data/node_modules/summernote/lang/summernote-nb-NO.js +154 -0
- data/node_modules/summernote/lang/summernote-nl-NL.js +155 -0
- data/node_modules/summernote/lang/summernote-pl-PL.js +155 -0
- data/node_modules/summernote/lang/summernote-pt-BR.js +155 -0
- data/node_modules/summernote/lang/summernote-pt-PT.js +154 -0
- data/node_modules/summernote/lang/summernote-ro-RO.js +155 -0
- data/node_modules/summernote/lang/summernote-ru-RU.js +155 -0
- data/node_modules/summernote/lang/summernote-sk-SK.js +153 -0
- data/node_modules/summernote/lang/summernote-sl-SI.js +155 -0
- data/node_modules/summernote/lang/summernote-sr-RS-Latin.js +155 -0
- data/node_modules/summernote/lang/summernote-sr-RS.js +155 -0
- data/node_modules/summernote/lang/summernote-sv-SE.js +155 -0
- data/node_modules/summernote/lang/summernote-ta-IN.js +155 -0
- data/node_modules/summernote/lang/summernote-th-TH.js +155 -0
- data/node_modules/summernote/lang/summernote-tr-TR.js +155 -0
- data/node_modules/summernote/lang/summernote-uk-UA.js +155 -0
- data/node_modules/summernote/lang/summernote-uz-UZ.js +112 -0
- data/node_modules/summernote/lang/summernote-vi-VN.js +155 -0
- data/node_modules/summernote/lang/summernote-zh-CN.js +155 -0
- data/node_modules/summernote/lang/summernote-zh-TW.js +155 -0
- data/node_modules/summernote/package.json +87 -0
- data/{vendor/assets/javascripts → node_modules}/summernote/plugin/databasic/summernote-ext-databasic.css +0 -0
- data/{vendor/assets/javascripts → node_modules}/summernote/plugin/databasic/summernote-ext-databasic.js +62 -73
- data/{vendor/assets/javascripts → node_modules}/summernote/plugin/hello/summernote-ext-hello.js +9 -10
- data/{vendor/assets/javascripts → node_modules}/summernote/plugin/specialchars/summernote-ext-specialchars.js +22 -25
- data/node_modules/summernote/src/icons/align-center.svg +11 -0
- data/node_modules/summernote/src/icons/align-indent.svg +11 -0
- data/node_modules/summernote/src/icons/align-justify.svg +11 -0
- data/node_modules/summernote/src/icons/align-left.svg +12 -0
- data/node_modules/summernote/src/icons/align-outdent.svg +11 -0
- data/node_modules/summernote/src/icons/align-right.svg +11 -0
- data/node_modules/summernote/src/icons/align.svg +8 -0
- data/node_modules/summernote/src/icons/arrow-circle-down.svg +1 -0
- data/node_modules/summernote/src/icons/arrow-circle-left.svg +1 -0
- data/node_modules/summernote/src/icons/arrow-circle-right.svg +1 -0
- data/node_modules/summernote/src/icons/arrow-circle-up.svg +1 -0
- data/node_modules/summernote/src/icons/arrows-alt.svg +11 -0
- data/node_modules/summernote/src/icons/arrows-h.svg +1 -0
- data/node_modules/summernote/src/icons/arrows-v.svg +1 -0
- data/node_modules/summernote/src/icons/bold.svg +11 -0
- data/node_modules/summernote/src/icons/caret.svg +9 -0
- data/node_modules/summernote/src/icons/chain-broken.svg +47 -0
- data/node_modules/summernote/src/icons/circle.svg +10 -0
- data/node_modules/summernote/src/icons/close.svg +16 -0
- data/node_modules/summernote/src/icons/code.svg +11 -0
- data/node_modules/summernote/src/icons/col-after.svg +96 -0
- data/node_modules/summernote/src/icons/col-before.svg +19 -0
- data/node_modules/summernote/src/icons/col-remove.svg +19 -0
- data/node_modules/summernote/src/icons/dist/font/summernote.eot +0 -0
- data/node_modules/summernote/src/icons/dist/font/summernote.ttf +0 -0
- data/node_modules/summernote/src/icons/dist/font/summernote.woff +0 -0
- data/node_modules/summernote/src/icons/dist/summernote.html +536 -0
- data/node_modules/summernote/src/icons/dist/summernote.less +511 -0
- data/node_modules/summernote/src/icons/eraser.svg +13 -0
- data/node_modules/summernote/src/icons/font.svg +11 -0
- data/node_modules/summernote/src/icons/frame.svg +10 -0
- data/node_modules/summernote/src/icons/italic.svg +11 -0
- data/node_modules/summernote/src/icons/link.svg +21 -0
- data/node_modules/summernote/src/icons/magic.svg +10 -0
- data/node_modules/summernote/src/icons/menu-check.svg +8 -0
- data/node_modules/summernote/src/icons/minus.svg +11 -0
- data/node_modules/summernote/src/icons/orderedlist.svg +12 -0
- data/node_modules/summernote/src/icons/pencil.svg +8 -0
- data/node_modules/summernote/src/icons/picture.svg +11 -0
- data/node_modules/summernote/src/icons/question.svg +10 -0
- data/node_modules/summernote/src/icons/redo.svg +10 -0
- data/node_modules/summernote/src/icons/row-above.svg +19 -0
- data/node_modules/summernote/src/icons/row-below.svg +19 -0
- data/node_modules/summernote/src/icons/row-remove.svg +19 -0
- data/node_modules/summernote/src/icons/special-character.svg +10 -0
- data/node_modules/summernote/src/icons/square.svg +10 -0
- data/node_modules/summernote/src/icons/strikethrough.svg +11 -0
- data/node_modules/summernote/src/icons/subscript.svg +11 -0
- data/node_modules/summernote/src/icons/summernote.svg +11 -0
- data/node_modules/summernote/src/icons/superscript.svg +11 -0
- data/node_modules/summernote/src/icons/table.svg +11 -0
- data/node_modules/summernote/src/icons/templates/summernote.css +110 -0
- data/node_modules/summernote/src/icons/templates/summernote.json +5 -0
- data/node_modules/summernote/src/icons/text-height.svg +11 -0
- data/node_modules/summernote/src/icons/trash.svg +17 -0
- data/node_modules/summernote/src/icons/underline.svg +11 -0
- data/node_modules/summernote/src/icons/undo.svg +10 -0
- data/node_modules/summernote/src/icons/unorderedlist.svg +9 -0
- data/node_modules/summernote/src/icons/video.svg +9 -0
- data/node_modules/summernote/src/js/base/Context.js +231 -0
- data/node_modules/summernote/src/js/base/core/async.js +47 -0
- data/node_modules/summernote/src/js/base/core/dom.js +1088 -0
- data/node_modules/summernote/src/js/base/core/env.js +107 -0
- data/node_modules/summernote/src/js/base/core/func.js +162 -0
- data/node_modules/summernote/src/js/base/core/key.js +92 -0
- data/node_modules/summernote/src/js/base/core/lists.js +210 -0
- data/node_modules/summernote/src/js/base/core/range.js +792 -0
- data/node_modules/summernote/src/js/base/editing/Bullet.js +201 -0
- data/node_modules/summernote/src/js/base/editing/History.js +105 -0
- data/node_modules/summernote/src/js/base/editing/Style.js +158 -0
- data/node_modules/summernote/src/js/base/editing/Table.js +574 -0
- data/node_modules/summernote/src/js/base/editing/Typing.js +90 -0
- data/node_modules/summernote/src/js/base/module/AirPopover.js +73 -0
- data/node_modules/summernote/src/js/base/module/AutoLink.js +61 -0
- data/node_modules/summernote/src/js/base/module/AutoSync.js +19 -0
- data/node_modules/summernote/src/js/base/module/Buttons.js +813 -0
- data/node_modules/summernote/src/js/base/module/Clipboard.js +28 -0
- data/node_modules/summernote/src/js/base/module/Codeview.js +123 -0
- data/node_modules/summernote/src/js/base/module/Dropzone.js +115 -0
- data/node_modules/summernote/src/js/base/module/Editor.js +861 -0
- data/node_modules/summernote/src/js/base/module/Fullscreen.js +51 -0
- data/node_modules/summernote/src/js/base/module/Handle.js +143 -0
- data/node_modules/summernote/src/js/base/module/HelpDialog.js +79 -0
- data/node_modules/summernote/src/js/base/module/HintPopover.js +226 -0
- data/node_modules/summernote/src/js/base/module/ImageDialog.js +131 -0
- data/node_modules/summernote/src/js/base/module/ImagePopover.js +58 -0
- data/node_modules/summernote/src/js/base/module/LinkDialog.js +174 -0
- data/node_modules/summernote/src/js/base/module/LinkPopover.js +69 -0
- data/node_modules/summernote/src/js/base/module/Placeholder.js +39 -0
- data/node_modules/summernote/src/js/base/module/Statusbar.js +42 -0
- data/node_modules/summernote/src/js/base/module/TablePopover.js +71 -0
- data/node_modules/summernote/src/js/base/module/Toolbar.js +136 -0
- data/node_modules/summernote/src/js/base/module/VideoDialog.js +205 -0
- data/node_modules/summernote/src/js/base/renderer.js +66 -0
- data/node_modules/summernote/src/js/base/summernote-en-US.js +159 -0
- data/node_modules/summernote/src/js/bs3/settings.js +297 -0
- data/node_modules/summernote/src/js/bs3/ui.js +237 -0
- data/node_modules/summernote/src/js/bs4/settings.js +301 -0
- data/node_modules/summernote/src/js/bs4/ui.js +242 -0
- data/node_modules/summernote/src/js/lite/settings.js +296 -0
- data/node_modules/summernote/src/js/lite/ui.js +618 -0
- data/node_modules/summernote/src/js/lite/ui/DropdownUI.js +65 -0
- data/node_modules/summernote/src/js/lite/ui/ModalUI.js +34 -0
- data/node_modules/summernote/src/js/lite/ui/PopoverUI.js +94 -0
- data/node_modules/summernote/src/js/lite/ui/TooltipUI.js +93 -0
- data/node_modules/summernote/src/js/summernote.js +46 -0
- data/node_modules/summernote/src/less/elements.less +149 -0
- data/node_modules/summernote/src/less/elements.scss +149 -0
- data/node_modules/summernote/src/less/lite-ui/all.less +15 -0
- data/node_modules/summernote/src/less/lite-ui/btn-group.less +51 -0
- data/node_modules/summernote/src/less/lite-ui/buttons.less +102 -0
- data/node_modules/summernote/src/less/lite-ui/common.less +20 -0
- data/node_modules/summernote/src/less/lite-ui/dropdown.less +39 -0
- data/node_modules/summernote/src/less/lite-ui/form.less +43 -0
- data/node_modules/summernote/src/less/lite-ui/mixins.less +1 -0
- data/node_modules/summernote/src/less/lite-ui/mixins/buttons.less +40 -0
- data/node_modules/summernote/src/less/lite-ui/modal.less +104 -0
- data/node_modules/summernote/src/less/lite-ui/popover.less +121 -0
- data/node_modules/summernote/src/less/lite-ui/toolbar.less +4 -0
- data/node_modules/summernote/src/less/lite-ui/tooltip.less +66 -0
- data/node_modules/summernote/src/less/lite-ui/variables.less +81 -0
- data/node_modules/summernote/src/less/summernote-bs4.less +577 -0
- data/node_modules/summernote/src/less/summernote-bs4.scss +560 -0
- data/node_modules/summernote/src/less/summernote-lite.less +601 -0
- data/node_modules/summernote/src/less/summernote.less +576 -0
- data/node_modules/summernote/src/less/summernote.scss +560 -0
- data/node_modules/summernote/tsconfig.json +12 -0
- metadata +459 -69
- data/vendor/assets/fonts/summernote.eot +0 -0
- data/vendor/assets/fonts/summernote.ttf +0 -0
- data/vendor/assets/fonts/summernote.woff +0 -0
- data/vendor/assets/javascripts/summernote/index.js +0 -1
- data/vendor/assets/javascripts/summernote/locales/index.js +0 -1
- data/vendor/assets/javascripts/summernote/locales/ro-RO.js +0 -102
- data/vendor/assets/javascripts/summernote/locales/th-TH.js +0 -106
- data/vendor/assets/javascripts/summernote/summernote-bs4.js +0 -7990
- data/vendor/assets/javascripts/summernote/summernote-lite.js +0 -8598
- data/vendor/assets/javascripts/summernote/summernote.js +0 -7987
- data/vendor/assets/stylesheets/summernote-bs4.css +0 -1
- data/vendor/assets/stylesheets/summernote-lite.css +0 -1
- data/vendor/assets/stylesheets/summernote.scss +0 -1
@@ -0,0 +1,90 @@
|
|
1
|
+
import $ from 'jquery';
|
2
|
+
import dom from '../core/dom';
|
3
|
+
import range from '../core/range';
|
4
|
+
import Bullet from '../editing/Bullet';
|
5
|
+
|
6
|
+
/**
|
7
|
+
* @class editing.Typing
|
8
|
+
*
|
9
|
+
* Typing
|
10
|
+
*
|
11
|
+
*/
|
12
|
+
export default class Typing {
|
13
|
+
constructor() {
|
14
|
+
// a Bullet instance to toggle lists off
|
15
|
+
this.bullet = new Bullet();
|
16
|
+
}
|
17
|
+
|
18
|
+
/**
|
19
|
+
* insert tab
|
20
|
+
*
|
21
|
+
* @param {WrappedRange} rng
|
22
|
+
* @param {Number} tabsize
|
23
|
+
*/
|
24
|
+
insertTab(rng, tabsize) {
|
25
|
+
const tab = dom.createText(new Array(tabsize + 1).join(dom.NBSP_CHAR));
|
26
|
+
rng = rng.deleteContents();
|
27
|
+
rng.insertNode(tab, true);
|
28
|
+
|
29
|
+
rng = range.create(tab, tabsize);
|
30
|
+
rng.select();
|
31
|
+
}
|
32
|
+
|
33
|
+
/**
|
34
|
+
* insert paragraph
|
35
|
+
*/
|
36
|
+
insertParagraph(editable) {
|
37
|
+
let rng = range.create(editable);
|
38
|
+
|
39
|
+
// deleteContents on range.
|
40
|
+
rng = rng.deleteContents();
|
41
|
+
|
42
|
+
// Wrap range if it needs to be wrapped by paragraph
|
43
|
+
rng = rng.wrapBodyInlineWithPara();
|
44
|
+
|
45
|
+
// finding paragraph
|
46
|
+
const splitRoot = dom.ancestor(rng.sc, dom.isPara);
|
47
|
+
|
48
|
+
let nextPara;
|
49
|
+
// on paragraph: split paragraph
|
50
|
+
if (splitRoot) {
|
51
|
+
// if it is an empty line with li
|
52
|
+
if (dom.isEmpty(splitRoot) && dom.isLi(splitRoot)) {
|
53
|
+
// toogle UL/OL and escape
|
54
|
+
this.bullet.toggleList(splitRoot.parentNode.nodeName);
|
55
|
+
return;
|
56
|
+
// if it is an empty line with para on blockquote
|
57
|
+
} else if (dom.isEmpty(splitRoot) && dom.isPara(splitRoot) && dom.isBlockquote(splitRoot.parentNode)) {
|
58
|
+
// escape blockquote
|
59
|
+
dom.insertAfter(splitRoot, splitRoot.parentNode);
|
60
|
+
nextPara = splitRoot;
|
61
|
+
// if new line has content (not a line break)
|
62
|
+
} else {
|
63
|
+
nextPara = dom.splitTree(splitRoot, rng.getStartPoint());
|
64
|
+
|
65
|
+
let emptyAnchors = dom.listDescendant(splitRoot, dom.isEmptyAnchor);
|
66
|
+
emptyAnchors = emptyAnchors.concat(dom.listDescendant(nextPara, dom.isEmptyAnchor));
|
67
|
+
|
68
|
+
$.each(emptyAnchors, (idx, anchor) => {
|
69
|
+
dom.remove(anchor);
|
70
|
+
});
|
71
|
+
|
72
|
+
// replace empty heading, pre or custom-made styleTag with P tag
|
73
|
+
if ((dom.isHeading(nextPara) || dom.isPre(nextPara) || dom.isCustomStyleTag(nextPara)) && dom.isEmpty(nextPara)) {
|
74
|
+
nextPara = dom.replace(nextPara, 'p');
|
75
|
+
}
|
76
|
+
}
|
77
|
+
// no paragraph: insert empty paragraph
|
78
|
+
} else {
|
79
|
+
const next = rng.sc.childNodes[rng.so];
|
80
|
+
nextPara = $(dom.emptyPara)[0];
|
81
|
+
if (next) {
|
82
|
+
rng.sc.insertBefore(nextPara, next);
|
83
|
+
} else {
|
84
|
+
rng.sc.appendChild(nextPara);
|
85
|
+
}
|
86
|
+
}
|
87
|
+
|
88
|
+
range.create(nextPara, 0).normalize().select().scrollIntoView(editable);
|
89
|
+
}
|
90
|
+
}
|
@@ -0,0 +1,73 @@
|
|
1
|
+
import $ from 'jquery';
|
2
|
+
import env from '../core/env';
|
3
|
+
import func from '../core/func';
|
4
|
+
import lists from '../core/lists';
|
5
|
+
import dom from '../core/dom';
|
6
|
+
|
7
|
+
const AIR_MODE_POPOVER_X_OFFSET = 20;
|
8
|
+
|
9
|
+
export default class AirPopover {
|
10
|
+
constructor(context) {
|
11
|
+
this.context = context;
|
12
|
+
this.ui = $.summernote.ui;
|
13
|
+
this.options = context.options;
|
14
|
+
this.events = {
|
15
|
+
'summernote.keyup summernote.mouseup summernote.scroll': () => {
|
16
|
+
this.update();
|
17
|
+
},
|
18
|
+
'summernote.disable summernote.change summernote.dialog.shown': () => {
|
19
|
+
this.hide();
|
20
|
+
},
|
21
|
+
'summernote.focusout': (we, e) => {
|
22
|
+
// [workaround] Firefox doesn't support relatedTarget on focusout
|
23
|
+
// - Ignore hide action on focus out in FF.
|
24
|
+
if (env.isFF) {
|
25
|
+
return;
|
26
|
+
}
|
27
|
+
|
28
|
+
if (!e.relatedTarget || !dom.ancestor(e.relatedTarget, func.eq(this.$popover[0]))) {
|
29
|
+
this.hide();
|
30
|
+
}
|
31
|
+
}
|
32
|
+
};
|
33
|
+
}
|
34
|
+
|
35
|
+
shouldInitialize() {
|
36
|
+
return this.options.airMode && !lists.isEmpty(this.options.popover.air);
|
37
|
+
}
|
38
|
+
|
39
|
+
initialize() {
|
40
|
+
this.$popover = this.ui.popover({
|
41
|
+
className: 'note-air-popover'
|
42
|
+
}).render().appendTo(this.options.container);
|
43
|
+
const $content = this.$popover.find('.popover-content');
|
44
|
+
|
45
|
+
this.context.invoke('buttons.build', $content, this.options.popover.air);
|
46
|
+
}
|
47
|
+
|
48
|
+
destroy() {
|
49
|
+
this.$popover.remove();
|
50
|
+
}
|
51
|
+
|
52
|
+
update() {
|
53
|
+
const styleInfo = this.context.invoke('editor.currentStyle');
|
54
|
+
if (styleInfo.range && !styleInfo.range.isCollapsed()) {
|
55
|
+
const rect = lists.last(styleInfo.range.getClientRects());
|
56
|
+
if (rect) {
|
57
|
+
const bnd = func.rect2bnd(rect);
|
58
|
+
this.$popover.css({
|
59
|
+
display: 'block',
|
60
|
+
left: Math.max(bnd.left + bnd.width / 2, 0) - AIR_MODE_POPOVER_X_OFFSET,
|
61
|
+
top: bnd.top + bnd.height
|
62
|
+
});
|
63
|
+
this.context.invoke('buttons.updateCurrentStyle', this.$popover);
|
64
|
+
}
|
65
|
+
} else {
|
66
|
+
this.hide();
|
67
|
+
}
|
68
|
+
}
|
69
|
+
|
70
|
+
hide() {
|
71
|
+
this.$popover.hide();
|
72
|
+
}
|
73
|
+
}
|
@@ -0,0 +1,61 @@
|
|
1
|
+
import $ from 'jquery';
|
2
|
+
import lists from '../core/lists';
|
3
|
+
import key from '../core/key';
|
4
|
+
|
5
|
+
const defaultScheme = 'http://';
|
6
|
+
const linkPattern = /^([A-Za-z][A-Za-z0-9+-.]*\:[\/\/]?|mailto:[A-Z0-9._%+-]+@)?(www\.)?(.+)$/i;
|
7
|
+
|
8
|
+
export default class AutoLink {
|
9
|
+
constructor(context) {
|
10
|
+
this.context = context;
|
11
|
+
this.events = {
|
12
|
+
'summernote.keyup': (we, e) => {
|
13
|
+
if (!e.isDefaultPrevented()) {
|
14
|
+
this.handleKeyup(e);
|
15
|
+
}
|
16
|
+
},
|
17
|
+
'summernote.keydown': (we, e) => {
|
18
|
+
this.handleKeydown(e);
|
19
|
+
}
|
20
|
+
};
|
21
|
+
}
|
22
|
+
|
23
|
+
initialize() {
|
24
|
+
this.lastWordRange = null;
|
25
|
+
}
|
26
|
+
|
27
|
+
destroy() {
|
28
|
+
this.lastWordRange = null;
|
29
|
+
}
|
30
|
+
|
31
|
+
replace() {
|
32
|
+
if (!this.lastWordRange) {
|
33
|
+
return;
|
34
|
+
}
|
35
|
+
|
36
|
+
const keyword = this.lastWordRange.toString();
|
37
|
+
const match = keyword.match(linkPattern);
|
38
|
+
|
39
|
+
if (match && (match[1] || match[2])) {
|
40
|
+
const link = match[1] ? keyword : defaultScheme + keyword;
|
41
|
+
const node = $('<a />').html(keyword).attr('href', link)[0];
|
42
|
+
|
43
|
+
this.lastWordRange.insertNode(node);
|
44
|
+
this.lastWordRange = null;
|
45
|
+
this.context.invoke('editor.focus');
|
46
|
+
}
|
47
|
+
}
|
48
|
+
|
49
|
+
handleKeydown(e) {
|
50
|
+
if (lists.contains([key.code.ENTER, key.code.SPACE], e.keyCode)) {
|
51
|
+
const wordRange = this.context.invoke('editor.createRange').getWordRange();
|
52
|
+
this.lastWordRange = wordRange;
|
53
|
+
}
|
54
|
+
}
|
55
|
+
|
56
|
+
handleKeyup(e) {
|
57
|
+
if (lists.contains([key.code.ENTER, key.code.SPACE], e.keyCode)) {
|
58
|
+
this.replace();
|
59
|
+
}
|
60
|
+
}
|
61
|
+
}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import dom from '../core/dom';
|
2
|
+
|
3
|
+
/**
|
4
|
+
* textarea auto sync.
|
5
|
+
*/
|
6
|
+
export default class AutoSync {
|
7
|
+
constructor(context) {
|
8
|
+
this.$note = context.layoutInfo.note;
|
9
|
+
this.events = {
|
10
|
+
'summernote.change': () => {
|
11
|
+
this.$note.val(context.invoke('code'));
|
12
|
+
}
|
13
|
+
};
|
14
|
+
}
|
15
|
+
|
16
|
+
shouldInitialize() {
|
17
|
+
return dom.isTextarea(this.$note[0]);
|
18
|
+
}
|
19
|
+
}
|
@@ -0,0 +1,813 @@
|
|
1
|
+
import $ from 'jquery';
|
2
|
+
import func from '../core/func';
|
3
|
+
import lists from '../core/lists';
|
4
|
+
import env from '../core/env';
|
5
|
+
|
6
|
+
export default class Buttons {
|
7
|
+
constructor(context) {
|
8
|
+
this.ui = $.summernote.ui;
|
9
|
+
this.context = context;
|
10
|
+
this.$toolbar = context.layoutInfo.toolbar;
|
11
|
+
this.options = context.options;
|
12
|
+
this.lang = this.options.langInfo;
|
13
|
+
this.invertedKeyMap = func.invertObject(
|
14
|
+
this.options.keyMap[env.isMac ? 'mac' : 'pc']
|
15
|
+
);
|
16
|
+
}
|
17
|
+
|
18
|
+
representShortcut(editorMethod) {
|
19
|
+
let shortcut = this.invertedKeyMap[editorMethod];
|
20
|
+
if (!this.options.shortcuts || !shortcut) {
|
21
|
+
return '';
|
22
|
+
}
|
23
|
+
|
24
|
+
if (env.isMac) {
|
25
|
+
shortcut = shortcut.replace('CMD', '⌘').replace('SHIFT', '⇧');
|
26
|
+
}
|
27
|
+
|
28
|
+
shortcut = shortcut.replace('BACKSLASH', '\\')
|
29
|
+
.replace('SLASH', '/')
|
30
|
+
.replace('LEFTBRACKET', '[')
|
31
|
+
.replace('RIGHTBRACKET', ']');
|
32
|
+
|
33
|
+
return ' (' + shortcut + ')';
|
34
|
+
}
|
35
|
+
|
36
|
+
button(o) {
|
37
|
+
if (!this.options.tooltip && o.tooltip) {
|
38
|
+
delete o.tooltip;
|
39
|
+
}
|
40
|
+
o.container = this.options.container;
|
41
|
+
return this.ui.button(o);
|
42
|
+
}
|
43
|
+
|
44
|
+
initialize() {
|
45
|
+
this.addToolbarButtons();
|
46
|
+
this.addImagePopoverButtons();
|
47
|
+
this.addLinkPopoverButtons();
|
48
|
+
this.addTablePopoverButtons();
|
49
|
+
this.fontInstalledMap = {};
|
50
|
+
}
|
51
|
+
|
52
|
+
destroy() {
|
53
|
+
delete this.fontInstalledMap;
|
54
|
+
}
|
55
|
+
|
56
|
+
isFontInstalled(name) {
|
57
|
+
if (!this.fontInstalledMap.hasOwnProperty(name)) {
|
58
|
+
this.fontInstalledMap[name] = env.isFontInstalled(name) ||
|
59
|
+
lists.contains(this.options.fontNamesIgnoreCheck, name);
|
60
|
+
}
|
61
|
+
|
62
|
+
return this.fontInstalledMap[name];
|
63
|
+
}
|
64
|
+
|
65
|
+
isFontDeservedToAdd(name) {
|
66
|
+
const genericFamilies = ['sans-serif', 'serif', 'monospace', 'cursive', 'fantasy'];
|
67
|
+
name = name.toLowerCase();
|
68
|
+
|
69
|
+
return ((name !== '') && this.isFontInstalled(name) && ($.inArray(name, genericFamilies) === -1));
|
70
|
+
}
|
71
|
+
|
72
|
+
addToolbarButtons() {
|
73
|
+
this.context.memo('button.style', () => {
|
74
|
+
return this.ui.buttonGroup([
|
75
|
+
this.button({
|
76
|
+
className: 'dropdown-toggle',
|
77
|
+
contents: this.ui.dropdownButtonContents(
|
78
|
+
this.ui.icon(this.options.icons.magic), this.options
|
79
|
+
),
|
80
|
+
tooltip: this.lang.style.style,
|
81
|
+
data: {
|
82
|
+
toggle: 'dropdown'
|
83
|
+
}
|
84
|
+
}),
|
85
|
+
this.ui.dropdown({
|
86
|
+
className: 'dropdown-style',
|
87
|
+
items: this.options.styleTags,
|
88
|
+
title: this.lang.style.style,
|
89
|
+
template: (item) => {
|
90
|
+
if (typeof item === 'string') {
|
91
|
+
item = { tag: item, title: (this.lang.style.hasOwnProperty(item) ? this.lang.style[item] : item) };
|
92
|
+
}
|
93
|
+
|
94
|
+
const tag = item.tag;
|
95
|
+
const title = item.title;
|
96
|
+
const style = item.style ? ' style="' + item.style + '" ' : '';
|
97
|
+
const className = item.className ? ' class="' + item.className + '"' : '';
|
98
|
+
|
99
|
+
return '<' + tag + style + className + '>' + title + '</' + tag + '>';
|
100
|
+
},
|
101
|
+
click: this.context.createInvokeHandler('editor.formatBlock')
|
102
|
+
})
|
103
|
+
]).render();
|
104
|
+
});
|
105
|
+
|
106
|
+
for (let styleIdx = 0, styleLen = this.options.styleTags.length; styleIdx < styleLen; styleIdx++) {
|
107
|
+
const item = this.options.styleTags[styleIdx];
|
108
|
+
|
109
|
+
this.context.memo('button.style.' + item, () => {
|
110
|
+
return this.button({
|
111
|
+
className: 'note-btn-style-' + item,
|
112
|
+
contents: '<div data-value="' + item + '">' + item.toUpperCase() + '</div>',
|
113
|
+
tooltip: this.lang.style[item],
|
114
|
+
click: this.context.createInvokeHandler('editor.formatBlock')
|
115
|
+
}).render();
|
116
|
+
});
|
117
|
+
}
|
118
|
+
|
119
|
+
this.context.memo('button.bold', () => {
|
120
|
+
return this.button({
|
121
|
+
className: 'note-btn-bold',
|
122
|
+
contents: this.ui.icon(this.options.icons.bold),
|
123
|
+
tooltip: this.lang.font.bold + this.representShortcut('bold'),
|
124
|
+
click: this.context.createInvokeHandlerAndUpdateState('editor.bold')
|
125
|
+
}).render();
|
126
|
+
});
|
127
|
+
|
128
|
+
this.context.memo('button.italic', () => {
|
129
|
+
return this.button({
|
130
|
+
className: 'note-btn-italic',
|
131
|
+
contents: this.ui.icon(this.options.icons.italic),
|
132
|
+
tooltip: this.lang.font.italic + this.representShortcut('italic'),
|
133
|
+
click: this.context.createInvokeHandlerAndUpdateState('editor.italic')
|
134
|
+
}).render();
|
135
|
+
});
|
136
|
+
|
137
|
+
this.context.memo('button.underline', () => {
|
138
|
+
return this.button({
|
139
|
+
className: 'note-btn-underline',
|
140
|
+
contents: this.ui.icon(this.options.icons.underline),
|
141
|
+
tooltip: this.lang.font.underline + this.representShortcut('underline'),
|
142
|
+
click: this.context.createInvokeHandlerAndUpdateState('editor.underline')
|
143
|
+
}).render();
|
144
|
+
});
|
145
|
+
|
146
|
+
this.context.memo('button.clear', () => {
|
147
|
+
return this.button({
|
148
|
+
contents: this.ui.icon(this.options.icons.eraser),
|
149
|
+
tooltip: this.lang.font.clear + this.representShortcut('removeFormat'),
|
150
|
+
click: this.context.createInvokeHandler('editor.removeFormat')
|
151
|
+
}).render();
|
152
|
+
});
|
153
|
+
|
154
|
+
this.context.memo('button.strikethrough', () => {
|
155
|
+
return this.button({
|
156
|
+
className: 'note-btn-strikethrough',
|
157
|
+
contents: this.ui.icon(this.options.icons.strikethrough),
|
158
|
+
tooltip: this.lang.font.strikethrough + this.representShortcut('strikethrough'),
|
159
|
+
click: this.context.createInvokeHandlerAndUpdateState('editor.strikethrough')
|
160
|
+
}).render();
|
161
|
+
});
|
162
|
+
|
163
|
+
this.context.memo('button.superscript', () => {
|
164
|
+
return this.button({
|
165
|
+
className: 'note-btn-superscript',
|
166
|
+
contents: this.ui.icon(this.options.icons.superscript),
|
167
|
+
tooltip: this.lang.font.superscript,
|
168
|
+
click: this.context.createInvokeHandlerAndUpdateState('editor.superscript')
|
169
|
+
}).render();
|
170
|
+
});
|
171
|
+
|
172
|
+
this.context.memo('button.subscript', () => {
|
173
|
+
return this.button({
|
174
|
+
className: 'note-btn-subscript',
|
175
|
+
contents: this.ui.icon(this.options.icons.subscript),
|
176
|
+
tooltip: this.lang.font.subscript,
|
177
|
+
click: this.context.createInvokeHandlerAndUpdateState('editor.subscript')
|
178
|
+
}).render();
|
179
|
+
});
|
180
|
+
|
181
|
+
this.context.memo('button.fontname', () => {
|
182
|
+
const styleInfo = this.context.invoke('editor.currentStyle');
|
183
|
+
|
184
|
+
// Add 'default' fonts into the fontnames array if not exist
|
185
|
+
$.each(styleInfo['font-family'].split(','), (idx, fontname) => {
|
186
|
+
fontname = fontname.trim().replace(/['"]+/g, '');
|
187
|
+
if (this.isFontDeservedToAdd(fontname)) {
|
188
|
+
if ($.inArray(fontname, this.options.fontNames) === -1) {
|
189
|
+
this.options.fontNames.push(fontname);
|
190
|
+
}
|
191
|
+
}
|
192
|
+
});
|
193
|
+
|
194
|
+
return this.ui.buttonGroup([
|
195
|
+
this.button({
|
196
|
+
className: 'dropdown-toggle',
|
197
|
+
contents: this.ui.dropdownButtonContents(
|
198
|
+
'<span class="note-current-fontname"/>', this.options
|
199
|
+
),
|
200
|
+
tooltip: this.lang.font.name,
|
201
|
+
data: {
|
202
|
+
toggle: 'dropdown'
|
203
|
+
}
|
204
|
+
}),
|
205
|
+
this.ui.dropdownCheck({
|
206
|
+
className: 'dropdown-fontname',
|
207
|
+
checkClassName: this.options.icons.menuCheck,
|
208
|
+
items: this.options.fontNames.filter(this.isFontInstalled.bind(this)),
|
209
|
+
title: this.lang.font.name,
|
210
|
+
template: (item) => {
|
211
|
+
return '<span style="font-family: \'' + item + '\'">' + item + '</span>';
|
212
|
+
},
|
213
|
+
click: this.context.createInvokeHandlerAndUpdateState('editor.fontName')
|
214
|
+
})
|
215
|
+
]).render();
|
216
|
+
});
|
217
|
+
|
218
|
+
this.context.memo('button.fontsize', () => {
|
219
|
+
return this.ui.buttonGroup([
|
220
|
+
this.button({
|
221
|
+
className: 'dropdown-toggle',
|
222
|
+
contents: this.ui.dropdownButtonContents('<span class="note-current-fontsize"/>', this.options),
|
223
|
+
tooltip: this.lang.font.size,
|
224
|
+
data: {
|
225
|
+
toggle: 'dropdown'
|
226
|
+
}
|
227
|
+
}),
|
228
|
+
this.ui.dropdownCheck({
|
229
|
+
className: 'dropdown-fontsize',
|
230
|
+
checkClassName: this.options.icons.menuCheck,
|
231
|
+
items: this.options.fontSizes,
|
232
|
+
title: this.lang.font.size,
|
233
|
+
click: this.context.createInvokeHandlerAndUpdateState('editor.fontSize')
|
234
|
+
})
|
235
|
+
]).render();
|
236
|
+
});
|
237
|
+
|
238
|
+
this.context.memo('button.color', () => {
|
239
|
+
return this.ui.buttonGroup({
|
240
|
+
className: 'note-color',
|
241
|
+
children: [
|
242
|
+
this.button({
|
243
|
+
className: 'note-current-color-button',
|
244
|
+
contents: this.ui.icon(this.options.icons.font + ' note-recent-color'),
|
245
|
+
tooltip: this.lang.color.recent,
|
246
|
+
click: (e) => {
|
247
|
+
const $button = $(e.currentTarget);
|
248
|
+
this.context.invoke('editor.color', {
|
249
|
+
backColor: $button.attr('data-backColor'),
|
250
|
+
foreColor: $button.attr('data-foreColor')
|
251
|
+
});
|
252
|
+
},
|
253
|
+
callback: ($button) => {
|
254
|
+
const $recentColor = $button.find('.note-recent-color');
|
255
|
+
$recentColor.css('background-color', '#FFFF00');
|
256
|
+
$button.attr('data-backColor', '#FFFF00');
|
257
|
+
}
|
258
|
+
}),
|
259
|
+
this.button({
|
260
|
+
className: 'dropdown-toggle',
|
261
|
+
contents: this.ui.dropdownButtonContents('', this.options),
|
262
|
+
tooltip: this.lang.color.more,
|
263
|
+
data: {
|
264
|
+
toggle: 'dropdown'
|
265
|
+
}
|
266
|
+
}),
|
267
|
+
this.ui.dropdown({
|
268
|
+
items: [
|
269
|
+
'<div class="note-palette">',
|
270
|
+
' <div class="note-palette-title">' + this.lang.color.background + '</div>',
|
271
|
+
' <div>',
|
272
|
+
' <button type="button" class="note-color-reset btn btn-light" data-event="backColor" data-value="inherit">',
|
273
|
+
this.lang.color.transparent,
|
274
|
+
' </button>',
|
275
|
+
' </div>',
|
276
|
+
' <div class="note-holder" data-event="backColor"/>',
|
277
|
+
'</div>',
|
278
|
+
'<div class="note-palette">',
|
279
|
+
' <div class="note-palette-title">' + this.lang.color.foreground + '</div>',
|
280
|
+
' <div>',
|
281
|
+
' <button type="button" class="note-color-reset btn btn-light" data-event="removeFormat" data-value="foreColor">',
|
282
|
+
this.lang.color.resetToDefault,
|
283
|
+
' </button>',
|
284
|
+
' </div>',
|
285
|
+
' <div class="note-holder" data-event="foreColor"/>',
|
286
|
+
'</div>'
|
287
|
+
].join(''),
|
288
|
+
callback: ($dropdown) => {
|
289
|
+
$dropdown.find('.note-holder').each((idx, item) => {
|
290
|
+
const $holder = $(item);
|
291
|
+
$holder.append(this.ui.palette({
|
292
|
+
colors: this.options.colors,
|
293
|
+
colorsName: this.options.colorsName,
|
294
|
+
eventName: $holder.data('event'),
|
295
|
+
container: this.options.container,
|
296
|
+
tooltip: this.options.tooltip
|
297
|
+
}).render());
|
298
|
+
});
|
299
|
+
},
|
300
|
+
click: (event) => {
|
301
|
+
const $button = $(event.target);
|
302
|
+
const eventName = $button.data('event');
|
303
|
+
const value = $button.data('value');
|
304
|
+
|
305
|
+
if (eventName && value) {
|
306
|
+
const key = eventName === 'backColor' ? 'background-color' : 'color';
|
307
|
+
const $color = $button.closest('.note-color').find('.note-recent-color');
|
308
|
+
const $currentButton = $button.closest('.note-color').find('.note-current-color-button');
|
309
|
+
|
310
|
+
$color.css(key, value);
|
311
|
+
$currentButton.attr('data-' + eventName, value);
|
312
|
+
this.context.invoke('editor.' + eventName, value);
|
313
|
+
}
|
314
|
+
}
|
315
|
+
})
|
316
|
+
]
|
317
|
+
}).render();
|
318
|
+
});
|
319
|
+
|
320
|
+
this.context.memo('button.ul', () => {
|
321
|
+
return this.button({
|
322
|
+
contents: this.ui.icon(this.options.icons.unorderedlist),
|
323
|
+
tooltip: this.lang.lists.unordered + this.representShortcut('insertUnorderedList'),
|
324
|
+
click: this.context.createInvokeHandler('editor.insertUnorderedList')
|
325
|
+
}).render();
|
326
|
+
});
|
327
|
+
|
328
|
+
this.context.memo('button.ol', () => {
|
329
|
+
return this.button({
|
330
|
+
contents: this.ui.icon(this.options.icons.orderedlist),
|
331
|
+
tooltip: this.lang.lists.ordered + this.representShortcut('insertOrderedList'),
|
332
|
+
click: this.context.createInvokeHandler('editor.insertOrderedList')
|
333
|
+
}).render();
|
334
|
+
});
|
335
|
+
|
336
|
+
const justifyLeft = this.button({
|
337
|
+
contents: this.ui.icon(this.options.icons.alignLeft),
|
338
|
+
tooltip: this.lang.paragraph.left + this.representShortcut('justifyLeft'),
|
339
|
+
click: this.context.createInvokeHandler('editor.justifyLeft')
|
340
|
+
});
|
341
|
+
|
342
|
+
const justifyCenter = this.button({
|
343
|
+
contents: this.ui.icon(this.options.icons.alignCenter),
|
344
|
+
tooltip: this.lang.paragraph.center + this.representShortcut('justifyCenter'),
|
345
|
+
click: this.context.createInvokeHandler('editor.justifyCenter')
|
346
|
+
});
|
347
|
+
|
348
|
+
const justifyRight = this.button({
|
349
|
+
contents: this.ui.icon(this.options.icons.alignRight),
|
350
|
+
tooltip: this.lang.paragraph.right + this.representShortcut('justifyRight'),
|
351
|
+
click: this.context.createInvokeHandler('editor.justifyRight')
|
352
|
+
});
|
353
|
+
|
354
|
+
const justifyFull = this.button({
|
355
|
+
contents: this.ui.icon(this.options.icons.alignJustify),
|
356
|
+
tooltip: this.lang.paragraph.justify + this.representShortcut('justifyFull'),
|
357
|
+
click: this.context.createInvokeHandler('editor.justifyFull')
|
358
|
+
});
|
359
|
+
|
360
|
+
const outdent = this.button({
|
361
|
+
contents: this.ui.icon(this.options.icons.outdent),
|
362
|
+
tooltip: this.lang.paragraph.outdent + this.representShortcut('outdent'),
|
363
|
+
click: this.context.createInvokeHandler('editor.outdent')
|
364
|
+
});
|
365
|
+
|
366
|
+
const indent = this.button({
|
367
|
+
contents: this.ui.icon(this.options.icons.indent),
|
368
|
+
tooltip: this.lang.paragraph.indent + this.representShortcut('indent'),
|
369
|
+
click: this.context.createInvokeHandler('editor.indent')
|
370
|
+
});
|
371
|
+
|
372
|
+
this.context.memo('button.justifyLeft', func.invoke(justifyLeft, 'render'));
|
373
|
+
this.context.memo('button.justifyCenter', func.invoke(justifyCenter, 'render'));
|
374
|
+
this.context.memo('button.justifyRight', func.invoke(justifyRight, 'render'));
|
375
|
+
this.context.memo('button.justifyFull', func.invoke(justifyFull, 'render'));
|
376
|
+
this.context.memo('button.outdent', func.invoke(outdent, 'render'));
|
377
|
+
this.context.memo('button.indent', func.invoke(indent, 'render'));
|
378
|
+
|
379
|
+
this.context.memo('button.paragraph', () => {
|
380
|
+
return this.ui.buttonGroup([
|
381
|
+
this.button({
|
382
|
+
className: 'dropdown-toggle',
|
383
|
+
contents: this.ui.dropdownButtonContents(this.ui.icon(this.options.icons.alignLeft), this.options),
|
384
|
+
tooltip: this.lang.paragraph.paragraph,
|
385
|
+
data: {
|
386
|
+
toggle: 'dropdown'
|
387
|
+
}
|
388
|
+
}),
|
389
|
+
this.ui.dropdown([
|
390
|
+
this.ui.buttonGroup({
|
391
|
+
className: 'note-align',
|
392
|
+
children: [justifyLeft, justifyCenter, justifyRight, justifyFull]
|
393
|
+
}),
|
394
|
+
this.ui.buttonGroup({
|
395
|
+
className: 'note-list',
|
396
|
+
children: [outdent, indent]
|
397
|
+
})
|
398
|
+
])
|
399
|
+
]).render();
|
400
|
+
});
|
401
|
+
|
402
|
+
this.context.memo('button.height', () => {
|
403
|
+
return this.ui.buttonGroup([
|
404
|
+
this.button({
|
405
|
+
className: 'dropdown-toggle',
|
406
|
+
contents: this.ui.dropdownButtonContents(this.ui.icon(this.options.icons.textHeight), this.options),
|
407
|
+
tooltip: this.lang.font.height,
|
408
|
+
data: {
|
409
|
+
toggle: 'dropdown'
|
410
|
+
}
|
411
|
+
}),
|
412
|
+
this.ui.dropdownCheck({
|
413
|
+
items: this.options.lineHeights,
|
414
|
+
checkClassName: this.options.icons.menuCheck,
|
415
|
+
className: 'dropdown-line-height',
|
416
|
+
title: this.lang.font.height,
|
417
|
+
click: this.context.createInvokeHandler('editor.lineHeight')
|
418
|
+
})
|
419
|
+
]).render();
|
420
|
+
});
|
421
|
+
|
422
|
+
this.context.memo('button.table', () => {
|
423
|
+
return this.ui.buttonGroup([
|
424
|
+
this.button({
|
425
|
+
className: 'dropdown-toggle',
|
426
|
+
contents: this.ui.dropdownButtonContents(this.ui.icon(this.options.icons.table), this.options),
|
427
|
+
tooltip: this.lang.table.table,
|
428
|
+
data: {
|
429
|
+
toggle: 'dropdown'
|
430
|
+
}
|
431
|
+
}),
|
432
|
+
this.ui.dropdown({
|
433
|
+
title: this.lang.table.table,
|
434
|
+
className: 'note-table',
|
435
|
+
items: [
|
436
|
+
'<div class="note-dimension-picker">',
|
437
|
+
' <div class="note-dimension-picker-mousecatcher" data-event="insertTable" data-value="1x1"/>',
|
438
|
+
' <div class="note-dimension-picker-highlighted"/>',
|
439
|
+
' <div class="note-dimension-picker-unhighlighted"/>',
|
440
|
+
'</div>',
|
441
|
+
'<div class="note-dimension-display">1 x 1</div>'
|
442
|
+
].join('')
|
443
|
+
})
|
444
|
+
], {
|
445
|
+
callback: ($node) => {
|
446
|
+
const $catcher = $node.find('.note-dimension-picker-mousecatcher');
|
447
|
+
$catcher.css({
|
448
|
+
width: this.options.insertTableMaxSize.col + 'em',
|
449
|
+
height: this.options.insertTableMaxSize.row + 'em'
|
450
|
+
}).mousedown(this.context.createInvokeHandler('editor.insertTable'))
|
451
|
+
.on('mousemove', this.tableMoveHandler.bind(this));
|
452
|
+
}
|
453
|
+
}).render();
|
454
|
+
});
|
455
|
+
|
456
|
+
this.context.memo('button.link', () => {
|
457
|
+
return this.button({
|
458
|
+
contents: this.ui.icon(this.options.icons.link),
|
459
|
+
tooltip: this.lang.link.link + this.representShortcut('linkDialog.show'),
|
460
|
+
click: this.context.createInvokeHandler('linkDialog.show')
|
461
|
+
}).render();
|
462
|
+
});
|
463
|
+
|
464
|
+
this.context.memo('button.picture', () => {
|
465
|
+
return this.button({
|
466
|
+
contents: this.ui.icon(this.options.icons.picture),
|
467
|
+
tooltip: this.lang.image.image,
|
468
|
+
click: this.context.createInvokeHandler('imageDialog.show')
|
469
|
+
}).render();
|
470
|
+
});
|
471
|
+
|
472
|
+
this.context.memo('button.video', () => {
|
473
|
+
return this.button({
|
474
|
+
contents: this.ui.icon(this.options.icons.video),
|
475
|
+
tooltip: this.lang.video.video,
|
476
|
+
click: this.context.createInvokeHandler('videoDialog.show')
|
477
|
+
}).render();
|
478
|
+
});
|
479
|
+
|
480
|
+
this.context.memo('button.hr', () => {
|
481
|
+
return this.button({
|
482
|
+
contents: this.ui.icon(this.options.icons.minus),
|
483
|
+
tooltip: this.lang.hr.insert + this.representShortcut('insertHorizontalRule'),
|
484
|
+
click: this.context.createInvokeHandler('editor.insertHorizontalRule')
|
485
|
+
}).render();
|
486
|
+
});
|
487
|
+
|
488
|
+
this.context.memo('button.fullscreen', () => {
|
489
|
+
return this.button({
|
490
|
+
className: 'btn-fullscreen',
|
491
|
+
contents: this.ui.icon(this.options.icons.arrowsAlt),
|
492
|
+
tooltip: this.lang.options.fullscreen,
|
493
|
+
click: this.context.createInvokeHandler('fullscreen.toggle')
|
494
|
+
}).render();
|
495
|
+
});
|
496
|
+
|
497
|
+
this.context.memo('button.codeview', () => {
|
498
|
+
return this.button({
|
499
|
+
className: 'btn-codeview',
|
500
|
+
contents: this.ui.icon(this.options.icons.code),
|
501
|
+
tooltip: this.lang.options.codeview,
|
502
|
+
click: this.context.createInvokeHandler('codeview.toggle')
|
503
|
+
}).render();
|
504
|
+
});
|
505
|
+
|
506
|
+
this.context.memo('button.redo', () => {
|
507
|
+
return this.button({
|
508
|
+
contents: this.ui.icon(this.options.icons.redo),
|
509
|
+
tooltip: this.lang.history.redo + this.representShortcut('redo'),
|
510
|
+
click: this.context.createInvokeHandler('editor.redo')
|
511
|
+
}).render();
|
512
|
+
});
|
513
|
+
|
514
|
+
this.context.memo('button.undo', () => {
|
515
|
+
return this.button({
|
516
|
+
contents: this.ui.icon(this.options.icons.undo),
|
517
|
+
tooltip: this.lang.history.undo + this.representShortcut('undo'),
|
518
|
+
click: this.context.createInvokeHandler('editor.undo')
|
519
|
+
}).render();
|
520
|
+
});
|
521
|
+
|
522
|
+
this.context.memo('button.help', () => {
|
523
|
+
return this.button({
|
524
|
+
contents: this.ui.icon(this.options.icons.question),
|
525
|
+
tooltip: this.lang.options.help,
|
526
|
+
click: this.context.createInvokeHandler('helpDialog.show')
|
527
|
+
}).render();
|
528
|
+
});
|
529
|
+
}
|
530
|
+
|
531
|
+
/**
|
532
|
+
* image : [
|
533
|
+
* ['imagesize', ['imageSize100', 'imageSize50', 'imageSize25']],
|
534
|
+
* ['float', ['floatLeft', 'floatRight', 'floatNone' ]],
|
535
|
+
* ['remove', ['removeMedia']]
|
536
|
+
* ],
|
537
|
+
*/
|
538
|
+
addImagePopoverButtons() {
|
539
|
+
// Image Size Buttons
|
540
|
+
this.context.memo('button.imageSize100', () => {
|
541
|
+
return this.button({
|
542
|
+
contents: '<span class="note-fontsize-10">100%</span>',
|
543
|
+
tooltip: this.lang.image.resizeFull,
|
544
|
+
click: this.context.createInvokeHandler('editor.resize', '1')
|
545
|
+
}).render();
|
546
|
+
});
|
547
|
+
this.context.memo('button.imageSize50', () => {
|
548
|
+
return this.button({
|
549
|
+
contents: '<span class="note-fontsize-10">50%</span>',
|
550
|
+
tooltip: this.lang.image.resizeHalf,
|
551
|
+
click: this.context.createInvokeHandler('editor.resize', '0.5')
|
552
|
+
}).render();
|
553
|
+
});
|
554
|
+
this.context.memo('button.imageSize25', () => {
|
555
|
+
return this.button({
|
556
|
+
contents: '<span class="note-fontsize-10">25%</span>',
|
557
|
+
tooltip: this.lang.image.resizeQuarter,
|
558
|
+
click: this.context.createInvokeHandler('editor.resize', '0.25')
|
559
|
+
}).render();
|
560
|
+
});
|
561
|
+
|
562
|
+
// Float Buttons
|
563
|
+
this.context.memo('button.floatLeft', () => {
|
564
|
+
return this.button({
|
565
|
+
contents: this.ui.icon(this.options.icons.alignLeft),
|
566
|
+
tooltip: this.lang.image.floatLeft,
|
567
|
+
click: this.context.createInvokeHandler('editor.floatMe', 'left')
|
568
|
+
}).render();
|
569
|
+
});
|
570
|
+
|
571
|
+
this.context.memo('button.floatRight', () => {
|
572
|
+
return this.button({
|
573
|
+
contents: this.ui.icon(this.options.icons.alignRight),
|
574
|
+
tooltip: this.lang.image.floatRight,
|
575
|
+
click: this.context.createInvokeHandler('editor.floatMe', 'right')
|
576
|
+
}).render();
|
577
|
+
});
|
578
|
+
|
579
|
+
this.context.memo('button.floatNone', () => {
|
580
|
+
return this.button({
|
581
|
+
contents: this.ui.icon(this.options.icons.alignJustify),
|
582
|
+
tooltip: this.lang.image.floatNone,
|
583
|
+
click: this.context.createInvokeHandler('editor.floatMe', 'none')
|
584
|
+
}).render();
|
585
|
+
});
|
586
|
+
|
587
|
+
// Remove Buttons
|
588
|
+
this.context.memo('button.removeMedia', () => {
|
589
|
+
return this.button({
|
590
|
+
contents: this.ui.icon(this.options.icons.trash),
|
591
|
+
tooltip: this.lang.image.remove,
|
592
|
+
click: this.context.createInvokeHandler('editor.removeMedia')
|
593
|
+
}).render();
|
594
|
+
});
|
595
|
+
}
|
596
|
+
|
597
|
+
addLinkPopoverButtons() {
|
598
|
+
this.context.memo('button.linkDialogShow', () => {
|
599
|
+
return this.button({
|
600
|
+
contents: this.ui.icon(this.options.icons.link),
|
601
|
+
tooltip: this.lang.link.edit,
|
602
|
+
click: this.context.createInvokeHandler('linkDialog.show')
|
603
|
+
}).render();
|
604
|
+
});
|
605
|
+
|
606
|
+
this.context.memo('button.unlink', () => {
|
607
|
+
return this.button({
|
608
|
+
contents: this.ui.icon(this.options.icons.unlink),
|
609
|
+
tooltip: this.lang.link.unlink,
|
610
|
+
click: this.context.createInvokeHandler('editor.unlink')
|
611
|
+
}).render();
|
612
|
+
});
|
613
|
+
}
|
614
|
+
|
615
|
+
/**
|
616
|
+
* table : [
|
617
|
+
* ['add', ['addRowDown', 'addRowUp', 'addColLeft', 'addColRight']],
|
618
|
+
* ['delete', ['deleteRow', 'deleteCol', 'deleteTable']]
|
619
|
+
* ],
|
620
|
+
*/
|
621
|
+
addTablePopoverButtons() {
|
622
|
+
this.context.memo('button.addRowUp', () => {
|
623
|
+
return this.button({
|
624
|
+
className: 'btn-md',
|
625
|
+
contents: this.ui.icon(this.options.icons.rowAbove),
|
626
|
+
tooltip: this.lang.table.addRowAbove,
|
627
|
+
click: this.context.createInvokeHandler('editor.addRow', 'top')
|
628
|
+
}).render();
|
629
|
+
});
|
630
|
+
this.context.memo('button.addRowDown', () => {
|
631
|
+
return this.button({
|
632
|
+
className: 'btn-md',
|
633
|
+
contents: this.ui.icon(this.options.icons.rowBelow),
|
634
|
+
tooltip: this.lang.table.addRowBelow,
|
635
|
+
click: this.context.createInvokeHandler('editor.addRow', 'bottom')
|
636
|
+
}).render();
|
637
|
+
});
|
638
|
+
this.context.memo('button.addColLeft', () => {
|
639
|
+
return this.button({
|
640
|
+
className: 'btn-md',
|
641
|
+
contents: this.ui.icon(this.options.icons.colBefore),
|
642
|
+
tooltip: this.lang.table.addColLeft,
|
643
|
+
click: this.context.createInvokeHandler('editor.addCol', 'left')
|
644
|
+
}).render();
|
645
|
+
});
|
646
|
+
this.context.memo('button.addColRight', () => {
|
647
|
+
return this.button({
|
648
|
+
className: 'btn-md',
|
649
|
+
contents: this.ui.icon(this.options.icons.colAfter),
|
650
|
+
tooltip: this.lang.table.addColRight,
|
651
|
+
click: this.context.createInvokeHandler('editor.addCol', 'right')
|
652
|
+
}).render();
|
653
|
+
});
|
654
|
+
this.context.memo('button.deleteRow', () => {
|
655
|
+
return this.button({
|
656
|
+
className: 'btn-md',
|
657
|
+
contents: this.ui.icon(this.options.icons.rowRemove),
|
658
|
+
tooltip: this.lang.table.delRow,
|
659
|
+
click: this.context.createInvokeHandler('editor.deleteRow')
|
660
|
+
}).render();
|
661
|
+
});
|
662
|
+
this.context.memo('button.deleteCol', () => {
|
663
|
+
return this.button({
|
664
|
+
className: 'btn-md',
|
665
|
+
contents: this.ui.icon(this.options.icons.colRemove),
|
666
|
+
tooltip: this.lang.table.delCol,
|
667
|
+
click: this.context.createInvokeHandler('editor.deleteCol')
|
668
|
+
}).render();
|
669
|
+
});
|
670
|
+
this.context.memo('button.deleteTable', () => {
|
671
|
+
return this.button({
|
672
|
+
className: 'btn-md',
|
673
|
+
contents: this.ui.icon(this.options.icons.trash),
|
674
|
+
tooltip: this.lang.table.delTable,
|
675
|
+
click: this.context.createInvokeHandler('editor.deleteTable')
|
676
|
+
}).render();
|
677
|
+
});
|
678
|
+
}
|
679
|
+
|
680
|
+
build($container, groups) {
|
681
|
+
for (let groupIdx = 0, groupLen = groups.length; groupIdx < groupLen; groupIdx++) {
|
682
|
+
const group = groups[groupIdx];
|
683
|
+
const groupName = $.isArray(group) ? group[0] : group;
|
684
|
+
const buttons = $.isArray(group) ? ((group.length === 1) ? [group[0]] : group[1]) : [group];
|
685
|
+
|
686
|
+
const $group = this.ui.buttonGroup({
|
687
|
+
className: 'note-' + groupName
|
688
|
+
}).render();
|
689
|
+
|
690
|
+
for (let idx = 0, len = buttons.length; idx < len; idx++) {
|
691
|
+
const btn = this.context.memo('button.' + buttons[idx]);
|
692
|
+
if (btn) {
|
693
|
+
$group.append(typeof btn === 'function' ? btn(this.context) : btn);
|
694
|
+
}
|
695
|
+
}
|
696
|
+
$group.appendTo($container);
|
697
|
+
}
|
698
|
+
}
|
699
|
+
|
700
|
+
/**
|
701
|
+
* @param {jQuery} [$container]
|
702
|
+
*/
|
703
|
+
updateCurrentStyle($container) {
|
704
|
+
const $cont = $container || this.$toolbar;
|
705
|
+
|
706
|
+
const styleInfo = this.context.invoke('editor.currentStyle');
|
707
|
+
this.updateBtnStates($cont, {
|
708
|
+
'.note-btn-bold': () => {
|
709
|
+
return styleInfo['font-bold'] === 'bold';
|
710
|
+
},
|
711
|
+
'.note-btn-italic': () => {
|
712
|
+
return styleInfo['font-italic'] === 'italic';
|
713
|
+
},
|
714
|
+
'.note-btn-underline': () => {
|
715
|
+
return styleInfo['font-underline'] === 'underline';
|
716
|
+
},
|
717
|
+
'.note-btn-subscript': () => {
|
718
|
+
return styleInfo['font-subscript'] === 'subscript';
|
719
|
+
},
|
720
|
+
'.note-btn-superscript': () => {
|
721
|
+
return styleInfo['font-superscript'] === 'superscript';
|
722
|
+
},
|
723
|
+
'.note-btn-strikethrough': () => {
|
724
|
+
return styleInfo['font-strikethrough'] === 'strikethrough';
|
725
|
+
}
|
726
|
+
});
|
727
|
+
|
728
|
+
if (styleInfo['font-family']) {
|
729
|
+
const fontNames = styleInfo['font-family'].split(',').map((name) => {
|
730
|
+
return name.replace(/[\'\"]/g, '')
|
731
|
+
.replace(/\s+$/, '')
|
732
|
+
.replace(/^\s+/, '');
|
733
|
+
});
|
734
|
+
const fontName = lists.find(fontNames, this.isFontInstalled.bind(this));
|
735
|
+
|
736
|
+
$cont.find('.dropdown-fontname a').each((idx, item) => {
|
737
|
+
const $item = $(item);
|
738
|
+
// always compare string to avoid creating another func.
|
739
|
+
const isChecked = ($item.data('value') + '') === (fontName + '');
|
740
|
+
$item.toggleClass('checked', isChecked);
|
741
|
+
});
|
742
|
+
$cont.find('.note-current-fontname').text(fontName).css('font-family', fontName);
|
743
|
+
}
|
744
|
+
|
745
|
+
if (styleInfo['font-size']) {
|
746
|
+
const fontSize = styleInfo['font-size'];
|
747
|
+
$cont.find('.dropdown-fontsize a').each((idx, item) => {
|
748
|
+
const $item = $(item);
|
749
|
+
// always compare with string to avoid creating another func.
|
750
|
+
const isChecked = ($item.data('value') + '') === (fontSize + '');
|
751
|
+
$item.toggleClass('checked', isChecked);
|
752
|
+
});
|
753
|
+
$cont.find('.note-current-fontsize').text(fontSize);
|
754
|
+
}
|
755
|
+
|
756
|
+
if (styleInfo['line-height']) {
|
757
|
+
const lineHeight = styleInfo['line-height'];
|
758
|
+
$cont.find('.dropdown-line-height li a').each((idx, item) => {
|
759
|
+
// always compare with string to avoid creating another func.
|
760
|
+
const isChecked = ($(item).data('value') + '') === (lineHeight + '');
|
761
|
+
this.className = isChecked ? 'checked' : '';
|
762
|
+
});
|
763
|
+
}
|
764
|
+
}
|
765
|
+
|
766
|
+
updateBtnStates($container, infos) {
|
767
|
+
$.each(infos, (selector, pred) => {
|
768
|
+
this.ui.toggleBtnActive($container.find(selector), pred());
|
769
|
+
});
|
770
|
+
}
|
771
|
+
|
772
|
+
tableMoveHandler(event) {
|
773
|
+
const PX_PER_EM = 18;
|
774
|
+
const $picker = $(event.target.parentNode); // target is mousecatcher
|
775
|
+
const $dimensionDisplay = $picker.next();
|
776
|
+
const $catcher = $picker.find('.note-dimension-picker-mousecatcher');
|
777
|
+
const $highlighted = $picker.find('.note-dimension-picker-highlighted');
|
778
|
+
const $unhighlighted = $picker.find('.note-dimension-picker-unhighlighted');
|
779
|
+
|
780
|
+
let posOffset;
|
781
|
+
// HTML5 with jQuery - e.offsetX is undefined in Firefox
|
782
|
+
if (event.offsetX === undefined) {
|
783
|
+
const posCatcher = $(event.target).offset();
|
784
|
+
posOffset = {
|
785
|
+
x: event.pageX - posCatcher.left,
|
786
|
+
y: event.pageY - posCatcher.top
|
787
|
+
};
|
788
|
+
} else {
|
789
|
+
posOffset = {
|
790
|
+
x: event.offsetX,
|
791
|
+
y: event.offsetY
|
792
|
+
};
|
793
|
+
}
|
794
|
+
|
795
|
+
const dim = {
|
796
|
+
c: Math.ceil(posOffset.x / PX_PER_EM) || 1,
|
797
|
+
r: Math.ceil(posOffset.y / PX_PER_EM) || 1
|
798
|
+
};
|
799
|
+
|
800
|
+
$highlighted.css({ width: dim.c + 'em', height: dim.r + 'em' });
|
801
|
+
$catcher.data('value', dim.c + 'x' + dim.r);
|
802
|
+
|
803
|
+
if (dim.c > 3 && dim.c < this.options.insertTableMaxSize.col) {
|
804
|
+
$unhighlighted.css({ width: dim.c + 1 + 'em' });
|
805
|
+
}
|
806
|
+
|
807
|
+
if (dim.r > 3 && dim.r < this.options.insertTableMaxSize.row) {
|
808
|
+
$unhighlighted.css({ height: dim.r + 1 + 'em' });
|
809
|
+
}
|
810
|
+
|
811
|
+
$dimensionDisplay.html(dim.c + ' x ' + dim.r);
|
812
|
+
}
|
813
|
+
}
|