bedrock_sass 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/assets/_vendor/ace/ace.js +255 -589
- data/assets/_vendor/ace/ext-beautify.js +1 -2
- data/assets/_vendor/ace/ext-elastic_tabstops_lite.js +2 -2
- data/assets/_vendor/ace/ext-emmet.js +4 -4
- data/assets/_vendor/ace/ext-error_marker.js +1 -2
- data/assets/_vendor/ace/ext-keybinding_menu.js +1 -2
- data/assets/_vendor/ace/ext-language_tools.js +5 -9
- data/assets/_vendor/ace/ext-linking.js +1 -2
- data/assets/_vendor/ace/ext-modelist.js +9 -5
- data/assets/_vendor/ace/ext-options.js +10 -7
- data/assets/_vendor/ace/ext-rtl.js +1 -2
- data/assets/_vendor/ace/ext-searchbox.js +8 -4
- data/assets/_vendor/ace/ext-settings_menu.js +10 -7
- data/assets/_vendor/ace/ext-spellcheck.js +1 -2
- data/assets/_vendor/ace/ext-split.js +1 -2
- data/assets/_vendor/ace/ext-static_highlight.js +11 -8
- data/assets/_vendor/ace/ext-statusbar.js +1 -2
- data/assets/_vendor/ace/ext-textarea.js +1 -5
- data/assets/_vendor/ace/ext-themelist.js +2 -4
- data/assets/_vendor/ace/ext-whitespace.js +1 -2
- data/assets/_vendor/ace/keybinding-emacs.js +6 -2
- data/assets/_vendor/ace/keybinding-vim.js +13 -25
- data/assets/_vendor/ace/mode-abap.js +2 -3
- data/assets/_vendor/ace/mode-abc.js +3 -2
- data/assets/_vendor/ace/mode-actionscript.js +2 -2
- data/assets/_vendor/ace/mode-ada.js +1 -2
- data/assets/_vendor/ace/mode-apache_conf.js +2 -2
- data/assets/_vendor/ace/mode-apex.js +457 -0
- data/assets/_vendor/ace/mode-applescript.js +1 -2
- data/assets/_vendor/ace/mode-asciidoc.js +2 -2
- data/assets/_vendor/ace/mode-asl.js +1 -2
- data/assets/_vendor/ace/mode-assembly_x86.js +2 -2
- data/assets/_vendor/ace/mode-autohotkey.js +1 -2
- data/assets/_vendor/ace/mode-batchfile.js +2 -2
- data/assets/_vendor/ace/mode-bro.js +2 -2
- data/assets/_vendor/ace/mode-c9search.js +1 -2
- data/assets/_vendor/ace/mode-c_cpp.js +2 -2
- data/assets/_vendor/ace/mode-cirru.js +1 -2
- data/assets/_vendor/ace/mode-clojure.js +2 -2
- data/assets/_vendor/ace/mode-cobol.js +1 -2
- data/assets/_vendor/ace/mode-coffee.js +1 -2
- data/assets/_vendor/ace/mode-coldfusion.js +3 -2
- data/assets/_vendor/ace/mode-csharp.js +3 -3
- data/assets/_vendor/ace/mode-csound_document.js +319 -80
- data/assets/_vendor/ace/mode-csound_orchestra.js +323 -86
- data/assets/_vendor/ace/mode-csound_score.js +1 -2
- data/assets/_vendor/ace/mode-csp.js +1 -2
- data/assets/_vendor/ace/mode-css.js +2 -2
- data/assets/_vendor/ace/mode-curly.js +3 -2
- data/assets/_vendor/ace/mode-d.js +2 -2
- data/assets/_vendor/ace/mode-dart.js +24 -14
- data/assets/_vendor/ace/mode-diff.js +4 -4
- data/assets/_vendor/ace/mode-django.js +3 -2
- data/assets/_vendor/ace/mode-dockerfile.js +3 -2
- data/assets/_vendor/ace/mode-dot.js +1 -2
- data/assets/_vendor/ace/mode-drools.js +3 -2
- data/assets/_vendor/ace/mode-edifact.js +2 -2
- data/assets/_vendor/ace/mode-eiffel.js +1 -2
- data/assets/_vendor/ace/mode-ejs.js +5 -2
- data/assets/_vendor/ace/mode-elixir.js +2 -2
- data/assets/_vendor/ace/mode-elm.js +1 -2
- data/assets/_vendor/ace/mode-erlang.js +2 -2
- data/assets/_vendor/ace/mode-forth.js +2 -2
- data/assets/_vendor/ace/mode-fortran.js +1 -2
- data/assets/_vendor/ace/mode-fsharp.js +1 -2
- data/assets/_vendor/ace/mode-fsl.js +258 -0
- data/assets/_vendor/ace/mode-ftl.js +3 -2
- data/assets/_vendor/ace/mode-gcode.js +1 -2
- data/assets/_vendor/ace/mode-gherkin.js +2 -4
- data/assets/_vendor/ace/mode-gitignore.js +1 -2
- data/assets/_vendor/ace/mode-glsl.js +2 -2
- data/assets/_vendor/ace/mode-gobstones.js +3 -2
- data/assets/_vendor/ace/mode-golang.js +1 -2
- data/assets/_vendor/ace/mode-graphqlschema.js +1 -2
- data/assets/_vendor/ace/mode-groovy.js +4 -2
- data/assets/_vendor/ace/mode-haml.js +5 -2
- data/assets/_vendor/ace/mode-handlebars.js +3 -2
- data/assets/_vendor/ace/mode-haskell.js +2 -2
- data/assets/_vendor/ace/mode-haskell_cabal.js +1 -2
- data/assets/_vendor/ace/mode-haxe.js +2 -2
- data/assets/_vendor/ace/mode-hjson.js +2 -2
- data/assets/_vendor/ace/mode-html.js +3 -2
- data/assets/_vendor/ace/mode-html_elixir.js +4 -2
- data/assets/_vendor/ace/mode-html_ruby.js +5 -2
- data/assets/_vendor/ace/mode-ini.js +1 -2
- data/assets/_vendor/ace/mode-io.js +2 -2
- data/assets/_vendor/ace/mode-jack.js +1 -2
- data/assets/_vendor/ace/mode-jade.js +14 -115
- data/assets/_vendor/ace/mode-java.js +64 -3
- data/assets/_vendor/ace/mode-javascript.js +2 -2
- data/assets/_vendor/ace/mode-json.js +1 -2
- data/assets/_vendor/ace/mode-jsoniq.js +8 -2317
- data/assets/_vendor/ace/mode-jsp.js +4 -2
- data/assets/_vendor/ace/mode-jssm.js +2 -2
- data/assets/_vendor/ace/mode-jsx.js +1 -2
- data/assets/_vendor/ace/mode-julia.js +2 -2
- data/assets/_vendor/ace/mode-kotlin.js +2 -2
- data/assets/_vendor/ace/mode-latex.js +1 -2
- data/assets/_vendor/ace/mode-less.js +4 -2
- data/assets/_vendor/ace/mode-liquid.js +2026 -477
- data/assets/_vendor/ace/mode-lisp.js +2 -2
- data/assets/_vendor/ace/mode-livescript.js +1 -2
- data/assets/_vendor/ace/mode-logiql.js +2 -2
- data/assets/_vendor/ace/mode-logtalk.js +352 -0
- data/assets/_vendor/ace/mode-lsl.js +1 -2
- data/assets/_vendor/ace/mode-lua.js +1 -2
- data/assets/_vendor/ace/mode-luapage.js +3 -2
- data/assets/_vendor/ace/mode-lucene.js +2 -3
- data/assets/_vendor/ace/mode-makefile.js +3 -2
- data/assets/_vendor/ace/mode-markdown.js +5 -2
- data/assets/_vendor/ace/mode-mask.js +3 -2
- data/assets/_vendor/ace/mode-matlab.js +1 -2
- data/assets/_vendor/ace/mode-maze.js +2 -2
- data/assets/_vendor/ace/mode-mel.js +2 -2
- data/assets/_vendor/ace/mode-mixal.js +1 -2
- data/assets/_vendor/ace/mode-mushcode.js +2 -2
- data/assets/_vendor/ace/mode-mysql.js +3 -4
- data/assets/_vendor/ace/mode-nix.js +2 -2
- data/assets/_vendor/ace/mode-nsis.js +2 -2
- data/assets/_vendor/ace/mode-objectivec.js +3 -2
- data/assets/_vendor/ace/mode-ocaml.js +1 -2
- data/assets/_vendor/ace/mode-pascal.js +2 -2
- data/assets/_vendor/ace/mode-perl.js +2 -2
- data/assets/_vendor/ace/mode-perl6.js +593 -0
- data/assets/_vendor/ace/mode-pgsql.js +304 -69
- data/assets/_vendor/ace/mode-php.js +844 -1029
- data/assets/_vendor/ace/mode-php_laravel_blade.js +844 -1029
- data/assets/_vendor/ace/mode-pig.js +2 -2
- data/assets/_vendor/ace/mode-plain_text.js +1 -2
- data/assets/_vendor/ace/mode-powershell.js +2 -2
- data/assets/_vendor/ace/mode-praat.js +2 -2
- data/assets/_vendor/ace/mode-prolog.js +2 -2
- data/assets/_vendor/ace/mode-properties.js +1 -2
- data/assets/_vendor/ace/mode-protobuf.js +2 -2
- data/assets/_vendor/ace/mode-puppet.js +1 -2
- data/assets/_vendor/ace/mode-python.js +297 -63
- data/assets/_vendor/ace/mode-r.js +3 -2
- data/assets/_vendor/ace/mode-razor.js +9 -3
- data/assets/_vendor/ace/mode-rdoc.js +2 -2
- data/assets/_vendor/ace/mode-red.js +2 -2
- data/assets/_vendor/ace/mode-redshift.js +1 -2
- data/assets/_vendor/ace/mode-rhtml.js +5 -2
- data/assets/_vendor/ace/mode-rst.js +1 -2
- data/assets/_vendor/ace/mode-ruby.js +3 -2
- data/assets/_vendor/ace/mode-rust.js +2 -2
- data/assets/_vendor/ace/mode-sass.js +205 -117
- data/assets/_vendor/ace/mode-scad.js +2 -2
- data/assets/_vendor/ace/mode-scala.js +3 -2
- data/assets/_vendor/ace/mode-scheme.js +2 -2
- data/assets/_vendor/ace/mode-scss.js +204 -115
- data/assets/_vendor/ace/mode-sh.js +3 -2
- data/assets/_vendor/ace/mode-sjs.js +2 -2
- data/assets/_vendor/ace/mode-slim.js +18 -117
- data/assets/_vendor/ace/mode-smarty.js +3 -2
- data/assets/_vendor/ace/mode-snippets.js +1 -2
- data/assets/_vendor/ace/mode-soy_template.js +4 -2
- data/assets/_vendor/ace/mode-space.js +1 -2
- data/assets/_vendor/ace/mode-sparql.js +2 -2
- data/assets/_vendor/ace/mode-sql.js +2 -3
- data/assets/_vendor/ace/mode-sqlserver.js +2 -2
- data/assets/_vendor/ace/mode-stylus.js +3 -2
- data/assets/_vendor/ace/mode-svg.js +2 -2
- data/assets/_vendor/ace/mode-swift.js +1 -2
- data/assets/_vendor/ace/mode-tcl.js +2 -2
- data/assets/_vendor/ace/mode-terraform.js +1 -2
- data/assets/_vendor/ace/mode-tex.js +2 -2
- data/assets/_vendor/ace/mode-text.js +1 -2
- data/assets/_vendor/ace/mode-textile.js +1 -2
- data/assets/_vendor/ace/mode-toml.js +1 -2
- data/assets/_vendor/ace/mode-tsx.js +2 -2
- data/assets/_vendor/ace/mode-turtle.js +2 -2
- data/assets/_vendor/ace/mode-twig.js +3 -2
- data/assets/_vendor/ace/mode-typescript.js +2 -2
- data/assets/_vendor/ace/mode-vala.js +2 -2
- data/assets/_vendor/ace/mode-vbscript.js +1 -2
- data/assets/_vendor/ace/mode-velocity.js +4 -2
- data/assets/_vendor/ace/mode-verilog.js +1 -2
- data/assets/_vendor/ace/mode-vhdl.js +1 -2
- data/assets/_vendor/ace/mode-visualforce.js +2641 -0
- data/assets/_vendor/ace/mode-wollok.js +3 -2
- data/assets/_vendor/ace/mode-xml.js +1 -2
- data/assets/_vendor/ace/mode-xquery.js +8 -2287
- data/assets/_vendor/ace/mode-yaml.js +1 -2
- data/assets/_vendor/ace/snippets/abap.js +2 -3
- data/assets/_vendor/ace/snippets/abc.js +1 -2
- data/assets/_vendor/ace/snippets/actionscript.js +1 -2
- data/assets/_vendor/ace/snippets/ada.js +2 -3
- data/assets/_vendor/ace/snippets/apache_conf.js +2 -3
- data/assets/_vendor/ace/snippets/apex.js +14 -0
- data/assets/_vendor/ace/snippets/applescript.js +2 -3
- data/assets/_vendor/ace/snippets/asciidoc.js +2 -3
- data/assets/_vendor/ace/snippets/asl.js +2 -3
- data/assets/_vendor/ace/snippets/assembly_x86.js +2 -3
- data/assets/_vendor/ace/snippets/autohotkey.js +2 -3
- data/assets/_vendor/ace/snippets/batchfile.js +2 -3
- data/assets/_vendor/ace/snippets/bro.js +1 -2
- data/assets/_vendor/ace/snippets/c9search.js +2 -3
- data/assets/_vendor/ace/snippets/c_cpp.js +1 -2
- data/assets/_vendor/ace/snippets/cirru.js +2 -3
- data/assets/_vendor/ace/snippets/clojure.js +1 -2
- data/assets/_vendor/ace/snippets/cobol.js +2 -3
- data/assets/_vendor/ace/snippets/coffee.js +1 -2
- data/assets/_vendor/ace/snippets/coldfusion.js +2 -3
- data/assets/_vendor/ace/snippets/csharp.js +2 -3
- data/assets/_vendor/ace/snippets/csound_document.js +1 -2
- data/assets/_vendor/ace/snippets/csound_orchestra.js +1 -2
- data/assets/_vendor/ace/snippets/csound_score.js +2 -3
- data/assets/_vendor/ace/snippets/csp.js +1 -2
- data/assets/_vendor/ace/snippets/css.js +1 -2
- data/assets/_vendor/ace/snippets/curly.js +2 -3
- data/assets/_vendor/ace/snippets/d.js +2 -3
- data/assets/_vendor/ace/snippets/dart.js +1 -2
- data/assets/_vendor/ace/snippets/diff.js +1 -2
- data/assets/_vendor/ace/snippets/django.js +1 -2
- data/assets/_vendor/ace/snippets/dockerfile.js +2 -3
- data/assets/_vendor/ace/snippets/dot.js +2 -3
- data/assets/_vendor/ace/snippets/drools.js +1 -2
- data/assets/_vendor/ace/snippets/edifact.js +1 -2
- data/assets/_vendor/ace/snippets/eiffel.js +2 -3
- data/assets/_vendor/ace/snippets/ejs.js +2 -3
- data/assets/_vendor/ace/snippets/elixir.js +1 -2
- data/assets/_vendor/ace/snippets/elm.js +2 -3
- data/assets/_vendor/ace/snippets/erlang.js +1 -2
- data/assets/_vendor/ace/snippets/forth.js +2 -3
- data/assets/_vendor/ace/snippets/fortran.js +2 -3
- data/assets/_vendor/ace/snippets/fsharp.js +2 -3
- data/assets/_vendor/ace/snippets/fsl.js +14 -0
- data/assets/_vendor/ace/snippets/ftl.js +2 -3
- data/assets/_vendor/ace/snippets/gcode.js +2 -3
- data/assets/_vendor/ace/snippets/gherkin.js +2 -3
- data/assets/_vendor/ace/snippets/gitignore.js +2 -3
- data/assets/_vendor/ace/snippets/glsl.js +2 -3
- data/assets/_vendor/ace/snippets/gobstones.js +1 -2
- data/assets/_vendor/ace/snippets/golang.js +2 -3
- data/assets/_vendor/ace/snippets/graphqlschema.js +1 -2
- data/assets/_vendor/ace/snippets/groovy.js +2 -3
- data/assets/_vendor/ace/snippets/haml.js +1 -2
- data/assets/_vendor/ace/snippets/handlebars.js +2 -3
- data/assets/_vendor/ace/snippets/haskell.js +1 -2
- data/assets/_vendor/ace/snippets/haskell_cabal.js +2 -3
- data/assets/_vendor/ace/snippets/haxe.js +2 -3
- data/assets/_vendor/ace/snippets/hjson.js +1 -2
- data/assets/_vendor/ace/snippets/html.js +1 -2
- data/assets/_vendor/ace/snippets/html_elixir.js +2 -3
- data/assets/_vendor/ace/snippets/html_ruby.js +2 -3
- data/assets/_vendor/ace/snippets/ini.js +2 -3
- data/assets/_vendor/ace/snippets/io.js +1 -2
- data/assets/_vendor/ace/snippets/jack.js +2 -3
- data/assets/_vendor/ace/snippets/jade.js +2 -3
- data/assets/_vendor/ace/snippets/java.js +1 -2
- data/assets/_vendor/ace/snippets/javascript.js +1 -2
- data/assets/_vendor/ace/snippets/json.js +2 -3
- data/assets/_vendor/ace/snippets/jsoniq.js +1 -2
- data/assets/_vendor/ace/snippets/jsp.js +1 -2
- data/assets/_vendor/ace/snippets/jssm.js +1 -2
- data/assets/_vendor/ace/snippets/jsx.js +2 -3
- data/assets/_vendor/ace/snippets/julia.js +2 -3
- data/assets/_vendor/ace/snippets/kotlin.js +1 -2
- data/assets/_vendor/ace/snippets/latex.js +2 -3
- data/assets/_vendor/ace/snippets/less.js +2 -3
- data/assets/_vendor/ace/snippets/liquid.js +883 -3
- data/assets/_vendor/ace/snippets/lisp.js +2 -3
- data/assets/_vendor/ace/snippets/livescript.js +2 -3
- data/assets/_vendor/ace/snippets/logiql.js +2 -3
- data/assets/_vendor/ace/snippets/logtalk.js +14 -0
- data/assets/_vendor/ace/snippets/lsl.js +1 -2
- data/assets/_vendor/ace/snippets/lua.js +1 -2
- data/assets/_vendor/ace/snippets/luapage.js +2 -3
- data/assets/_vendor/ace/snippets/lucene.js +2 -3
- data/assets/_vendor/ace/snippets/makefile.js +1 -2
- data/assets/_vendor/ace/snippets/markdown.js +1 -2
- data/assets/_vendor/ace/snippets/mask.js +2 -3
- data/assets/_vendor/ace/snippets/matlab.js +2 -3
- data/assets/_vendor/ace/snippets/maze.js +1 -2
- data/assets/_vendor/ace/snippets/mel.js +2 -3
- data/assets/_vendor/ace/snippets/mixal.js +2 -3
- data/assets/_vendor/ace/snippets/mushcode.js +2 -3
- data/assets/_vendor/ace/snippets/mysql.js +2 -3
- data/assets/_vendor/ace/snippets/nix.js +2 -3
- data/assets/_vendor/ace/snippets/nsis.js +1 -2
- data/assets/_vendor/ace/snippets/objectivec.js +2 -3
- data/assets/_vendor/ace/snippets/ocaml.js +2 -3
- data/assets/_vendor/ace/snippets/pascal.js +2 -3
- data/assets/_vendor/ace/snippets/perl.js +1 -2
- data/assets/_vendor/ace/snippets/perl6.js +14 -0
- data/assets/_vendor/ace/snippets/pgsql.js +2 -3
- data/assets/_vendor/ace/snippets/php.js +1 -2
- data/assets/_vendor/ace/snippets/php_laravel_blade.js +2 -3
- data/assets/_vendor/ace/snippets/pig.js +2 -3
- data/assets/_vendor/ace/snippets/plain_text.js +2 -3
- data/assets/_vendor/ace/snippets/powershell.js +2 -3
- data/assets/_vendor/ace/snippets/praat.js +2 -3
- data/assets/_vendor/ace/snippets/prolog.js +2 -3
- data/assets/_vendor/ace/snippets/properties.js +2 -3
- data/assets/_vendor/ace/snippets/protobuf.js +1 -2
- data/assets/_vendor/ace/snippets/puppet.js +2 -3
- data/assets/_vendor/ace/snippets/python.js +1 -2
- data/assets/_vendor/ace/snippets/r.js +1 -2
- data/assets/_vendor/ace/snippets/razor.js +1 -2
- data/assets/_vendor/ace/snippets/rdoc.js +2 -3
- data/assets/_vendor/ace/snippets/red.js +1 -2
- data/assets/_vendor/ace/snippets/redshift.js +2 -3
- data/assets/_vendor/ace/snippets/rhtml.js +2 -3
- data/assets/_vendor/ace/snippets/rst.js +1 -2
- data/assets/_vendor/ace/snippets/ruby.js +1 -2
- data/assets/_vendor/ace/snippets/rust.js +2 -3
- data/assets/_vendor/ace/snippets/sass.js +2 -3
- data/assets/_vendor/ace/snippets/scad.js +2 -3
- data/assets/_vendor/ace/snippets/scala.js +2 -3
- data/assets/_vendor/ace/snippets/scheme.js +2 -3
- data/assets/_vendor/ace/snippets/scss.js +2 -3
- data/assets/_vendor/ace/snippets/sh.js +1 -2
- data/assets/_vendor/ace/snippets/sjs.js +2 -3
- data/assets/_vendor/ace/snippets/slim.js +2 -3
- data/assets/_vendor/ace/snippets/smarty.js +2 -3
- data/assets/_vendor/ace/snippets/snippets.js +1 -2
- data/assets/_vendor/ace/snippets/soy_template.js +2 -3
- data/assets/_vendor/ace/snippets/space.js +2 -3
- data/assets/_vendor/ace/snippets/sparql.js +1 -2
- data/assets/_vendor/ace/snippets/sql.js +1 -2
- data/assets/_vendor/ace/snippets/sqlserver.js +1 -2
- data/assets/_vendor/ace/snippets/stylus.js +2 -3
- data/assets/_vendor/ace/snippets/svg.js +2 -3
- data/assets/_vendor/ace/snippets/swift.js +2 -3
- data/assets/_vendor/ace/snippets/tcl.js +1 -2
- data/assets/_vendor/ace/snippets/terraform.js +2 -3
- data/assets/_vendor/ace/snippets/tex.js +1 -2
- data/assets/_vendor/ace/snippets/text.js +2 -3
- data/assets/_vendor/ace/snippets/textile.js +1 -2
- data/assets/_vendor/ace/snippets/toml.js +2 -3
- data/assets/_vendor/ace/snippets/tsx.js +2 -3
- data/assets/_vendor/ace/snippets/turtle.js +1 -2
- data/assets/_vendor/ace/snippets/twig.js +2 -3
- data/assets/_vendor/ace/snippets/typescript.js +2 -3
- data/assets/_vendor/ace/snippets/vala.js +1 -2
- data/assets/_vendor/ace/snippets/vbscript.js +2 -3
- data/assets/_vendor/ace/snippets/velocity.js +1 -2
- data/assets/_vendor/ace/snippets/verilog.js +2 -3
- data/assets/_vendor/ace/snippets/vhdl.js +2 -3
- data/assets/_vendor/ace/snippets/visualforce.js +14 -0
- data/assets/_vendor/ace/snippets/wollok.js +1 -2
- data/assets/_vendor/ace/snippets/xml.js +2 -3
- data/assets/_vendor/ace/snippets/xquery.js +1 -2
- data/assets/_vendor/ace/snippets/yaml.js +2 -3
- data/assets/_vendor/ace/theme-ambiance.js +1 -2
- data/assets/_vendor/ace/theme-chaos.js +1 -2
- data/assets/_vendor/ace/theme-chrome.js +1 -2
- data/assets/_vendor/ace/theme-clouds.js +1 -2
- data/assets/_vendor/ace/theme-clouds_midnight.js +1 -2
- data/assets/_vendor/ace/theme-cobalt.js +1 -2
- data/assets/_vendor/ace/theme-crimson_editor.js +1 -2
- data/assets/_vendor/ace/theme-dawn.js +1 -2
- data/assets/_vendor/ace/theme-dracula.js +1 -2
- data/assets/_vendor/ace/theme-dreamweaver.js +1 -2
- data/assets/_vendor/ace/theme-eclipse.js +1 -2
- data/assets/_vendor/ace/theme-github.js +3 -3
- data/assets/_vendor/ace/theme-gob.js +1 -2
- data/assets/_vendor/ace/theme-gruvbox.js +1 -2
- data/assets/_vendor/ace/theme-idle_fingers.js +1 -2
- data/assets/_vendor/ace/theme-iplastic.js +1 -2
- data/assets/_vendor/ace/theme-katzenmilch.js +1 -2
- data/assets/_vendor/ace/theme-kr_theme.js +1 -2
- data/assets/_vendor/ace/theme-kuroir.js +1 -2
- data/assets/_vendor/ace/theme-merbivore.js +1 -2
- data/assets/_vendor/ace/theme-merbivore_soft.js +1 -2
- data/assets/_vendor/ace/theme-mono_industrial.js +1 -2
- data/assets/_vendor/ace/theme-monokai.js +1 -2
- data/assets/_vendor/ace/theme-pastel_on_dark.js +1 -2
- data/assets/_vendor/ace/theme-solarized_dark.js +1 -2
- data/assets/_vendor/ace/theme-solarized_light.js +1 -2
- data/assets/_vendor/ace/theme-sqlserver.js +1 -2
- data/assets/_vendor/ace/theme-terminal.js +1 -2
- data/assets/_vendor/ace/theme-textmate.js +1 -2
- data/assets/_vendor/ace/theme-tomorrow.js +1 -2
- data/assets/_vendor/ace/theme-tomorrow_night.js +1 -2
- data/assets/_vendor/ace/theme-tomorrow_night_blue.js +1 -2
- data/assets/_vendor/ace/theme-tomorrow_night_bright.js +1 -2
- data/assets/_vendor/ace/theme-tomorrow_night_eighties.js +1 -2
- data/assets/_vendor/ace/theme-twilight.js +1 -2
- data/assets/_vendor/ace/theme-vibrant_ink.js +1 -2
- data/assets/_vendor/ace/theme-xcode.js +1 -2
- data/assets/_vendor/ace/worker-coffee.js +11 -20
- data/assets/_vendor/ace/worker-css.js +23 -20
- data/assets/_vendor/ace/worker-html.js +25 -31
- data/assets/_vendor/ace/worker-javascript.js +76 -36
- data/assets/_vendor/ace/worker-json.js +25 -20
- data/assets/_vendor/ace/worker-lua.js +68 -69
- data/assets/_vendor/ace/worker-php.js +12 -20
- data/assets/_vendor/ace/worker-xml.js +12 -22
- data/assets/_vendor/ace/worker-xquery.js +44 -12378
- data/assets/_vendor/tinymce/plugins/advlist/plugin.js +137 -137
- data/assets/_vendor/tinymce/plugins/anchor/plugin.js +102 -102
- data/assets/_vendor/tinymce/plugins/autolink/plugin.js +154 -154
- data/assets/_vendor/tinymce/plugins/autoresize/plugin.js +145 -145
- data/assets/_vendor/tinymce/plugins/autosave/plugin.js +207 -217
- data/assets/_vendor/tinymce/plugins/autosave/plugin.min.js +1 -1
- data/assets/_vendor/tinymce/plugins/bbcode/plugin.js +89 -89
- data/assets/_vendor/tinymce/plugins/charmap/plugin.js +1246 -1246
- data/assets/_vendor/tinymce/plugins/code/plugin.js +80 -80
- data/assets/_vendor/tinymce/plugins/codesample/plugin.js +852 -852
- data/assets/_vendor/tinymce/plugins/colorpicker/plugin.js +109 -109
- data/assets/_vendor/tinymce/plugins/contextmenu/plugin.js +144 -144
- data/assets/_vendor/tinymce/plugins/directionality/plugin.js +53 -53
- data/assets/_vendor/tinymce/plugins/emoticons/plugin.js +74 -74
- data/assets/_vendor/tinymce/plugins/fullpage/plugin.js +464 -464
- data/assets/_vendor/tinymce/plugins/fullscreen/plugin.js +152 -152
- data/assets/_vendor/tinymce/plugins/help/plugin.js +639 -678
- data/assets/_vendor/tinymce/plugins/help/plugin.min.js +1 -1
- data/assets/_vendor/tinymce/plugins/hr/plugin.js +29 -29
- data/assets/_vendor/tinymce/plugins/image/plugin.js +1119 -1126
- data/assets/_vendor/tinymce/plugins/image/plugin.min.js +1 -1
- data/assets/_vendor/tinymce/plugins/imagetools/plugin.js +3414 -3445
- data/assets/_vendor/tinymce/plugins/imagetools/plugin.min.js +1 -1
- data/assets/_vendor/tinymce/plugins/importcss/plugin.js +230 -230
- data/assets/_vendor/tinymce/plugins/insertdatetime/plugin.js +152 -152
- data/assets/_vendor/tinymce/plugins/legacyoutput/plugin.js +193 -193
- data/assets/_vendor/tinymce/plugins/link/plugin.js +646 -646
- data/assets/_vendor/tinymce/plugins/lists/plugin.js +2103 -1037
- data/assets/_vendor/tinymce/plugins/lists/plugin.min.js +1 -1
- data/assets/_vendor/tinymce/plugins/media/plugin.js +1050 -1050
- data/assets/_vendor/tinymce/plugins/nonbreaking/plugin.js +69 -69
- data/assets/_vendor/tinymce/plugins/noneditable/plugin.js +98 -98
- data/assets/_vendor/tinymce/plugins/pagebreak/plugin.js +91 -91
- data/assets/_vendor/tinymce/plugins/paste/plugin.js +1725 -1364
- data/assets/_vendor/tinymce/plugins/paste/plugin.min.js +1 -1
- data/assets/_vendor/tinymce/plugins/preview/plugin.js +107 -107
- data/assets/_vendor/tinymce/plugins/print/plugin.js +28 -28
- data/assets/_vendor/tinymce/plugins/save/plugin.js +101 -101
- data/assets/_vendor/tinymce/plugins/searchreplace/plugin.js +535 -537
- data/assets/_vendor/tinymce/plugins/searchreplace/plugin.min.js +1 -1
- data/assets/_vendor/tinymce/plugins/spellchecker/plugin.js +683 -681
- data/assets/_vendor/tinymce/plugins/spellchecker/plugin.min.js +1 -1
- data/assets/_vendor/tinymce/plugins/tabfocus/plugin.js +95 -95
- data/assets/_vendor/tinymce/plugins/table/plugin.js +8927 -9805
- data/assets/_vendor/tinymce/plugins/table/plugin.min.js +1 -1
- data/assets/_vendor/tinymce/plugins/template/plugin.js +305 -311
- data/assets/_vendor/tinymce/plugins/template/plugin.min.js +1 -1
- data/assets/_vendor/tinymce/plugins/textcolor/plugin.js +317 -317
- data/assets/_vendor/tinymce/plugins/textpattern/plugin.js +575 -329
- data/assets/_vendor/tinymce/plugins/textpattern/plugin.min.js +1 -1
- data/assets/_vendor/tinymce/plugins/toc/plugin.js +201 -201
- data/assets/_vendor/tinymce/plugins/visualblocks/plugin.js +113 -113
- data/assets/_vendor/tinymce/plugins/visualchars/plugin.js +419 -471
- data/assets/_vendor/tinymce/plugins/visualchars/plugin.min.js +1 -1
- data/assets/_vendor/tinymce/plugins/wordcount/plugin.js +371 -308
- data/assets/_vendor/tinymce/plugins/wordcount/plugin.min.js +1 -1
- data/assets/_vendor/tinymce/skins/lightgray/fonts/tinymce.eot +0 -0
- data/assets/_vendor/tinymce/skins/lightgray/fonts/tinymce.svg +1 -0
- data/assets/_vendor/tinymce/skins/lightgray/fonts/tinymce.ttf +0 -0
- data/assets/_vendor/tinymce/skins/lightgray/fonts/tinymce.woff +0 -0
- data/assets/_vendor/tinymce/skins/lightgray/skin.min.css +1 -1
- data/assets/_vendor/tinymce/themes/inlite/theme.js +9272 -9686
- data/assets/_vendor/tinymce/themes/inlite/theme.min.js +1 -1
- data/assets/_vendor/tinymce/themes/mobile/theme.js +12130 -13042
- data/assets/_vendor/tinymce/themes/mobile/theme.min.js +1 -1
- data/assets/_vendor/tinymce/themes/modern/theme.js +9090 -9504
- data/assets/_vendor/tinymce/themes/modern/theme.min.js +1 -1
- data/assets/_vendor/tinymce/tinymce.js +24914 -25218
- data/assets/bedrock/js/bedrock.js +1 -1
- data/assets/bedrock/scss/components/no-content.scss +5 -0
- data/assets/bedrock/scss/components/select-box.scss +1 -1
- data/lib/bedrock_sass.rb +51 -16
- data/lib/bedrock_sass/engine.rb +3 -2
- data/lib/bedrock_sass/version.rb +1 -1
- metadata +17 -7
@@ -1 +1 @@
|
|
1
|
-
!function(){"use strict";var r=function(e){var t=e,n=function(){return t};return{get:n,set:function(e){t=e},clone:function(){return r(n())}}},e=tinymce.util.Tools.resolve("tinymce.PluginManager"),p=tinymce.util.Tools.resolve("tinymce.util.Tools");function h(e){return e&&1===e.nodeType&&"false"===e.contentEditable}var u={findAndReplaceDOMText:function(t,n,r,a,i){var o,d,
|
1
|
+
!function(){"use strict";var r=function(e){var t=e,n=function(){return t};return{get:n,set:function(e){t=e},clone:function(){return r(n())}}},e=tinymce.util.Tools.resolve("tinymce.PluginManager"),p=tinymce.util.Tools.resolve("tinymce.util.Tools");function h(e){return e&&1===e.nodeType&&"false"===e.contentEditable}var u={findAndReplaceDOMText:function(t,n,r,a,i){var o,d,m,f,p,g,c=[],l=0;function s(e,t){if(t=t||0,!e[0])throw new Error("findAndReplaceDOMText cannot handle zero-length matches");var n=e.index;if(0<t){var r=e[t];if(!r)throw new Error("Invalid capture group");n+=e[0].indexOf(r),e[0]=r}return[n,n+e[0].length,[e[0]]]}if(m=n.ownerDocument,f=i.getBlockElements(),p=i.getWhiteSpaceElements(),g=i.getShortEndedElements(),d=function e(t){var n;if(3===t.nodeType)return t.data;if(p[t.nodeName]&&!f[t.nodeName])return"";if(n="",h(t))return"\n";if((f[t.nodeName]||g[t.nodeName])&&(n+="\n"),t=t.firstChild)for(;n+=e(t),t=t.nextSibling;);return n}(n)){if(t.global)for(;o=t.exec(d);)c.push(s(o,a));else o=d.match(t),c.push(s(o,a));return c.length&&(l=c.length,function(e,t,n){var r,a,i,o,d=[],c=0,l=e,s=t.shift(),u=0;e:for(;;){if((f[l.nodeName]||g[l.nodeName]||h(l))&&c++,3===l.nodeType&&(!a&&l.length+c>=s[1]?(a=l,o=s[1]-c):r&&d.push(l),!r&&l.length+c>s[0]&&(r=l,i=s[0]-c),c+=l.length),r&&a){if(l=n({startNode:r,startNodeIndex:i,endNode:a,endNodeIndex:o,innerNodes:d,match:s[2],matchIndex:u}),c-=a.length-o,a=r=null,d=[],u++,!(s=t.shift()))break}else if(p[l.nodeName]&&!f[l.nodeName]||!l.firstChild){if(l.nextSibling){l=l.nextSibling;continue}}else if(!h(l)){l=l.firstChild;continue}for(;;){if(l.nextSibling){l=l.nextSibling;break}if(l.parentNode===e)break e;l=l.parentNode}}}(n,c,function(e){var h;if("function"!=typeof e){var r=e.nodeType?e:m.createElement(e);h=function(e,t){var n=r.cloneNode(!1);return n.setAttribute("data-mce-index",t),e&&n.appendChild(m.createTextNode(e)),n}}else h=e;return function(e){var t,n,r,a=e.startNode,i=e.endNode,o=e.matchIndex;if(a===i){var d=a;r=d.parentNode,0<e.startNodeIndex&&(t=m.createTextNode(d.data.substring(0,e.startNodeIndex)),r.insertBefore(t,d));var c=h(e.match[0],o);return r.insertBefore(c,d),e.endNodeIndex<d.length&&(n=m.createTextNode(d.data.substring(e.endNodeIndex)),r.insertBefore(n,d)),d.parentNode.removeChild(d),c}t=m.createTextNode(a.data.substring(0,e.startNodeIndex)),n=m.createTextNode(i.data.substring(e.endNodeIndex));for(var l=h(a.data.substring(e.startNodeIndex),o),s=0,u=e.innerNodes.length;s<u;++s){var f=e.innerNodes[s],p=h(f.data,o);f.parentNode.replaceChild(p,f)}var g=h(i.data.substring(0,e.endNodeIndex),o);return(r=a.parentNode).insertBefore(t,a),r.insertBefore(l,a),r.removeChild(a),(r=i.parentNode).insertBefore(g,i),r.insertBefore(n,i),r.removeChild(i),g}}(r))),l}}},g=function(e){var t=e.getAttribute("data-mce-index");return"number"==typeof t?""+t:t},m=function(e){var t=e.parentNode;e.firstChild&&t.insertBefore(e.firstChild,e),e.parentNode.removeChild(e)},o=function(e,t){var n,r=[];if((n=p.toArray(e.getBody().getElementsByTagName("span"))).length)for(var a=0;a<n.length;a++){var i=g(n[a]);null!==i&&i.length&&i===t.toString()&&r.push(n[a])}return r},f=function(e,t,n){var r=t.get(),a=e.dom;(n=!1!==n)?r++:r--,a.removeClass(o(e,t.get()),"mce-match-marker-selected");var i=o(e,r);return i.length?(a.addClass(o(e,r),"mce-match-marker-selected"),e.selection.scrollIntoView(i[0]),r):-1},v=function(e,t){var n=t.parentNode;e.remove(t),e.isEmpty(n)&&e.remove(n)},x=function(e,t){var n=f(e,t,!0);-1!==n&&t.set(n)},b=function(e,t){var n=f(e,t,!1);-1!==n&&t.set(n)},N=function(e){var t=g(e);return null!==t&&0<t.length},y=function(e,t,n){var r,a,i,o;for(a=p.toArray(e.getBody().getElementsByTagName("span")),r=0;r<a.length;r++){var d=g(a[r]);null!==d&&d.length&&(d===t.get().toString()&&(i||(i=a[r].firstChild),o=a[r].firstChild),m(a[r]))}if(i&&o){var c=e.dom.createRng();return c.setStart(i,0),c.setEnd(o,o.data.length),!1!==n&&e.selection.setRng(c),c}},k=function(e,t){return 0<o(e,t.get()+1).length},C=function(e,t){return 0<o(e,t.get()-1).length},T={done:y,find:function(e,t,n,r,a){n=(n=n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")).replace(/\s/g,"[^\\S\\r\\n]"),n=a?"\\b"+n+"\\b":n;var i,o,d,c,l,s=(i=e,o=t,d=new RegExp(n,r?"g":"gi"),(l=i.dom.create("span",{"data-mce-bogus":1})).className="mce-match-marker",c=i.getBody(),y(i,o,!1),u.findAndReplaceDOMText(d,c,l,!1,i.schema));return s&&(t.set(-1),t.set(f(e,t,!0))),s},next:x,prev:b,replace:function(e,t,n,r,a){var i,o,d,c,l,s,u=t.get();for(r=!1!==r,d=e.getBody(),o=p.grep(p.toArray(d.getElementsByTagName("span")),N),i=0;i<o.length;i++){var f=g(o[i]);if(c=l=parseInt(f,10),a||c===t.get()){for(n.length?(o[i].firstChild.nodeValue=n,m(o[i])):v(e.dom,o[i]);o[++i];){if((c=parseInt(g(o[i]),10))!==l){i--;break}v(e.dom,o[i])}r&&u--}else l>t.get()&&o[i].setAttribute("data-mce-index",l-1)}return t.set(u),r?(s=k(e,t),x(e,t)):(s=C(e,t),b(e,t)),!a&&s},hasNext:k,hasPrev:C},n=function(r,a){return{done:function(e){return T.done(r,a,e)},find:function(e,t,n){return T.find(r,a,e,t,n)},next:function(){return T.next(r,a)},prev:function(){return T.prev(r,a)},replace:function(e,t,n){return T.replace(r,a,e,t,n)}}},a=function(i,o){var e,d={};function c(){s.statusbar.find("#next").disabled(!1===T.hasNext(i,o)),s.statusbar.find("#prev").disabled(!1===T.hasPrev(i,o))}function l(){i.windowManager.alert("Could not find the specified string.",function(){s.find("#find")[0].focus()})}i.undoManager.add(),e=p.trim(i.selection.getContent({format:"text"}));var s=i.windowManager.open({layout:"flex",pack:"center",align:"center",onClose:function(){i.focus(),T.done(i,o),i.undoManager.add()},onSubmit:function(e){var t,n,r,a;return e.preventDefault(),n=s.find("#case").checked(),a=s.find("#words").checked(),(r=s.find("#find").value()).length?d.text===r&&d.caseState===n&&d.wholeWord===a?T.hasNext(i,o)?(T.next(i,o),void c()):void l():((t=T.find(i,o,r,n,a))||l(),s.statusbar.items().slice(1).disabled(0===t),c(),void(d={text:r,caseState:n,wholeWord:a})):(T.done(i,o,!1),void s.statusbar.items().slice(1).disabled(!0))},buttons:[{text:"Find",subtype:"primary",onclick:function(){s.submit()}},{text:"Replace",disabled:!0,onclick:function(){T.replace(i,o,s.find("#replace").value())||(s.statusbar.items().slice(1).disabled(!0),o.set(-1),d={})}},{text:"Replace all",disabled:!0,onclick:function(){T.replace(i,o,s.find("#replace").value(),!0,!0),s.statusbar.items().slice(1).disabled(!0),d={}}},{type:"spacer",flex:1},{text:"Prev",name:"prev",disabled:!0,onclick:function(){T.prev(i,o),c()}},{text:"Next",name:"next",disabled:!0,onclick:function(){T.next(i,o),c()}}],title:"Find and replace",items:{type:"form",padding:20,labelGap:30,spacing:10,items:[{type:"textbox",name:"find",size:40,label:"Find",value:e},{type:"textbox",name:"replace",size:40,label:"Replace with"},{type:"checkbox",name:"case",text:"Match case",label:" "},{type:"checkbox",name:"words",text:"Whole words",label:" "}]}})},i=function(e,t){e.addCommand("SearchReplace",function(){a(e,t)})},d=function(e,t){return function(){a(e,t)}},c=function(e,t){e.addMenuItem("searchreplace",{text:"Find and replace",shortcut:"Meta+F",onclick:d(e,t),separator:"before",context:"edit"}),e.addButton("searchreplace",{tooltip:"Find and replace",onclick:d(e,t)}),e.shortcuts.add("Meta+F","",d(e,t))};e.add("searchreplace",function(e){var t=r(-1);return i(e,t),c(e,t),n(e,t)})}();
|
@@ -1,757 +1,759 @@
|
|
1
1
|
(function () {
|
2
2
|
var spellchecker = (function () {
|
3
|
-
|
3
|
+
'use strict';
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
5
|
+
var Cell = function (initial) {
|
6
|
+
var value = initial;
|
7
|
+
var get = function () {
|
8
|
+
return value;
|
9
|
+
};
|
10
|
+
var set = function (v) {
|
11
|
+
value = v;
|
12
|
+
};
|
13
|
+
var clone = function () {
|
14
|
+
return Cell(get());
|
15
|
+
};
|
16
|
+
return {
|
17
|
+
get: get,
|
18
|
+
set: set,
|
19
|
+
clone: clone
|
20
|
+
};
|
20
21
|
};
|
21
|
-
};
|
22
22
|
|
23
|
-
|
23
|
+
var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
24
24
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
25
|
+
var hasProPlugin = function (editor) {
|
26
|
+
if (/(^|[ ,])tinymcespellchecker([, ]|$)/.test(editor.settings.plugins) && global.get('tinymcespellchecker')) {
|
27
|
+
if (typeof window.console !== 'undefined' && window.console.log) {
|
28
|
+
window.console.log('Spell Checker Pro is incompatible with Spell Checker plugin! ' + 'Remove \'spellchecker\' from the \'plugins\' option.');
|
29
|
+
}
|
30
|
+
return true;
|
31
|
+
} else {
|
32
|
+
return false;
|
29
33
|
}
|
30
|
-
|
31
|
-
|
32
|
-
return false;
|
33
|
-
}
|
34
|
-
};
|
35
|
-
var $_9tnsahk7jm0ofzx4 = { hasProPlugin: hasProPlugin };
|
34
|
+
};
|
35
|
+
var DetectProPlugin = { hasProPlugin: hasProPlugin };
|
36
36
|
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
37
|
+
var getLanguages = function (editor) {
|
38
|
+
var defaultLanguages = 'English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr_FR,German=de,Italian=it,Polish=pl,Portuguese=pt_BR,Spanish=es,Swedish=sv';
|
39
|
+
return editor.getParam('spellchecker_languages', defaultLanguages);
|
40
|
+
};
|
41
|
+
var getLanguage = function (editor) {
|
42
|
+
var defaultLanguage = editor.getParam('language', 'en');
|
43
|
+
return editor.getParam('spellchecker_language', defaultLanguage);
|
44
|
+
};
|
45
|
+
var getRpcUrl = function (editor) {
|
46
|
+
return editor.getParam('spellchecker_rpc_url');
|
47
|
+
};
|
48
|
+
var getSpellcheckerCallback = function (editor) {
|
49
|
+
return editor.getParam('spellchecker_callback');
|
50
|
+
};
|
51
|
+
var getSpellcheckerWordcharPattern = function (editor) {
|
52
|
+
var defaultPattern = new RegExp('[^' + '\\s!"#$%&()*+,-./:;<=>?@[\\]^_{|}`' + '\xA7\xA9\xAB\xAE\xB1\xB6\xB7\xB8\xBB' + '\xBC\xBD\xBE\xBF\xD7\xF7\xA4\u201D\u201C\u201E\xA0\u2002\u2003\u2009' + ']+', 'g');
|
53
|
+
return editor.getParam('spellchecker_wordchar_pattern', defaultPattern);
|
54
|
+
};
|
55
|
+
var Settings = {
|
56
|
+
getLanguages: getLanguages,
|
57
|
+
getLanguage: getLanguage,
|
58
|
+
getRpcUrl: getRpcUrl,
|
59
|
+
getSpellcheckerCallback: getSpellcheckerCallback,
|
60
|
+
getSpellcheckerWordcharPattern: getSpellcheckerWordcharPattern
|
61
|
+
};
|
62
62
|
|
63
|
-
|
63
|
+
var global$1 = tinymce.util.Tools.resolve('tinymce.util.Tools');
|
64
64
|
|
65
|
-
|
65
|
+
var global$2 = tinymce.util.Tools.resolve('tinymce.util.URI');
|
66
66
|
|
67
|
-
|
67
|
+
var global$3 = tinymce.util.Tools.resolve('tinymce.util.XHR');
|
68
68
|
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
69
|
+
var fireSpellcheckStart = function (editor) {
|
70
|
+
return editor.fire('SpellcheckStart');
|
71
|
+
};
|
72
|
+
var fireSpellcheckEnd = function (editor) {
|
73
|
+
return editor.fire('SpellcheckEnd');
|
74
|
+
};
|
75
|
+
var Events = {
|
76
|
+
fireSpellcheckStart: fireSpellcheckStart,
|
77
|
+
fireSpellcheckEnd: fireSpellcheckEnd
|
78
|
+
};
|
79
79
|
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
}
|
101
|
-
function getText(node) {
|
102
|
-
var txt;
|
103
|
-
if (node.nodeType === 3) {
|
104
|
-
return node.data;
|
105
|
-
}
|
106
|
-
if (hiddenTextElementsMap[node.nodeName] && !blockElementsMap[node.nodeName]) {
|
107
|
-
return '';
|
108
|
-
}
|
109
|
-
if (isContentEditableFalse(node)) {
|
110
|
-
return '\n';
|
111
|
-
}
|
112
|
-
txt = '';
|
113
|
-
if (blockElementsMap[node.nodeName] || shortEndedElementsMap[node.nodeName]) {
|
114
|
-
txt += '\n';
|
80
|
+
function isContentEditableFalse(node) {
|
81
|
+
return node && node.nodeType === 1 && node.contentEditable === 'false';
|
82
|
+
}
|
83
|
+
var DomTextMatcher = function (node, editor) {
|
84
|
+
var m, matches = [], text;
|
85
|
+
var dom = editor.dom;
|
86
|
+
var blockElementsMap, hiddenTextElementsMap, shortEndedElementsMap;
|
87
|
+
blockElementsMap = editor.schema.getBlockElements();
|
88
|
+
hiddenTextElementsMap = editor.schema.getWhiteSpaceElements();
|
89
|
+
shortEndedElementsMap = editor.schema.getShortEndedElements();
|
90
|
+
function createMatch(m, data) {
|
91
|
+
if (!m[0]) {
|
92
|
+
throw new Error('findAndReplaceDOMText cannot handle zero-length matches');
|
93
|
+
}
|
94
|
+
return {
|
95
|
+
start: m.index,
|
96
|
+
end: m.index + m[0].length,
|
97
|
+
text: m[0],
|
98
|
+
data: data
|
99
|
+
};
|
115
100
|
}
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
101
|
+
function getText(node) {
|
102
|
+
var txt;
|
103
|
+
if (node.nodeType === 3) {
|
104
|
+
return node.data;
|
105
|
+
}
|
106
|
+
if (hiddenTextElementsMap[node.nodeName] && !blockElementsMap[node.nodeName]) {
|
107
|
+
return '';
|
108
|
+
}
|
109
|
+
if (isContentEditableFalse(node)) {
|
110
|
+
return '\n';
|
111
|
+
}
|
112
|
+
txt = '';
|
113
|
+
if (blockElementsMap[node.nodeName] || shortEndedElementsMap[node.nodeName]) {
|
114
|
+
txt += '\n';
|
115
|
+
}
|
116
|
+
if (node = node.firstChild) {
|
117
|
+
do {
|
118
|
+
txt += getText(node);
|
119
|
+
} while (node = node.nextSibling);
|
120
|
+
}
|
121
|
+
return txt;
|
120
122
|
}
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
123
|
+
function stepThroughMatches(node, matches, replaceFn) {
|
124
|
+
var startNode, endNode, startNodeIndex, endNodeIndex, innerNodes = [], atIndex = 0, curNode = node, matchLocation, matchIndex = 0;
|
125
|
+
matches = matches.slice(0);
|
126
|
+
matches.sort(function (a, b) {
|
127
|
+
return a.start - b.start;
|
128
|
+
});
|
129
|
+
matchLocation = matches.shift();
|
130
|
+
out:
|
131
|
+
while (true) {
|
132
|
+
if (blockElementsMap[curNode.nodeName] || shortEndedElementsMap[curNode.nodeName] || isContentEditableFalse(curNode)) {
|
133
|
+
atIndex++;
|
134
|
+
}
|
135
|
+
if (curNode.nodeType === 3) {
|
136
|
+
if (!endNode && curNode.length + atIndex >= matchLocation.end) {
|
137
|
+
endNode = curNode;
|
138
|
+
endNodeIndex = matchLocation.end - atIndex;
|
139
|
+
} else if (startNode) {
|
140
|
+
innerNodes.push(curNode);
|
141
|
+
}
|
142
|
+
if (!startNode && curNode.length + atIndex > matchLocation.start) {
|
143
|
+
startNode = curNode;
|
144
|
+
startNodeIndex = matchLocation.start - atIndex;
|
145
|
+
}
|
146
|
+
atIndex += curNode.length;
|
147
|
+
}
|
148
|
+
if (startNode && endNode) {
|
149
|
+
curNode = replaceFn({
|
150
|
+
startNode: startNode,
|
151
|
+
startNodeIndex: startNodeIndex,
|
152
|
+
endNode: endNode,
|
153
|
+
endNodeIndex: endNodeIndex,
|
154
|
+
innerNodes: innerNodes,
|
155
|
+
match: matchLocation.text,
|
156
|
+
matchIndex: matchIndex
|
157
|
+
});
|
158
|
+
atIndex -= endNode.length - endNodeIndex;
|
159
|
+
startNode = null;
|
160
|
+
endNode = null;
|
161
|
+
innerNodes = [];
|
162
|
+
matchLocation = matches.shift();
|
163
|
+
matchIndex++;
|
164
|
+
if (!matchLocation) {
|
165
|
+
break;
|
166
|
+
}
|
167
|
+
} else if ((!hiddenTextElementsMap[curNode.nodeName] || blockElementsMap[curNode.nodeName]) && curNode.firstChild) {
|
168
|
+
if (!isContentEditableFalse(curNode)) {
|
169
|
+
curNode = curNode.firstChild;
|
170
|
+
continue;
|
171
|
+
}
|
172
|
+
} else if (curNode.nextSibling) {
|
173
|
+
curNode = curNode.nextSibling;
|
174
|
+
continue;
|
141
175
|
}
|
142
|
-
|
143
|
-
|
144
|
-
|
176
|
+
while (true) {
|
177
|
+
if (curNode.nextSibling) {
|
178
|
+
curNode = curNode.nextSibling;
|
179
|
+
break;
|
180
|
+
} else if (curNode.parentNode !== node) {
|
181
|
+
curNode = curNode.parentNode;
|
182
|
+
} else {
|
183
|
+
break out;
|
184
|
+
}
|
145
185
|
}
|
146
|
-
atIndex += curNode.length;
|
147
186
|
}
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
187
|
+
}
|
188
|
+
function genReplacer(callback) {
|
189
|
+
function makeReplacementNode(fill, matchIndex) {
|
190
|
+
var match = matches[matchIndex];
|
191
|
+
if (!match.stencil) {
|
192
|
+
match.stencil = callback(match);
|
193
|
+
}
|
194
|
+
var clone = match.stencil.cloneNode(false);
|
195
|
+
clone.setAttribute('data-mce-index', matchIndex);
|
196
|
+
if (fill) {
|
197
|
+
clone.appendChild(dom.doc.createTextNode(fill));
|
198
|
+
}
|
199
|
+
return clone;
|
200
|
+
}
|
201
|
+
return function (range) {
|
202
|
+
var before;
|
203
|
+
var after;
|
204
|
+
var parentNode;
|
205
|
+
var startNode = range.startNode;
|
206
|
+
var endNode = range.endNode;
|
207
|
+
var matchIndex = range.matchIndex;
|
208
|
+
var doc = dom.doc;
|
209
|
+
if (startNode === endNode) {
|
210
|
+
var node_1 = startNode;
|
211
|
+
parentNode = node_1.parentNode;
|
212
|
+
if (range.startNodeIndex > 0) {
|
213
|
+
before = doc.createTextNode(node_1.data.substring(0, range.startNodeIndex));
|
214
|
+
parentNode.insertBefore(before, node_1);
|
166
215
|
}
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
216
|
+
var el = makeReplacementNode(range.match, matchIndex);
|
217
|
+
parentNode.insertBefore(el, node_1);
|
218
|
+
if (range.endNodeIndex < node_1.length) {
|
219
|
+
after = doc.createTextNode(node_1.data.substring(range.endNodeIndex));
|
220
|
+
parentNode.insertBefore(after, node_1);
|
171
221
|
}
|
172
|
-
|
173
|
-
|
174
|
-
continue;
|
222
|
+
node_1.parentNode.removeChild(node_1);
|
223
|
+
return el;
|
175
224
|
}
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
225
|
+
before = doc.createTextNode(startNode.data.substring(0, range.startNodeIndex));
|
226
|
+
after = doc.createTextNode(endNode.data.substring(range.endNodeIndex));
|
227
|
+
var elA = makeReplacementNode(startNode.data.substring(range.startNodeIndex), matchIndex);
|
228
|
+
for (var i = 0, l = range.innerNodes.length; i < l; ++i) {
|
229
|
+
var innerNode = range.innerNodes[i];
|
230
|
+
var innerEl = makeReplacementNode(innerNode.data, matchIndex);
|
231
|
+
innerNode.parentNode.replaceChild(innerEl, innerNode);
|
232
|
+
}
|
233
|
+
var elB = makeReplacementNode(endNode.data.substring(0, range.endNodeIndex), matchIndex);
|
234
|
+
parentNode = startNode.parentNode;
|
235
|
+
parentNode.insertBefore(before, startNode);
|
236
|
+
parentNode.insertBefore(elA, startNode);
|
237
|
+
parentNode.removeChild(startNode);
|
238
|
+
parentNode = endNode.parentNode;
|
239
|
+
parentNode.insertBefore(elB, endNode);
|
240
|
+
parentNode.insertBefore(after, endNode);
|
241
|
+
parentNode.removeChild(endNode);
|
242
|
+
return elB;
|
243
|
+
};
|
244
|
+
}
|
245
|
+
function unwrapElement(element) {
|
246
|
+
var parentNode = element.parentNode;
|
247
|
+
parentNode.insertBefore(element.firstChild, element);
|
248
|
+
element.parentNode.removeChild(element);
|
249
|
+
}
|
250
|
+
function hasClass(elm) {
|
251
|
+
return elm.className.indexOf('mce-spellchecker-word') !== -1;
|
252
|
+
}
|
253
|
+
function getWrappersByIndex(index) {
|
254
|
+
var elements = node.getElementsByTagName('*'), wrappers = [];
|
255
|
+
index = typeof index === 'number' ? '' + index : null;
|
256
|
+
for (var i = 0; i < elements.length; i++) {
|
257
|
+
var element = elements[i], dataIndex = element.getAttribute('data-mce-index');
|
258
|
+
if (dataIndex !== null && dataIndex.length && hasClass(element)) {
|
259
|
+
if (dataIndex === index || index === null) {
|
260
|
+
wrappers.push(element);
|
184
261
|
}
|
185
262
|
}
|
186
263
|
}
|
187
|
-
|
188
|
-
|
189
|
-
function
|
190
|
-
var
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
clone.setAttribute('data-mce-index', matchIndex);
|
196
|
-
if (fill) {
|
197
|
-
clone.appendChild(dom.doc.createTextNode(fill));
|
264
|
+
return wrappers;
|
265
|
+
}
|
266
|
+
function indexOf(match) {
|
267
|
+
var i = matches.length;
|
268
|
+
while (i--) {
|
269
|
+
if (matches[i] === match) {
|
270
|
+
return i;
|
271
|
+
}
|
198
272
|
}
|
199
|
-
return
|
200
|
-
}
|
201
|
-
|
202
|
-
var
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
var endNode = range.endNode;
|
207
|
-
var matchIndex = range.matchIndex;
|
208
|
-
var doc = dom.doc;
|
209
|
-
if (startNode === endNode) {
|
210
|
-
var node_1 = startNode;
|
211
|
-
parentNode = node_1.parentNode;
|
212
|
-
if (range.startNodeIndex > 0) {
|
213
|
-
before = doc.createTextNode(node_1.data.substring(0, range.startNodeIndex));
|
214
|
-
parentNode.insertBefore(before, node_1);
|
273
|
+
return -1;
|
274
|
+
}
|
275
|
+
function filter(callback) {
|
276
|
+
var filteredMatches = [];
|
277
|
+
each(function (match, i) {
|
278
|
+
if (callback(match, i)) {
|
279
|
+
filteredMatches.push(match);
|
215
280
|
}
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
281
|
+
});
|
282
|
+
matches = filteredMatches;
|
283
|
+
return this;
|
284
|
+
}
|
285
|
+
function each(callback) {
|
286
|
+
for (var i = 0, l = matches.length; i < l; i++) {
|
287
|
+
if (callback(matches[i], i) === false) {
|
288
|
+
break;
|
221
289
|
}
|
222
|
-
node_1.parentNode.removeChild(node_1);
|
223
|
-
return el;
|
224
290
|
}
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
var innerNode = range.innerNodes[i];
|
231
|
-
var innerEl = makeReplacementNode(innerNode.data, matchIndex);
|
232
|
-
innerNode.parentNode.replaceChild(innerEl, innerNode);
|
233
|
-
innerEls.push(innerEl);
|
291
|
+
return this;
|
292
|
+
}
|
293
|
+
function wrap(callback) {
|
294
|
+
if (matches.length) {
|
295
|
+
stepThroughMatches(node, matches, genReplacer(callback));
|
234
296
|
}
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
parentNode.insertBefore(elB, endNode);
|
242
|
-
parentNode.insertBefore(after, endNode);
|
243
|
-
parentNode.removeChild(endNode);
|
244
|
-
return elB;
|
245
|
-
};
|
246
|
-
}
|
247
|
-
function unwrapElement(element) {
|
248
|
-
var parentNode = element.parentNode;
|
249
|
-
parentNode.insertBefore(element.firstChild, element);
|
250
|
-
element.parentNode.removeChild(element);
|
251
|
-
}
|
252
|
-
function hasClass(elm) {
|
253
|
-
return elm.className.indexOf('mce-spellchecker-word') !== -1;
|
254
|
-
}
|
255
|
-
function getWrappersByIndex(index) {
|
256
|
-
var elements = node.getElementsByTagName('*'), wrappers = [];
|
257
|
-
index = typeof index === 'number' ? '' + index : null;
|
258
|
-
for (var i = 0; i < elements.length; i++) {
|
259
|
-
var element = elements[i], dataIndex = element.getAttribute('data-mce-index');
|
260
|
-
if (dataIndex !== null && dataIndex.length && hasClass(element)) {
|
261
|
-
if (dataIndex === index || index === null) {
|
262
|
-
wrappers.push(element);
|
297
|
+
return this;
|
298
|
+
}
|
299
|
+
function find(regex, data) {
|
300
|
+
if (text && regex.global) {
|
301
|
+
while (m = regex.exec(text)) {
|
302
|
+
matches.push(createMatch(m, data));
|
263
303
|
}
|
264
304
|
}
|
305
|
+
return this;
|
265
306
|
}
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
return i;
|
307
|
+
function unwrap(match) {
|
308
|
+
var i;
|
309
|
+
var elements = getWrappersByIndex(match ? indexOf(match) : null);
|
310
|
+
i = elements.length;
|
311
|
+
while (i--) {
|
312
|
+
unwrapElement(elements[i]);
|
273
313
|
}
|
314
|
+
return this;
|
274
315
|
}
|
275
|
-
|
276
|
-
|
277
|
-
function filter(callback) {
|
278
|
-
var filteredMatches = [];
|
279
|
-
each(function (match, i) {
|
280
|
-
if (callback(match, i)) {
|
281
|
-
filteredMatches.push(match);
|
282
|
-
}
|
283
|
-
});
|
284
|
-
matches = filteredMatches;
|
285
|
-
return this;
|
286
|
-
}
|
287
|
-
function each(callback) {
|
288
|
-
for (var i = 0, l = matches.length; i < l; i++) {
|
289
|
-
if (callback(matches[i], i) === false) {
|
290
|
-
break;
|
291
|
-
}
|
316
|
+
function matchFromElement(element) {
|
317
|
+
return matches[element.getAttribute('data-mce-index')];
|
292
318
|
}
|
293
|
-
|
294
|
-
|
295
|
-
function wrap(callback) {
|
296
|
-
if (matches.length) {
|
297
|
-
stepThroughMatches(node, matches, genReplacer(callback));
|
319
|
+
function elementFromMatch(match) {
|
320
|
+
return getWrappersByIndex(indexOf(match))[0];
|
298
321
|
}
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
322
|
+
function add(start, length, data) {
|
323
|
+
matches.push({
|
324
|
+
start: start,
|
325
|
+
end: start + length,
|
326
|
+
text: text.substr(start, length),
|
327
|
+
data: data
|
328
|
+
});
|
329
|
+
return this;
|
330
|
+
}
|
331
|
+
function rangeFromMatch(match) {
|
332
|
+
var wrappers = getWrappersByIndex(indexOf(match));
|
333
|
+
var rng = editor.dom.createRng();
|
334
|
+
rng.setStartBefore(wrappers[0]);
|
335
|
+
rng.setEndAfter(wrappers[wrappers.length - 1]);
|
336
|
+
return rng;
|
337
|
+
}
|
338
|
+
function replace(match, text) {
|
339
|
+
var rng = rangeFromMatch(match);
|
340
|
+
rng.deleteContents();
|
341
|
+
if (text.length > 0) {
|
342
|
+
rng.insertNode(editor.dom.doc.createTextNode(text));
|
305
343
|
}
|
344
|
+
return rng;
|
306
345
|
}
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
var elements = getWrappersByIndex(match ? indexOf(match) : null);
|
312
|
-
i = elements.length;
|
313
|
-
while (i--) {
|
314
|
-
unwrapElement(elements[i]);
|
315
|
-
}
|
316
|
-
return this;
|
317
|
-
}
|
318
|
-
function matchFromElement(element) {
|
319
|
-
return matches[element.getAttribute('data-mce-index')];
|
320
|
-
}
|
321
|
-
function elementFromMatch(match) {
|
322
|
-
return getWrappersByIndex(indexOf(match))[0];
|
323
|
-
}
|
324
|
-
function add(start, length, data) {
|
325
|
-
matches.push({
|
326
|
-
start: start,
|
327
|
-
end: start + length,
|
328
|
-
text: text.substr(start, length),
|
329
|
-
data: data
|
330
|
-
});
|
331
|
-
return this;
|
332
|
-
}
|
333
|
-
function rangeFromMatch(match) {
|
334
|
-
var wrappers = getWrappersByIndex(indexOf(match));
|
335
|
-
var rng = editor.dom.createRng();
|
336
|
-
rng.setStartBefore(wrappers[0]);
|
337
|
-
rng.setEndAfter(wrappers[wrappers.length - 1]);
|
338
|
-
return rng;
|
339
|
-
}
|
340
|
-
function replace(match, text) {
|
341
|
-
var rng = rangeFromMatch(match);
|
342
|
-
rng.deleteContents();
|
343
|
-
if (text.length > 0) {
|
344
|
-
rng.insertNode(editor.dom.doc.createTextNode(text));
|
346
|
+
function reset() {
|
347
|
+
matches.splice(0, matches.length);
|
348
|
+
unwrap();
|
349
|
+
return this;
|
345
350
|
}
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
find: find,
|
363
|
-
add: add,
|
364
|
-
wrap: wrap,
|
365
|
-
unwrap: unwrap,
|
366
|
-
replace: replace,
|
367
|
-
rangeFromMatch: rangeFromMatch,
|
368
|
-
indexOf: indexOf
|
369
|
-
};
|
370
|
-
};
|
371
|
-
|
372
|
-
var getTextMatcher = function (editor, textMatcherState) {
|
373
|
-
if (!textMatcherState.get()) {
|
374
|
-
var textMatcher = DomTextMatcher(editor.getBody(), editor);
|
375
|
-
textMatcherState.set(textMatcher);
|
376
|
-
}
|
377
|
-
return textMatcherState.get();
|
378
|
-
};
|
379
|
-
var isEmpty = function (obj) {
|
380
|
-
for (var _ in obj) {
|
381
|
-
return false;
|
382
|
-
}
|
383
|
-
return true;
|
384
|
-
};
|
385
|
-
var defaultSpellcheckCallback = function (editor, pluginUrl, currentLanguageState) {
|
386
|
-
return function (method, text, doneCallback, errorCallback) {
|
387
|
-
var data = {
|
388
|
-
method: method,
|
389
|
-
lang: currentLanguageState.get()
|
351
|
+
text = getText(node);
|
352
|
+
return {
|
353
|
+
text: text,
|
354
|
+
matches: matches,
|
355
|
+
each: each,
|
356
|
+
filter: filter,
|
357
|
+
reset: reset,
|
358
|
+
matchFromElement: matchFromElement,
|
359
|
+
elementFromMatch: elementFromMatch,
|
360
|
+
find: find,
|
361
|
+
add: add,
|
362
|
+
wrap: wrap,
|
363
|
+
unwrap: unwrap,
|
364
|
+
replace: replace,
|
365
|
+
rangeFromMatch: rangeFromMatch,
|
366
|
+
indexOf: indexOf
|
390
367
|
};
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
368
|
+
};
|
369
|
+
|
370
|
+
var getTextMatcher = function (editor, textMatcherState) {
|
371
|
+
if (!textMatcherState.get()) {
|
372
|
+
var textMatcher = DomTextMatcher(editor.getBody(), editor);
|
373
|
+
textMatcherState.set(textMatcher);
|
374
|
+
}
|
375
|
+
return textMatcherState.get();
|
376
|
+
};
|
377
|
+
var isEmpty = function (obj) {
|
378
|
+
for (var _ in obj) {
|
379
|
+
return false;
|
380
|
+
}
|
381
|
+
return true;
|
382
|
+
};
|
383
|
+
var defaultSpellcheckCallback = function (editor, pluginUrl, currentLanguageState) {
|
384
|
+
return function (method, text, doneCallback, errorCallback) {
|
385
|
+
var data = {
|
386
|
+
method: method,
|
387
|
+
lang: currentLanguageState.get()
|
388
|
+
};
|
389
|
+
var postData = '';
|
390
|
+
data[method === 'addToDictionary' ? 'word' : 'text'] = text;
|
391
|
+
global$1.each(data, function (value, key) {
|
392
|
+
if (postData) {
|
393
|
+
postData += '&';
|
394
|
+
}
|
395
|
+
postData += key + '=' + encodeURIComponent(value);
|
396
|
+
});
|
397
|
+
global$3.send({
|
398
|
+
url: new global$2(pluginUrl).toAbsolute(Settings.getRpcUrl(editor)),
|
399
|
+
type: 'post',
|
400
|
+
content_type: 'application/x-www-form-urlencoded',
|
401
|
+
data: postData,
|
402
|
+
success: function (result) {
|
403
|
+
result = JSON.parse(result);
|
404
|
+
if (!result) {
|
405
|
+
var message = editor.translate('Server response wasn\'t proper JSON.');
|
406
|
+
errorCallback(message);
|
407
|
+
} else if (result.error) {
|
408
|
+
errorCallback(result.error);
|
409
|
+
} else {
|
410
|
+
doneCallback(result);
|
411
|
+
}
|
412
|
+
},
|
413
|
+
error: function () {
|
414
|
+
var message = editor.translate('The spelling service was not found: (') + Settings.getRpcUrl(editor) + editor.translate(')');
|
408
415
|
errorCallback(message);
|
409
|
-
} else if (result.error) {
|
410
|
-
errorCallback(result.error);
|
411
|
-
} else {
|
412
|
-
doneCallback(result);
|
413
416
|
}
|
414
|
-
}
|
415
|
-
|
416
|
-
var message = editor.translate('The spelling service was not found: (') + $_1zygcfkajm0ofzxr.getRpcUrl(editor) + editor.translate(')');
|
417
|
-
errorCallback(message);
|
418
|
-
}
|
419
|
-
});
|
417
|
+
});
|
418
|
+
};
|
420
419
|
};
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
420
|
+
var sendRpcCall = function (editor, pluginUrl, currentLanguageState, name, data, successCallback, errorCallback) {
|
421
|
+
var userSpellcheckCallback = Settings.getSpellcheckerCallback(editor);
|
422
|
+
var spellCheckCallback = userSpellcheckCallback ? userSpellcheckCallback : defaultSpellcheckCallback(editor, pluginUrl, currentLanguageState);
|
423
|
+
spellCheckCallback.call(editor.plugins.spellchecker, name, data, successCallback, errorCallback);
|
424
|
+
};
|
425
|
+
var spellcheck = function (editor, pluginUrl, startedState, textMatcherState, lastSuggestionsState, currentLanguageState) {
|
426
|
+
if (finish(editor, startedState, textMatcherState)) {
|
427
|
+
return;
|
428
|
+
}
|
429
|
+
var errorCallback = function (message) {
|
430
|
+
editor.notificationManager.open({
|
431
|
+
text: message,
|
432
|
+
type: 'error'
|
433
|
+
});
|
434
|
+
editor.setProgressState(false);
|
435
|
+
finish(editor, startedState, textMatcherState);
|
436
|
+
};
|
437
|
+
var successCallback = function (data) {
|
438
|
+
markErrors(editor, startedState, textMatcherState, lastSuggestionsState, data);
|
439
|
+
};
|
440
|
+
editor.setProgressState(true);
|
441
|
+
sendRpcCall(editor, pluginUrl, currentLanguageState, 'spellcheck', getTextMatcher(editor, textMatcherState).text, successCallback, errorCallback);
|
442
|
+
editor.focus();
|
443
|
+
};
|
444
|
+
var checkIfFinished = function (editor, startedState, textMatcherState) {
|
445
|
+
if (!editor.dom.select('span.mce-spellchecker-word').length) {
|
446
|
+
finish(editor, startedState, textMatcherState);
|
447
|
+
}
|
448
|
+
};
|
449
|
+
var addToDictionary = function (editor, pluginUrl, startedState, textMatcherState, currentLanguageState, word, spans) {
|
450
|
+
editor.setProgressState(true);
|
451
|
+
sendRpcCall(editor, pluginUrl, currentLanguageState, 'addToDictionary', word, function () {
|
452
|
+
editor.setProgressState(false);
|
453
|
+
editor.dom.remove(spans, true);
|
454
|
+
checkIfFinished(editor, startedState, textMatcherState);
|
455
|
+
}, function (message) {
|
456
|
+
editor.notificationManager.open({
|
457
|
+
text: message,
|
458
|
+
type: 'error'
|
459
|
+
});
|
460
|
+
editor.setProgressState(false);
|
435
461
|
});
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
finish(editor, startedState, textMatcherState);
|
449
|
-
}
|
450
|
-
};
|
451
|
-
var addToDictionary = function (editor, pluginUrl, startedState, textMatcherState, currentLanguageState, word, spans) {
|
452
|
-
editor.setProgressState(true);
|
453
|
-
sendRpcCall(editor, pluginUrl, currentLanguageState, 'addToDictionary', word, function () {
|
454
|
-
editor.setProgressState(false);
|
455
|
-
editor.dom.remove(spans, true);
|
462
|
+
};
|
463
|
+
var ignoreWord = function (editor, startedState, textMatcherState, word, spans, all) {
|
464
|
+
editor.selection.collapse();
|
465
|
+
if (all) {
|
466
|
+
global$1.each(editor.dom.select('span.mce-spellchecker-word'), function (span) {
|
467
|
+
if (span.getAttribute('data-mce-word') === word) {
|
468
|
+
editor.dom.remove(span, true);
|
469
|
+
}
|
470
|
+
});
|
471
|
+
} else {
|
472
|
+
editor.dom.remove(spans, true);
|
473
|
+
}
|
456
474
|
checkIfFinished(editor, startedState, textMatcherState);
|
457
|
-
}
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
if (all) {
|
468
|
-
global$1.each(editor.dom.select('span.mce-spellchecker-word'), function (span) {
|
469
|
-
if (span.getAttribute('data-mce-word') === word) {
|
470
|
-
editor.dom.remove(span, true);
|
471
|
-
}
|
472
|
-
});
|
473
|
-
} else {
|
474
|
-
editor.dom.remove(spans, true);
|
475
|
-
}
|
476
|
-
checkIfFinished(editor, startedState, textMatcherState);
|
477
|
-
};
|
478
|
-
var finish = function (editor, startedState, textMatcherState) {
|
479
|
-
getTextMatcher(editor, textMatcherState).reset();
|
480
|
-
textMatcherState.set(null);
|
481
|
-
if (startedState.get()) {
|
482
|
-
startedState.set(false);
|
483
|
-
$_3ve0l5kfjm0ofzxz.fireSpellcheckEnd(editor);
|
484
|
-
return true;
|
485
|
-
}
|
486
|
-
};
|
487
|
-
var getElmIndex = function (elm) {
|
488
|
-
var value = elm.getAttribute('data-mce-index');
|
489
|
-
if (typeof value === 'number') {
|
490
|
-
return '' + value;
|
491
|
-
}
|
492
|
-
return value;
|
493
|
-
};
|
494
|
-
var findSpansByIndex = function (editor, index) {
|
495
|
-
var nodes;
|
496
|
-
var spans = [];
|
497
|
-
nodes = global$1.toArray(editor.getBody().getElementsByTagName('span'));
|
498
|
-
if (nodes.length) {
|
499
|
-
for (var i = 0; i < nodes.length; i++) {
|
500
|
-
var nodeIndex = getElmIndex(nodes[i]);
|
501
|
-
if (nodeIndex === null || !nodeIndex.length) {
|
502
|
-
continue;
|
503
|
-
}
|
504
|
-
if (nodeIndex === index.toString()) {
|
505
|
-
spans.push(nodes[i]);
|
506
|
-
}
|
475
|
+
};
|
476
|
+
var finish = function (editor, startedState, textMatcherState) {
|
477
|
+
var bookmark = editor.selection.getBookmark();
|
478
|
+
getTextMatcher(editor, textMatcherState).reset();
|
479
|
+
editor.selection.moveToBookmark(bookmark);
|
480
|
+
textMatcherState.set(null);
|
481
|
+
if (startedState.get()) {
|
482
|
+
startedState.set(false);
|
483
|
+
Events.fireSpellcheckEnd(editor);
|
484
|
+
return true;
|
507
485
|
}
|
508
|
-
}
|
509
|
-
return spans;
|
510
|
-
};
|
511
|
-
var markErrors = function (editor, startedState, textMatcherState, lastSuggestionsState, data) {
|
512
|
-
var suggestions, hasDictionarySupport;
|
513
|
-
if (typeof data !== 'string' && data.words) {
|
514
|
-
hasDictionarySupport = !!data.dictionary;
|
515
|
-
suggestions = data.words;
|
516
|
-
} else {
|
517
|
-
suggestions = data;
|
518
|
-
}
|
519
|
-
editor.setProgressState(false);
|
520
|
-
if (isEmpty(suggestions)) {
|
521
|
-
var message = editor.translate('No misspellings found.');
|
522
|
-
editor.notificationManager.open({
|
523
|
-
text: message,
|
524
|
-
type: 'info'
|
525
|
-
});
|
526
|
-
startedState.set(false);
|
527
|
-
return;
|
528
|
-
}
|
529
|
-
lastSuggestionsState.set({
|
530
|
-
suggestions: suggestions,
|
531
|
-
hasDictionarySupport: hasDictionarySupport
|
532
|
-
});
|
533
|
-
getTextMatcher(editor, textMatcherState).find($_1zygcfkajm0ofzxr.getSpellcheckerWordcharPattern(editor)).filter(function (match) {
|
534
|
-
return !!suggestions[match.text];
|
535
|
-
}).wrap(function (match) {
|
536
|
-
return editor.dom.create('span', {
|
537
|
-
'class': 'mce-spellchecker-word',
|
538
|
-
'data-mce-bogus': 1,
|
539
|
-
'data-mce-word': match.text
|
540
|
-
});
|
541
|
-
});
|
542
|
-
startedState.set(true);
|
543
|
-
$_3ve0l5kfjm0ofzxz.fireSpellcheckStart(editor);
|
544
|
-
};
|
545
|
-
var $_92arclkbjm0ofzxt = {
|
546
|
-
spellcheck: spellcheck,
|
547
|
-
checkIfFinished: checkIfFinished,
|
548
|
-
addToDictionary: addToDictionary,
|
549
|
-
ignoreWord: ignoreWord,
|
550
|
-
findSpansByIndex: findSpansByIndex,
|
551
|
-
getElmIndex: getElmIndex,
|
552
|
-
markErrors: markErrors
|
553
|
-
};
|
554
|
-
|
555
|
-
var get = function (editor, startedState, lastSuggestionsState, textMatcherState, currentLanguageState, url) {
|
556
|
-
var getLanguage = function () {
|
557
|
-
return currentLanguageState.get();
|
558
486
|
};
|
559
|
-
var
|
560
|
-
|
487
|
+
var getElmIndex = function (elm) {
|
488
|
+
var value = elm.getAttribute('data-mce-index');
|
489
|
+
if (typeof value === 'number') {
|
490
|
+
return '' + value;
|
491
|
+
}
|
492
|
+
return value;
|
561
493
|
};
|
562
|
-
var
|
563
|
-
|
494
|
+
var findSpansByIndex = function (editor, index) {
|
495
|
+
var nodes;
|
496
|
+
var spans = [];
|
497
|
+
nodes = global$1.toArray(editor.getBody().getElementsByTagName('span'));
|
498
|
+
if (nodes.length) {
|
499
|
+
for (var i = 0; i < nodes.length; i++) {
|
500
|
+
var nodeIndex = getElmIndex(nodes[i]);
|
501
|
+
if (nodeIndex === null || !nodeIndex.length) {
|
502
|
+
continue;
|
503
|
+
}
|
504
|
+
if (nodeIndex === index.toString()) {
|
505
|
+
spans.push(nodes[i]);
|
506
|
+
}
|
507
|
+
}
|
508
|
+
}
|
509
|
+
return spans;
|
564
510
|
};
|
565
|
-
var
|
566
|
-
|
511
|
+
var markErrors = function (editor, startedState, textMatcherState, lastSuggestionsState, data) {
|
512
|
+
var suggestions, hasDictionarySupport;
|
513
|
+
if (typeof data !== 'string' && data.words) {
|
514
|
+
hasDictionarySupport = !!data.dictionary;
|
515
|
+
suggestions = data.words;
|
516
|
+
} else {
|
517
|
+
suggestions = data;
|
518
|
+
}
|
519
|
+
editor.setProgressState(false);
|
520
|
+
if (isEmpty(suggestions)) {
|
521
|
+
var message = editor.translate('No misspellings found.');
|
522
|
+
editor.notificationManager.open({
|
523
|
+
text: message,
|
524
|
+
type: 'info'
|
525
|
+
});
|
526
|
+
startedState.set(false);
|
527
|
+
return;
|
528
|
+
}
|
529
|
+
lastSuggestionsState.set({
|
530
|
+
suggestions: suggestions,
|
531
|
+
hasDictionarySupport: hasDictionarySupport
|
532
|
+
});
|
533
|
+
var bookmark = editor.selection.getBookmark();
|
534
|
+
getTextMatcher(editor, textMatcherState).find(Settings.getSpellcheckerWordcharPattern(editor)).filter(function (match) {
|
535
|
+
return !!suggestions[match.text];
|
536
|
+
}).wrap(function (match) {
|
537
|
+
return editor.dom.create('span', {
|
538
|
+
'class': 'mce-spellchecker-word',
|
539
|
+
'data-mce-bogus': 1,
|
540
|
+
'data-mce-word': match.text
|
541
|
+
});
|
542
|
+
});
|
543
|
+
editor.selection.moveToBookmark(bookmark);
|
544
|
+
startedState.set(true);
|
545
|
+
Events.fireSpellcheckStart(editor);
|
567
546
|
};
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
547
|
+
var Actions = {
|
548
|
+
spellcheck: spellcheck,
|
549
|
+
checkIfFinished: checkIfFinished,
|
550
|
+
addToDictionary: addToDictionary,
|
551
|
+
ignoreWord: ignoreWord,
|
552
|
+
findSpansByIndex: findSpansByIndex,
|
553
|
+
getElmIndex: getElmIndex,
|
554
|
+
markErrors: markErrors
|
573
555
|
};
|
574
|
-
};
|
575
|
-
var $_683bglk9jm0ofzxp = { get: get };
|
576
556
|
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
557
|
+
var get = function (editor, startedState, lastSuggestionsState, textMatcherState, currentLanguageState, url) {
|
558
|
+
var getLanguage = function () {
|
559
|
+
return currentLanguageState.get();
|
560
|
+
};
|
561
|
+
var getWordCharPattern = function () {
|
562
|
+
return Settings.getSpellcheckerWordcharPattern(editor);
|
563
|
+
};
|
564
|
+
var markErrors = function (data) {
|
565
|
+
Actions.markErrors(editor, startedState, textMatcherState, lastSuggestionsState, data);
|
566
|
+
};
|
567
|
+
var getTextMatcher = function () {
|
568
|
+
return textMatcherState.get();
|
569
|
+
};
|
570
|
+
return {
|
571
|
+
getTextMatcher: getTextMatcher,
|
572
|
+
getWordCharPattern: getWordCharPattern,
|
573
|
+
markErrors: markErrors,
|
574
|
+
getLanguage: getLanguage
|
575
|
+
};
|
576
|
+
};
|
577
|
+
var Api = { get: get };
|
583
578
|
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
items.push({
|
588
|
-
selectable: true,
|
589
|
-
text: languageValue.name,
|
590
|
-
data: languageValue.value
|
579
|
+
var register = function (editor, pluginUrl, startedState, textMatcherState, lastSuggestionsState, currentLanguageState) {
|
580
|
+
editor.addCommand('mceSpellCheck', function () {
|
581
|
+
Actions.spellcheck(editor, pluginUrl, startedState, textMatcherState, lastSuggestionsState, currentLanguageState);
|
591
582
|
});
|
592
|
-
}
|
593
|
-
|
594
|
-
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
|
583
|
+
};
|
584
|
+
var Commands = { register: register };
|
585
|
+
|
586
|
+
var buildMenuItems = function (listName, languageValues) {
|
587
|
+
var items = [];
|
588
|
+
global$1.each(languageValues, function (languageValue) {
|
589
|
+
items.push({
|
590
|
+
selectable: true,
|
591
|
+
text: languageValue.name,
|
592
|
+
data: languageValue.value
|
593
|
+
});
|
600
594
|
});
|
595
|
+
return items;
|
601
596
|
};
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
name: langPair[0],
|
608
|
-
value: langPair[1]
|
609
|
-
};
|
610
|
-
});
|
611
|
-
};
|
612
|
-
var register$1 = function (editor, pluginUrl, startedState, textMatcherState, currentLanguageState, lastSuggestionsState) {
|
613
|
-
var languageMenuItems = buildMenuItems('Language', getItems(editor));
|
614
|
-
var startSpellchecking = function () {
|
615
|
-
$_92arclkbjm0ofzxt.spellcheck(editor, pluginUrl, startedState, textMatcherState, lastSuggestionsState, currentLanguageState);
|
616
|
-
};
|
617
|
-
var buttonArgs = {
|
618
|
-
tooltip: 'Spellcheck',
|
619
|
-
onclick: startSpellchecking,
|
620
|
-
onPostRender: function (e) {
|
621
|
-
var ctrl = e.control;
|
622
|
-
editor.on('SpellcheckStart SpellcheckEnd', function () {
|
623
|
-
ctrl.active(startedState.get());
|
597
|
+
var updateSelection = function (editor, currentLanguageState) {
|
598
|
+
return function (e) {
|
599
|
+
var selectedLanguage = currentLanguageState.get();
|
600
|
+
e.control.items().each(function (ctrl) {
|
601
|
+
ctrl.active(ctrl.settings.data === selectedLanguage);
|
624
602
|
});
|
625
|
-
}
|
603
|
+
};
|
604
|
+
};
|
605
|
+
var getItems = function (editor) {
|
606
|
+
return global$1.map(Settings.getLanguages(editor).split(','), function (langPair) {
|
607
|
+
langPair = langPair.split('=');
|
608
|
+
return {
|
609
|
+
name: langPair[0],
|
610
|
+
value: langPair[1]
|
611
|
+
};
|
612
|
+
});
|
626
613
|
};
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
buttonArgs.onselect = function (e) {
|
632
|
-
currentLanguageState.set(e.control.settings.data);
|
614
|
+
var register$1 = function (editor, pluginUrl, startedState, textMatcherState, currentLanguageState, lastSuggestionsState) {
|
615
|
+
var languageMenuItems = buildMenuItems('Language', getItems(editor));
|
616
|
+
var startSpellchecking = function () {
|
617
|
+
Actions.spellcheck(editor, pluginUrl, startedState, textMatcherState, lastSuggestionsState, currentLanguageState);
|
633
618
|
};
|
634
|
-
|
635
|
-
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
|
646
|
-
|
619
|
+
var buttonArgs = {
|
620
|
+
tooltip: 'Spellcheck',
|
621
|
+
onclick: startSpellchecking,
|
622
|
+
onPostRender: function (e) {
|
623
|
+
var ctrl = e.control;
|
624
|
+
editor.on('SpellcheckStart SpellcheckEnd', function () {
|
625
|
+
ctrl.active(startedState.get());
|
626
|
+
});
|
627
|
+
}
|
628
|
+
};
|
629
|
+
if (languageMenuItems.length > 1) {
|
630
|
+
buttonArgs.type = 'splitbutton';
|
631
|
+
buttonArgs.menu = languageMenuItems;
|
632
|
+
buttonArgs.onshow = updateSelection(editor, currentLanguageState);
|
633
|
+
buttonArgs.onselect = function (e) {
|
634
|
+
currentLanguageState.set(e.control.settings.data);
|
635
|
+
};
|
647
636
|
}
|
648
|
-
|
649
|
-
|
650
|
-
|
637
|
+
editor.addButton('spellchecker', buttonArgs);
|
638
|
+
editor.addMenuItem('spellchecker', {
|
639
|
+
text: 'Spellcheck',
|
640
|
+
context: 'tools',
|
641
|
+
onclick: startSpellchecking,
|
642
|
+
selectable: true,
|
643
|
+
onPostRender: function () {
|
644
|
+
var self = this;
|
645
|
+
self.active(startedState.get());
|
646
|
+
editor.on('SpellcheckStart SpellcheckEnd', function () {
|
647
|
+
self.active(startedState.get());
|
648
|
+
});
|
649
|
+
}
|
650
|
+
});
|
651
|
+
};
|
652
|
+
var Buttons = { register: register$1 };
|
651
653
|
|
652
|
-
|
654
|
+
var global$4 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');
|
653
655
|
|
654
|
-
|
656
|
+
var global$5 = tinymce.util.Tools.resolve('tinymce.ui.Factory');
|
655
657
|
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
|
664
|
-
|
665
|
-
|
666
|
-
|
667
|
-
|
668
|
-
});
|
669
|
-
items.push({ text: '-' });
|
670
|
-
var hasDictionarySupport = lastSuggestionsState.get().hasDictionarySupport;
|
671
|
-
if (hasDictionarySupport) {
|
672
|
-
items.push({
|
673
|
-
text: 'Add to Dictionary',
|
674
|
-
onclick: function () {
|
675
|
-
$_92arclkbjm0ofzxt.addToDictionary(editor, pluginUrl, startedState, textMatcherState, currentLanguageState, word, spans);
|
676
|
-
}
|
658
|
+
var suggestionsMenu;
|
659
|
+
var showSuggestions = function (editor, pluginUrl, lastSuggestionsState, startedState, textMatcherState, currentLanguageState, word, spans) {
|
660
|
+
var items = [], suggestions = lastSuggestionsState.get().suggestions[word];
|
661
|
+
global$1.each(suggestions, function (suggestion) {
|
662
|
+
items.push({
|
663
|
+
text: suggestion,
|
664
|
+
onclick: function () {
|
665
|
+
editor.insertContent(editor.dom.encode(suggestion));
|
666
|
+
editor.dom.remove(spans);
|
667
|
+
Actions.checkIfFinished(editor, startedState, textMatcherState);
|
668
|
+
}
|
669
|
+
});
|
677
670
|
});
|
678
|
-
|
679
|
-
|
680
|
-
{
|
681
|
-
|
682
|
-
|
683
|
-
|
671
|
+
items.push({ text: '-' });
|
672
|
+
var hasDictionarySupport = lastSuggestionsState.get().hasDictionarySupport;
|
673
|
+
if (hasDictionarySupport) {
|
674
|
+
items.push({
|
675
|
+
text: 'Add to Dictionary',
|
676
|
+
onclick: function () {
|
677
|
+
Actions.addToDictionary(editor, pluginUrl, startedState, textMatcherState, currentLanguageState, word, spans);
|
678
|
+
}
|
679
|
+
});
|
680
|
+
}
|
681
|
+
items.push.apply(items, [
|
682
|
+
{
|
683
|
+
text: 'Ignore',
|
684
|
+
onclick: function () {
|
685
|
+
Actions.ignoreWord(editor, startedState, textMatcherState, word, spans);
|
686
|
+
}
|
687
|
+
},
|
688
|
+
{
|
689
|
+
text: 'Ignore all',
|
690
|
+
onclick: function () {
|
691
|
+
Actions.ignoreWord(editor, startedState, textMatcherState, word, spans, true);
|
692
|
+
}
|
684
693
|
}
|
685
|
-
|
686
|
-
{
|
687
|
-
|
688
|
-
|
689
|
-
|
694
|
+
]);
|
695
|
+
suggestionsMenu = global$5.create('menu', {
|
696
|
+
items: items,
|
697
|
+
context: 'contextmenu',
|
698
|
+
onautohide: function (e) {
|
699
|
+
if (e.target.className.indexOf('spellchecker') !== -1) {
|
700
|
+
e.preventDefault();
|
701
|
+
}
|
702
|
+
},
|
703
|
+
onhide: function () {
|
704
|
+
suggestionsMenu.remove();
|
705
|
+
suggestionsMenu = null;
|
690
706
|
}
|
707
|
+
});
|
708
|
+
suggestionsMenu.renderTo(document.body);
|
709
|
+
var pos = global$4.DOM.getPos(editor.getContentAreaContainer());
|
710
|
+
var targetPos = editor.dom.getPos(spans[0]);
|
711
|
+
var root = editor.dom.getRoot();
|
712
|
+
if (root.nodeName === 'BODY') {
|
713
|
+
targetPos.x -= root.ownerDocument.documentElement.scrollLeft || root.scrollLeft;
|
714
|
+
targetPos.y -= root.ownerDocument.documentElement.scrollTop || root.scrollTop;
|
715
|
+
} else {
|
716
|
+
targetPos.x -= root.scrollLeft;
|
717
|
+
targetPos.y -= root.scrollTop;
|
691
718
|
}
|
692
|
-
|
693
|
-
|
694
|
-
|
695
|
-
|
696
|
-
|
697
|
-
|
719
|
+
pos.x += targetPos.x;
|
720
|
+
pos.y += targetPos.y;
|
721
|
+
suggestionsMenu.moveTo(pos.x, pos.y + spans[0].offsetHeight);
|
722
|
+
};
|
723
|
+
var setup = function (editor, pluginUrl, lastSuggestionsState, startedState, textMatcherState, currentLanguageState) {
|
724
|
+
editor.on('click', function (e) {
|
725
|
+
var target = e.target;
|
726
|
+
if (target.className === 'mce-spellchecker-word') {
|
698
727
|
e.preventDefault();
|
728
|
+
var spans = Actions.findSpansByIndex(editor, Actions.getElmIndex(target));
|
729
|
+
if (spans.length > 0) {
|
730
|
+
var rng = editor.dom.createRng();
|
731
|
+
rng.setStartBefore(spans[0]);
|
732
|
+
rng.setEndAfter(spans[spans.length - 1]);
|
733
|
+
editor.selection.setRng(rng);
|
734
|
+
showSuggestions(editor, pluginUrl, lastSuggestionsState, startedState, textMatcherState, currentLanguageState, target.getAttribute('data-mce-word'), spans);
|
735
|
+
}
|
699
736
|
}
|
700
|
-
}
|
701
|
-
|
702
|
-
|
703
|
-
|
704
|
-
|
705
|
-
|
706
|
-
|
707
|
-
|
708
|
-
|
709
|
-
|
710
|
-
|
711
|
-
|
712
|
-
|
713
|
-
|
714
|
-
targetPos.x -= root.scrollLeft;
|
715
|
-
targetPos.y -= root.scrollTop;
|
716
|
-
}
|
717
|
-
pos.x += targetPos.x;
|
718
|
-
pos.y += targetPos.y;
|
719
|
-
suggestionsMenu.moveTo(pos.x, pos.y + spans[0].offsetHeight);
|
720
|
-
};
|
721
|
-
var setup = function (editor, pluginUrl, lastSuggestionsState, startedState, textMatcherState, currentLanguageState) {
|
722
|
-
editor.on('click', function (e) {
|
723
|
-
var target = e.target;
|
724
|
-
if (target.className === 'mce-spellchecker-word') {
|
725
|
-
e.preventDefault();
|
726
|
-
var spans = $_92arclkbjm0ofzxt.findSpansByIndex(editor, $_92arclkbjm0ofzxt.getElmIndex(target));
|
727
|
-
if (spans.length > 0) {
|
728
|
-
var rng = editor.dom.createRng();
|
729
|
-
rng.setStartBefore(spans[0]);
|
730
|
-
rng.setEndAfter(spans[spans.length - 1]);
|
731
|
-
editor.selection.setRng(rng);
|
732
|
-
showSuggestions(editor, pluginUrl, lastSuggestionsState, startedState, textMatcherState, currentLanguageState, target.getAttribute('data-mce-word'), spans);
|
733
|
-
}
|
737
|
+
});
|
738
|
+
};
|
739
|
+
var SuggestionsMenu = { setup: setup };
|
740
|
+
|
741
|
+
global.add('spellchecker', function (editor, pluginUrl) {
|
742
|
+
if (DetectProPlugin.hasProPlugin(editor) === false) {
|
743
|
+
var startedState = Cell(false);
|
744
|
+
var currentLanguageState = Cell(Settings.getLanguage(editor));
|
745
|
+
var textMatcherState = Cell(null);
|
746
|
+
var lastSuggestionsState = Cell(null);
|
747
|
+
Buttons.register(editor, pluginUrl, startedState, textMatcherState, currentLanguageState, lastSuggestionsState);
|
748
|
+
SuggestionsMenu.setup(editor, pluginUrl, lastSuggestionsState, startedState, textMatcherState, currentLanguageState);
|
749
|
+
Commands.register(editor, pluginUrl, startedState, textMatcherState, lastSuggestionsState, currentLanguageState);
|
750
|
+
return Api.get(editor, startedState, lastSuggestionsState, textMatcherState, currentLanguageState, pluginUrl);
|
734
751
|
}
|
735
752
|
});
|
736
|
-
|
737
|
-
var $_1vacjdkjjm0ofzyb = { setup: setup };
|
738
|
-
|
739
|
-
global.add('spellchecker', function (editor, pluginUrl) {
|
740
|
-
if ($_9tnsahk7jm0ofzx4.hasProPlugin(editor) === false) {
|
741
|
-
var startedState = Cell(false);
|
742
|
-
var currentLanguageState = Cell($_1zygcfkajm0ofzxr.getLanguage(editor));
|
743
|
-
var textMatcherState = Cell(null);
|
744
|
-
var lastSuggestionsState = Cell(null);
|
745
|
-
$_9frydykijm0ofzy9.register(editor, pluginUrl, startedState, textMatcherState, currentLanguageState, lastSuggestionsState);
|
746
|
-
$_1vacjdkjjm0ofzyb.setup(editor, pluginUrl, lastSuggestionsState, startedState, textMatcherState, currentLanguageState);
|
747
|
-
$_te08fkhjm0ofzy7.register(editor, pluginUrl, startedState, textMatcherState, lastSuggestionsState, currentLanguageState);
|
748
|
-
return $_683bglk9jm0ofzxp.get(editor, startedState, lastSuggestionsState, textMatcherState, currentLanguageState, pluginUrl);
|
753
|
+
function Plugin () {
|
749
754
|
}
|
750
|
-
});
|
751
|
-
function Plugin () {
|
752
|
-
}
|
753
755
|
|
754
|
-
|
756
|
+
return Plugin;
|
755
757
|
|
756
758
|
}());
|
757
759
|
})();
|