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 e=tinymce.util.Tools.resolve("tinymce.PluginManager"),d=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),l=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),n=tinymce.util.Tools.resolve("tinymce.util.VK"),p=tinymce.util.Tools.resolve("tinymce.dom.BookmarkManager"),v=tinymce.util.Tools.resolve("tinymce.util.Tools"),t=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),o=function(e){return e&&"BR"===e.nodeName},r=function(e){return e&&3===e.nodeType},h=function(e){return e&&/^(OL|UL|DL)$/.test(e.nodeName)},i=function(e){return e&&/^(LI|DT|DD)$/.test(e.nodeName)},a=function(e){return e&&/^(TH|TD)$/.test(e.nodeName)},C=o,s=function(e){return e.parentNode.firstChild===e},c=function(e){return e.parentNode.lastChild===e},y=function(e,t){return t&&!!e.schema.getTextBlockElements()[t.nodeName]},f=function(e,t){return e&&e.nodeName in t},u=function(e,t){return!!o(t)&&!(!e.isBlock(t.nextSibling)||o(t.previousSibling))},m=function(e,t,n){var o=e.isEmpty(t);return!(n&&0<e.select("span[data-mce-type=bookmark]",t).length)&&o},g=function(e,t){return e.isChildOf(t,e.getRoot())},N=function(e,t){var n=d.getNode(e,t);return i(e)&&r(n)?{container:n,offset:t>=e.childNodes.length?n.data.length:0}:{container:e,offset:t}},L=function(e){var t=e.cloneRange(),n=N(e.startContainer,e.startOffset);t.setStart(n.container,n.offset);var o=N(e.endContainer,e.endOffset);return t.setEnd(o.container,o.offset),t},S=t.DOM,b=function(r){var i={},e=function(e){var t,n,o;n=r[e?"startContainer":"endContainer"],o=r[e?"startOffset":"endOffset"],1===n.nodeType&&(t=S.create("span",{"data-mce-type":"bookmark"}),n.hasChildNodes()?(o=Math.min(o,n.childNodes.length-1),e?n.insertBefore(t,n.childNodes[o]):S.insertAfter(t,n.childNodes[o])):n.appendChild(t),n=t,o=0),i[e?"startContainer":"endContainer"]=n,i[e?"startOffset":"endOffset"]=o};return e(!0),r.collapsed||e(),i},D=function(r){function e(e){var t,n,o;t=o=r[e?"startContainer":"endContainer"],n=r[e?"startOffset":"endOffset"],t&&(1===t.nodeType&&(n=function(e){for(var t=e.parentNode.firstChild,n=0;t;){if(t===e)return n;1===t.nodeType&&"bookmark"===t.getAttribute("data-mce-type")||n++,t=t.nextSibling}return-1}(t),t=t.parentNode,S.remove(o),!t.hasChildNodes()&&S.isBlock(t)&&t.appendChild(S.create("br"))),r[e?"startContainer":"endContainer"]=t,r[e?"startOffset":"endOffset"]=n)}e(!0),e();var t=S.createRng();return t.setStart(r.startContainer,r.startOffset),r.endContainer&&t.setEnd(r.endContainer,r.endOffset),L(t)},k=t.DOM,T=function(e,t){var n,o=t.parentNode;"LI"===o.nodeName&&o.firstChild===t&&((n=o.previousSibling)&&"LI"===n.nodeName?(n.appendChild(t),m(e,o)&&k.remove(o)):k.setStyle(o,"listStyleType","none")),h(o)&&(n=o.previousSibling)&&"LI"===n.nodeName&&n.appendChild(t)},I=function(t,e){v.each(v.grep(t.select("ol,ul",e)),function(e){T(t,e)})},B=tinymce.util.Tools.resolve("tinymce.dom.DomQuery"),R=function(e){var t=e.selection.getStart(!0);return e.dom.getParent(t,"OL,UL,DL",O(e,t))},O=function(e,t){var n=e.dom.getParents(t,"TD,TH");return 0<n.length?n[0]:e.getBody()},E={getParentList:R,getSelectedSubLists:function(e){var t,n,o,r=R(e),i=e.selection.getSelectedBlocks();return o=i,(n=r)&&1===o.length&&o[0]===n?(t=r,v.grep(t.querySelectorAll("ol,ul,dl"),function(e){return h(e)})):v.grep(i,function(e){return h(e)&&r!==e})},getSelectedListItems:function(e){var n,t,o,r=e.selection.getSelectedBlocks();return v.grep((n=e,t=r,o=v.map(t,function(e){var t=n.dom.getParent(e,"li,dd,dt",O(n,e));return t||e}),B.unique(o)),function(e){return i(e)})},getClosestListRootElm:O},A=tinymce.util.Tools.resolve("tinymce.Env"),P=t.DOM,x=function(e,t,n){var o,r,i,a=P.createFragment(),s=e.schema.getBlockElements();if(e.settings.forced_root_block&&(n=n||e.settings.forced_root_block),n&&((r=P.create(n)).tagName===e.settings.forced_root_block&&P.setAttribs(r,e.settings.forced_root_block_attrs),f(t.firstChild,s)||a.appendChild(r)),t)for(;o=t.firstChild;){var d=o.nodeName;i||"SPAN"===d&&"bookmark"===o.getAttribute("data-mce-type")||(i=!0),f(o,s)?(a.appendChild(o),r=null):n?(r||(r=P.create(n),a.appendChild(r)),r.appendChild(o)):a.appendChild(o)}return e.settings.forced_root_block?i||A.ie&&!(10<A.ie)||r.appendChild(P.create("br",{"data-mce-bogus":"1"})):a.appendChild(P.create("br")),a},_=t.DOM,M=function(e,t,n,o){var r,i,a,s,d;for(a=_.select('span[data-mce-type="bookmark"]',t),o=o||x(e,n),(r=_.createRng()).setStartAfter(n),r.setEndAfter(t),s=(i=r.extractContents()).firstChild;s;s=s.firstChild)if("LI"===s.nodeName&&e.dom.isEmpty(s)){_.remove(s);break}e.dom.isEmpty(i)||_.insertAfter(i,t),_.insertAfter(o,t),m(e.dom,n.parentNode)&&(d=n.parentNode,v.each(a,function(e){d.parentNode.insertBefore(e,n.parentNode)}),_.remove(d)),_.remove(n),m(e.dom,t)&&_.remove(t)},U=t.DOM,H=function(e,t){m(e,t)&&U.remove(t)},$=function(e,t){var n,o,r=t.parentNode;return r?(n=r.parentNode,r===e.getBody()||("DD"===t.nodeName?U.rename(t,"DT"):s(t)&&c(t)?"LI"===n.nodeName?(U.insertAfter(t,n),H(e.dom,n),U.remove(r)):h(n)?U.remove(r,!0):(n.insertBefore(x(e,t),r),U.remove(r)):s(t)?"LI"===n.nodeName?(U.insertAfter(t,n),t.appendChild(r),H(e.dom,n)):h(n)?n.insertBefore(t,r):(n.insertBefore(x(e,t),r),U.remove(t)):c(t)?"LI"===n.nodeName?U.insertAfter(t,n):h(n)?U.insertAfter(t,r):(U.insertAfter(x(e,t),r),U.remove(t)):("LI"===n.nodeName?(r=n,o=x(e,t,"LI")):o=h(n)?x(e,t,"LI"):x(e,t),M(e,r,t,o),I(e.dom,r.parentNode)))):H(e.dom,t),!0},w=$,K=function(e){var t=E.getSelectedListItems(e);if(t.length){var n=b(e.selection.getRng()),o=void 0,r=void 0,i=E.getClosestListRootElm(e,e.selection.getStart(!0));for(o=t.length;o--;)for(var a=t[o].parentNode;a&&a!==i;){for(r=t.length;r--;)if(t[r]===a){t.splice(o,1);break}a=a.parentNode}for(o=0;o<t.length&&($(e,t[o])||0!==o);o++);return e.selection.setRng(D(n)),e.nodeChanged(),!0}},Q=function(n,e){v.each(e,function(e,t){n.setAttribute(t,e)})},W=function(e,t,n){var o,r,i,a,s,d,l;o=e,r=t,a=(i=n)["list-style-type"]?i["list-style-type"]:null,o.setStyle(r,"list-style-type",a),s=e,Q(d=t,(l=n)["list-attributes"]),v.each(s.select("li",d),function(e){Q(e,l["list-item-attributes"])})},j=function(e,t,n,o){var r,i;for(r=t[n?"startContainer":"endContainer"],i=t[n?"startOffset":"endOffset"],1===r.nodeType&&(r=r.childNodes[Math.min(i,r.childNodes.length-1)]||r),!n&&C(r.nextSibling)&&(r=r.nextSibling);r.parentNode!==o;){if(y(e,r))return r;if(/^(TD|TH)$/.test(r.parentNode.nodeName))return r;r=r.parentNode}return r},q=function(c,f,u){void 0===u&&(u={});var e,t=c.selection.getRng(!0),m="LI",n=E.getClosestListRootElm(c,c.selection.getStart(!0)),g=c.dom;"false"!==g.getContentEditable(c.selection.getNode())&&("DL"===(f=f.toUpperCase())&&(m="DT"),e=b(t),v.each(function(n,e,o){for(var r,i=[],a=n.dom,t=j(n,e,!0,o),s=j(n,e,!1,o),d=[],l=t;l&&(d.push(l),l!==s);l=l.nextSibling);return v.each(d,function(e){if(y(n,e))return i.push(e),void(r=null);if(a.isBlock(e)||C(e))return C(e)&&a.remove(e),void(r=null);var t=e.nextSibling;p.isBookmarkNode(e)&&(y(n,t)||!t&&e.parentNode===o)?r=null:(r||(r=a.create("p"),e.parentNode.insertBefore(r,e),i.push(r)),r.appendChild(e))}),i}(c,t,n),function(e){var t,n,o,r,i,a,s,d,l;(n=e.previousSibling)&&h(n)&&n.nodeName===f&&(o=n,r=u,i=g.getStyle(o,"list-style-type"),a=r?r["list-style-type"]:"",i===(a=null===a?"":a))?(t=n,e=g.rename(e,m),n.appendChild(e)):(t=g.create(f),e.parentNode.insertBefore(t,e),t.appendChild(e),e=g.rename(e,m)),s=g,d=e,l=["margin","margin-right","margin-bottom","margin-left","margin-top","padding","padding-right","padding-bottom","padding-left","padding-top"],v.each(l,function(e){var t;return s.setStyle(d,((t={})[e]="",t))}),W(g,t,u),z(c.dom,t)}),c.selection.setRng(D(e)))},F=function(o){var e=b(o.selection.getRng(!0)),r=E.getClosestListRootElm(o,o.selection.getStart(!0)),t=E.getSelectedListItems(o),n=v.grep(t,function(e){return o.dom.isEmpty(e)});t=v.grep(t,function(e){return!o.dom.isEmpty(e)}),v.each(n,function(e){m(o.dom,e)&&w(o,e)}),v.each(t,function(e){var t,n;if(e.parentNode!==o.getBody()){for(t=e;t&&t!==r;t=t.parentNode)h(t)&&(n=t);M(o,n,e),I(o.dom,n.parentNode)}}),o.selection.setRng(D(e))},V=function(e,t,n){return d=n,(s=t)&&d&&h(s)&&s.nodeName===d.nodeName&&(i=t,a=n,(r=e).getStyle(i,"list-style-type",!0)===r.getStyle(a,"list-style-type",!0))&&(o=n,t.className===o.className);var o,r,i,a,s,d},z=function(e,t){var n,o;if(n=t.nextSibling,V(e,t,n)){for(;o=n.firstChild;)t.appendChild(o);e.remove(n)}if(n=t.previousSibling,V(e,t,n)){for(;o=n.lastChild;)t.insertBefore(o,t.firstChild);e.remove(n)}},G=function(t,e,n,o,r){if(e.nodeName!==o||J(r)){var i=b(t.selection.getRng(!0));v.each([e].concat(n),function(e){!function(e,t,n,o){if(t.nodeName!==n){var r=e.rename(t,n);W(e,r,o)}else W(e,t,o)}(t.dom,e,o,r)}),t.selection.setRng(D(i))}else F(t)},J=function(e){return"list-style-type"in e},X={toggleList:function(e,t,n){var o=E.getParentList(e),r=E.getSelectedSubLists(e);n=n||{},o&&0<r.length?G(e,o,r,t,n):function(e,t,n,o){if(t!==e.getBody())if(t)if(t.nodeName!==n||J(o)){var r=b(e.selection.getRng(!0));W(e.dom,t,o),z(e.dom,e.dom.rename(t,n)),e.selection.setRng(D(r))}else F(e);else q(e,n,o)}(e,o,t,n)},removeList:F,mergeWithAdjacentLists:z},Y=function(e,t,n,o){var r,i,a=t.startContainer,s=t.startOffset;if(3===a.nodeType&&(n?s<a.data.length:0<s))return a;for(r=e.schema.getNonEmptyElements(),1===a.nodeType&&(a=d.getNode(a,s)),i=new l(a,o),n&&u(e.dom,a)&&i.next();a=i[n?"next":"prev2"]();){if("LI"===a.nodeName&&!a.hasChildNodes())return a;if(r[a.nodeName])return a;if(3===a.nodeType&&0<a.data.length)return a}},Z=function(e,t){var n=t.childNodes;return 1===n.length&&!h(n[0])&&e.isBlock(n[0])},ee=function(e,t,n){var o,r,i,a;if(r=Z(e,n)?n.firstChild:n,Z(i=e,a=t)&&i.remove(a.firstChild,!0),!m(e,t,!0))for(;o=t.firstChild;)r.appendChild(o)},te=function(e,t,n){var o,r,i=t.parentNode;g(e,t)&&g(e,n)&&(h(n.lastChild)&&(r=n.lastChild),i===n.lastChild&&C(i.previousSibling)&&e.remove(i.previousSibling),(o=n.lastChild)&&C(o)&&t.hasChildNodes()&&e.remove(o),m(e,n,!0)&&e.$(n).empty(),ee(e,t,n),r&&n.appendChild(r),e.remove(t),m(e,i)&&i!==e.getRoot()&&e.remove(i))},ne=function(e,t,n,o){var r,i,a,s=e.dom;if(s.isEmpty(o))i=n,a=o,(r=e).dom.$(a).empty(),te(r.dom,i,a),r.selection.setCursorLocation(a);else{var d=b(t);te(s,n,o),e.selection.setRng(D(d))}},oe=function(e,t){var n,o,r,i=e.dom,a=e.selection,s=a.getStart(),d=E.getClosestListRootElm(e,s),l=i.getParent(a.getStart(),"LI",d);if(l){if((n=l.parentNode)===e.getBody()&&m(i,n))return!0;if(o=L(a.getRng(!0)),(r=i.getParent(Y(e,o,t,d),"LI",d))&&r!==l)return t?ne(e,o,r,l):function(e,t,n,o){var r=b(t);te(e.dom,n,o);var i=D(r);e.selection.setRng(i)}(e,o,l,r),!0;if(!r&&!t)return X.removeList(e),!0}return!1},re=function(e,t){return oe(e,t)||function(r,i){var a=r.dom,e=r.selection.getStart(),s=E.getClosestListRootElm(r,e),d=a.getParent(e,a.isBlock,s);if(d&&a.isEmpty(d)){var t=L(r.selection.getRng(!0)),l=a.getParent(Y(r,t,i,s),"LI",s);if(l)return r.undoManager.transact(function(){var e,t,n,o;t=d,n=s,o=(e=a).getParent(t.parentNode,e.isBlock,n),e.remove(t),o&&e.isEmpty(o)&&e.remove(o),X.mergeWithAdjacentLists(a,l.parentNode),r.selection.select(l,!0),r.selection.collapse(i)}),!0}return!1}(e,t)},ie=function(e,t){return e.selection.isCollapsed()?re(e,t):(o=(n=e).selection.getStart(),r=E.getClosestListRootElm(n,o),!!(n.dom.getParent(o,"LI,DT,DD",r)||0<E.getSelectedListItems(n).length)&&(n.undoManager.transact(function(){n.execCommand("Delete"),I(n.dom,n.getBody())}),!0));var n,o,r},ae=function(t){t.on("keydown",function(e){e.keyCode===n.BACKSPACE?ie(t,!1)&&e.preventDefault():e.keyCode===n.DELETE&&ie(t,!0)&&e.preventDefault()})},se=ie,de=function(t){return{backspaceDelete:function(e){se(t,e)}}},le=t.DOM,ce=function(e,t){var n;if(h(e)){for(;n=e.firstChild;)t.appendChild(n);le.remove(e)}},fe=function(e){var t,n,o,r,i=E.getSelectedListItems(e);if(i.length){for(var a=b(e.selection.getRng(!0)),s=0;s<i.length&&(t=i[s],r=o=n=void 0,("DT"===t.nodeName?(le.rename(t,"DD"),1):(n=t.previousSibling)&&h(n)?(n.appendChild(t),1):n&&"LI"===n.nodeName&&h(n.lastChild)?(n.lastChild.appendChild(t),ce(t.lastChild,n.lastChild),1):(n=t.nextSibling)&&h(n)?(n.insertBefore(t,n.firstChild),1):(n=t.previousSibling)&&"LI"===n.nodeName&&(o=le.create(t.parentNode.nodeName),(r=le.getStyle(t.parentNode,"listStyleType"))&&le.setStyle(o,"listStyleType",r),n.appendChild(o),o.appendChild(t),ce(t.lastChild,o),1))||0!==s);s++);return e.selection.setRng(D(a)),e.nodeChanged(),!0}},ue=function(t,n){return function(){var e=t.dom.getParent(t.selection.getStart(),"UL,OL,DL");return e&&e.nodeName===n}},me=function(o){o.on("BeforeExecCommand",function(e){var t,n=e.command.toLowerCase();if("indent"===n?fe(o)&&(t=!0):"outdent"===n&&K(o)&&(t=!0),t)return o.fire("ExecCommand",{command:e.command}),e.preventDefault(),!0}),o.addCommand("InsertUnorderedList",function(e,t){X.toggleList(o,"UL",t)}),o.addCommand("InsertOrderedList",function(e,t){X.toggleList(o,"OL",t)}),o.addCommand("InsertDefinitionList",function(e,t){X.toggleList(o,"DL",t)}),o.addQueryStateHandler("InsertUnorderedList",ue(o,"UL")),o.addQueryStateHandler("InsertOrderedList",ue(o,"OL")),o.addQueryStateHandler("InsertDefinitionList",ue(o,"DL"))},ge=function(e){return e.getParam("lists_indent_on_tab",!0)},pe=function(e){var t;ge(e)&&(t=e).on("keydown",function(e){e.keyCode!==n.TAB||n.metaKeyPressed(e)||t.dom.getParent(t.selection.getStart(),"LI,DT,DD")&&(e.preventDefault(),e.shiftKey?K(t):fe(t))}),ae(e)},ve=function(t,i){return function(e){var r=e.control;t.on("NodeChange",function(e){var t=function(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n;return-1}(e.parents,a),n=-1!==t?e.parents.slice(0,t):e.parents,o=v.grep(n,h);r.active(0<o.length&&o[0].nodeName===i)})}},he=function(e){var t,n,o,r;n="advlist",o=(t=e).settings.plugins?t.settings.plugins:"",-1===v.inArray(o.split(/[ ,]/),n)&&(e.addButton("numlist",{active:!1,title:"Numbered list",cmd:"InsertOrderedList",onPostRender:ve(e,"OL")}),e.addButton("bullist",{active:!1,title:"Bullet list",cmd:"InsertUnorderedList",onPostRender:ve(e,"UL")})),e.addButton("indent",{icon:"indent",title:"Increase indent",cmd:"Indent",onPostRender:(r=e,function(e){var n=e.control;r.on("nodechange",function(){var e=E.getSelectedListItems(r),t=0<e.length&&s(e[0]);n.disabled(t)})})})};e.add("lists",function(e){return pe(e),he(e),me(e),de(e)})}();
|
1
|
+
!function(){"use strict";var e,n,t,r,o,i,u,a,l,s,c=tinymce.util.Tools.resolve("tinymce.PluginManager"),f=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),d=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),m=tinymce.util.Tools.resolve("tinymce.util.VK"),p=tinymce.util.Tools.resolve("tinymce.dom.BookmarkManager"),v=tinymce.util.Tools.resolve("tinymce.util.Tools"),g=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),h=function(e){return e&&"BR"===e.nodeName},y=function(e){return e&&3===e.nodeType},N=function(e){return e&&/^(OL|UL|DL)$/.test(e.nodeName)},S=function(e){return e&&/^(OL|UL)$/.test(e.nodeName)},O=function(e){return e&&/^(DT|DD)$/.test(e.nodeName)},C=function(e){return e&&/^(LI|DT|DD)$/.test(e.nodeName)},b=function(e){return e&&/^(TH|TD)$/.test(e.nodeName)},L=h,T=function(e,n){return n&&!!e.schema.getTextBlockElements()[n.nodeName]},D=function(e,n){return e&&e.nodeName in n},E=function(e,n){return!!h(n)&&!(!e.isBlock(n.nextSibling)||h(n.previousSibling))},w=function(e,n,t){var r=e.isEmpty(n);return!(t&&0<e.select("span[data-mce-type=bookmark]",n).length)&&r},k=function(e,n){return e.isChildOf(n,e.getRoot())},A=function(e,n){if(y(e))return{container:e,offset:n};var t=f.getNode(e,n);return y(t)?{container:t,offset:n>=e.childNodes.length?t.data.length:0}:t.previousSibling&&y(t.previousSibling)?{container:t.previousSibling,offset:t.previousSibling.data.length}:t.nextSibling&&y(t.nextSibling)?{container:t.nextSibling,offset:0}:{container:e,offset:n}},x=function(e){var n=e.cloneRange(),t=A(e.startContainer,e.startOffset);n.setStart(t.container,t.offset);var r=A(e.endContainer,e.endOffset);return n.setEnd(r.container,r.offset),n},R=g.DOM,I=function(o){var i={},e=function(e){var n,t,r;t=o[e?"startContainer":"endContainer"],r=o[e?"startOffset":"endOffset"],1===t.nodeType&&(n=R.create("span",{"data-mce-type":"bookmark"}),t.hasChildNodes()?(r=Math.min(r,t.childNodes.length-1),e?t.insertBefore(n,t.childNodes[r]):R.insertAfter(n,t.childNodes[r])):t.appendChild(n),t=n,r=0),i[e?"startContainer":"endContainer"]=t,i[e?"startOffset":"endOffset"]=r};return e(!0),o.collapsed||e(),i},B=function(o){function e(e){var n,t,r;n=r=o[e?"startContainer":"endContainer"],t=o[e?"startOffset":"endOffset"],n&&(1===n.nodeType&&(t=function(e){for(var n=e.parentNode.firstChild,t=0;n;){if(n===e)return t;1===n.nodeType&&"bookmark"===n.getAttribute("data-mce-type")||t++,n=n.nextSibling}return-1}(n),n=n.parentNode,R.remove(r),!n.hasChildNodes()&&R.isBlock(n)&&n.appendChild(R.create("br"))),o[e?"startContainer":"endContainer"]=n,o[e?"startOffset":"endOffset"]=t)}e(!0),e();var n=R.createRng();return n.setStart(o.startContainer,o.startOffset),o.endContainer&&n.setEnd(o.endContainer,o.endOffset),x(n)},_=function(e){return function(){return e}},P=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return!t.apply(null,e)}},M=_(!1),U=_(!0),F=M,j=U,H=function(){return $},$=(r={fold:function(e,n){return e()},is:F,isSome:F,isNone:j,getOr:t=function(e){return e},getOrThunk:n=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:function(){return null},getOrUndefined:function(){return undefined},or:t,orThunk:n,map:H,ap:H,each:function(){},bind:H,flatten:H,exists:F,forall:j,filter:H,equals:e=function(e){return e.isNone()},equals_:e,toArray:function(){return[]},toString:_("none()")},Object.freeze&&Object.freeze(r),r),q=function(t){var e=function(){return t},n=function(){return o},r=function(e){return e(t)},o={fold:function(e,n){return n(t)},is:function(e){return t===e},isSome:j,isNone:F,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:n,orThunk:n,map:function(e){return q(e(t))},ap:function(e){return e.fold(H,function(e){return q(e(t))})},each:function(e){e(t)},bind:r,flatten:e,exists:r,forall:r,filter:function(e){return e(t)?o:$},equals:function(e){return e.is(t)},equals_:function(e,n){return e.fold(F,function(e){return n(t,e)})},toArray:function(){return[t]},toString:function(){return"some("+t+")"}};return o},W={some:q,none:H,from:function(e){return null===e||e===undefined?$:q(e)}},z=function(n){return function(e){return function(e){if(null===e)return"null";var n=typeof e;return"object"===n&&Array.prototype.isPrototypeOf(e)?"array":"object"===n&&String.prototype.isPrototypeOf(e)?"string":n}(e)===n}},K=z("string"),V=z("boolean"),X=z("function"),Q=z("number"),Y=function(e,n){for(var t=e.length,r=new Array(t),o=0;o<t;o++){var i=e[o];r[o]=n(i,o,e)}return r},G=function(e,n){for(var t=0,r=e.length;t<r;t++)n(e[t],t,e)},J=function(e,n){for(var t=[],r=0,o=e.length;r<o;r++){var i=e[r];n(i,r,e)&&t.push(i)}return t},Z=function(e,n,t){return G(e,function(e){t=n(t,e)}),t},ee=function(e,n){for(var t=0,r=e.length;t<r;t++){var o=e[t];if(n(o,t,e))return W.some(o)}return W.none()},ne=Array.prototype.push,te=function(e,n){return function(e){for(var n=[],t=0,r=e.length;t<r;++t){if(!Array.prototype.isPrototypeOf(e[t]))throw new Error("Arr.flatten item "+t+" was not an array, input: "+e);ne.apply(n,e[t])}return n}(Y(e,n))},re=Array.prototype.slice,oe=function(e){return 0===e.length?W.none():W.some(e[0])},ie=function(e){return 0===e.length?W.none():W.some(e[e.length-1])},ue=(X(Array.from)&&Array.from,"undefined"!=typeof window?window:Function("return this;")()),ae=function(e,n){return function(e,n){for(var t=n!==undefined&&null!==n?n:ue,r=0;r<e.length&&t!==undefined&&null!==t;++r)t=t[e[r]];return t}(e.split("."),n)},se=function(e,n){var t=ae(e,n);if(t===undefined||null===t)throw e+" not available on this browser";return t},ce=function(e){var n,t=ae("ownerDocument.defaultView",e);return(n=t,se("HTMLElement",n)).prototype.isPrototypeOf(e)},fe=tinymce.util.Tools.resolve("tinymce.dom.DomQuery"),le=function(e){var n=e.selection.getStart(!0);return e.dom.getParent(n,"OL,UL,DL",me(e,n))},de=function(e){var t,n,r,o=e.selection.getSelectedBlocks();return v.grep((t=e,n=o,r=v.map(n,function(e){var n=t.dom.getParent(e,"li,dd,dt",me(t,e));return n||e}),fe.unique(r)),function(e){return C(e)})},me=function(e,n){var t=e.dom.getParents(n,"TD,TH");return 0<t.length?t[0]:e.getBody()},ge=function(e,n){var t=e.dom.getParents(n,"ol,ul",me(e,n));return ie(t)},pe=function(n,e){var t=Y(e,function(e){return ge(n,e).getOr(e)});return fe.unique(t)},ve={isList:function(e){var n=le(e);return ce(n)},getParentList:le,getSelectedSubLists:function(e){var n,t,r,o=le(e),i=e.selection.getSelectedBlocks();return r=i,(t=o)&&1===r.length&&r[0]===t?(n=o,v.grep(n.querySelectorAll("ol,ul,dl"),function(e){return N(e)})):v.grep(i,function(e){return N(e)&&o!==e})},getSelectedListItems:de,getClosestListRootElm:me,getSelectedDlItems:function(e){return J(de(e),O)},getSelectedListRoots:function(e){var n,t,r,o=(t=ge(n=e,n.selection.getStart()),r=J(n.selection.getSelectedBlocks(),S),t.toArray().concat(r));return pe(e,o)}},he=function(e,n){var t=function(e,n){for(var t=0;t<e.length;t++){var r=e[t];if(r.test(n))return r}return undefined}(e,n);if(!t)return{major:0,minor:0};var r=function(e){return Number(n.replace(t,"$"+e))};return Ne(r(1),r(2))},ye=function(){return Ne(0,0)},Ne=function(e,n){return{major:e,minor:n}},Se={nu:Ne,detect:function(e,n){var t=String(n).toLowerCase();return 0===e.length?ye():he(e,t)},unknown:ye},Oe="Firefox",Ce=function(e,n){return function(){return n===e}},be=function(e){var n=e.current;return{current:n,version:e.version,isEdge:Ce("Edge",n),isChrome:Ce("Chrome",n),isIE:Ce("IE",n),isOpera:Ce("Opera",n),isFirefox:Ce(Oe,n),isSafari:Ce("Safari",n)}},Le={unknown:function(){return be({current:undefined,version:Se.unknown()})},nu:be,edge:_("Edge"),chrome:_("Chrome"),ie:_("IE"),opera:_("Opera"),firefox:_(Oe),safari:_("Safari")},Te="Windows",De="Android",Ee="Solaris",we="FreeBSD",ke=function(e,n){return function(){return n===e}},Ae=function(e){var n=e.current;return{current:n,version:e.version,isWindows:ke(Te,n),isiOS:ke("iOS",n),isAndroid:ke(De,n),isOSX:ke("OSX",n),isLinux:ke("Linux",n),isSolaris:ke(Ee,n),isFreeBSD:ke(we,n)}},xe={unknown:function(){return Ae({current:undefined,version:Se.unknown()})},nu:Ae,windows:_(Te),ios:_("iOS"),android:_(De),linux:_("Linux"),osx:_("OSX"),solaris:_(Ee),freebsd:_(we)},Re=function(e,n){var t=String(n).toLowerCase();return ee(e,function(e){return e.search(t)})},Ie=function(e,t){return Re(e,t).map(function(e){var n=Se.detect(e.versionRegexes,t);return{current:e.name,version:n}})},Be=function(e,t){return Re(e,t).map(function(e){var n=Se.detect(e.versionRegexes,t);return{current:e.name,version:n}})},_e=function(e,n){return-1!==e.indexOf(n)},Pe=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,Me=function(n){return function(e){return _e(e,n)}},Ue=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(e){return _e(e,"edge/")&&_e(e,"chrome")&&_e(e,"safari")&&_e(e,"applewebkit")}},{name:"Chrome",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,Pe],search:function(e){return _e(e,"chrome")&&!_e(e,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(e){return _e(e,"msie")||_e(e,"trident")}},{name:"Opera",versionRegexes:[Pe,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:Me("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:Me("firefox")},{name:"Safari",versionRegexes:[Pe,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(e){return(_e(e,"safari")||_e(e,"mobile/"))&&_e(e,"applewebkit")}}],Fe=[{name:"Windows",search:Me("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(e){return _e(e,"iphone")||_e(e,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:Me("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:Me("os x"),versionRegexes:[/.*?os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:Me("linux"),versionRegexes:[]},{name:"Solaris",search:Me("sunos"),versionRegexes:[]},{name:"FreeBSD",search:Me("freebsd"),versionRegexes:[]}],je={browsers:_(Ue),oses:_(Fe)},He=function(e){var n,t,r,o,i,u,a,s,c,f,l,d=je.browsers(),m=je.oses(),g=Ie(d,e).fold(Le.unknown,Le.nu),p=Be(m,e).fold(xe.unknown,xe.nu);return{browser:g,os:p,deviceType:(t=g,r=e,o=(n=p).isiOS()&&!0===/ipad/i.test(r),i=n.isiOS()&&!o,u=n.isAndroid()&&3===n.version.major,a=n.isAndroid()&&4===n.version.major,s=o||u||a&&!0===/mobile/i.test(r),c=n.isiOS()||n.isAndroid(),f=c&&!s,l=t.isSafari()&&n.isiOS()&&!1===/safari/i.test(r),{isiPad:_(o),isiPhone:_(i),isTablet:_(s),isPhone:_(f),isTouch:_(c),isAndroid:n.isAndroid,isiOS:n.isiOS,isWebView:_(l)})}},$e={detect:(o=function(){var e=navigator.userAgent;return He(e)},u=!1,function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return u||(u=!0,i=o.apply(null,e)),i})},qe=function(e){if(null===e||e===undefined)throw new Error("Node cannot be null or undefined");return{dom:_(e)}},We={fromHtml:function(e,n){var t=(n||document).createElement("div");if(t.innerHTML=e,!t.hasChildNodes()||1<t.childNodes.length)throw console.error("HTML does not have a single root node",e),"HTML must have a single root node";return qe(t.childNodes[0])},fromTag:function(e,n){var t=(n||document).createElement(e);return qe(t)},fromText:function(e,n){var t=(n||document).createTextNode(e);return qe(t)},fromDom:qe,fromPoint:function(e,n,t){var r=e.dom();return W.from(r.elementFromPoint(n,t)).map(qe)}},ze=(Node.ATTRIBUTE_NODE,Node.CDATA_SECTION_NODE,Node.COMMENT_NODE,Node.DOCUMENT_NODE,Node.DOCUMENT_TYPE_NODE,Node.DOCUMENT_FRAGMENT_NODE,Node.ELEMENT_NODE),Ke=(Node.TEXT_NODE,Node.PROCESSING_INSTRUCTION_NODE,Node.ENTITY_REFERENCE_NODE,Node.ENTITY_NODE,Node.NOTATION_NODE,ze),Ve=($e.detect().browser.isIE(),function(e,n){var t=e.dom();if(t.nodeType!==Ke)return!1;if(t.matches!==undefined)return t.matches(n);if(t.msMatchesSelector!==undefined)return t.msMatchesSelector(n);if(t.webkitMatchesSelector!==undefined)return t.webkitMatchesSelector(n);if(t.mozMatchesSelector!==undefined)return t.mozMatchesSelector(n);throw new Error("Browser lacks native selectors")}),Xe=Object.keys,Qe=function(e){return e.dom().nodeName.toLowerCase()},Ye=function(e,n){var t=e.dom();!function(e,n){for(var t=Xe(e),r=0,o=t.length;r<o;r++){var i=t[r];n(e[i],i,e)}}(n,function(e,n){!function(e,n,t){if(!(K(t)||V(t)||Q(t)))throw console.error("Invalid call to Attr.set. Key ",n,":: Value ",t,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(n,t+"")}(t,n,e)})},Ge=function(e){return Z(e.dom().attributes,function(e,n){return e[n.name]=n.value,e},{})},Je=function(e){var n=e.dom();return W.from(n.parentNode).map(We.fromDom)},Ze=function(e){var n=e.dom();return Y(n.childNodes,We.fromDom)},en=function(e,n){var t=e.dom().childNodes;return W.from(t[n]).map(We.fromDom)},nn=function(e){return en(e,0)},tn=function(e){return en(e,e.dom().childNodes.length-1)},rn=(function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n]}("element","offset"),function(n,t){Je(n).each(function(e){e.dom().insertBefore(t.dom(),n.dom())})}),on=function(e,n){e.dom().appendChild(n.dom())},un=function(n,e){G(e,function(e){on(n,e)})},an=function(e){var n=e.dom();null!==n.parentNode&&n.parentNode.removeChild(n)},sn=function(e){return n=e,t=!0,We.fromDom(n.dom().cloneNode(t));var n,t},cn=function(e,n){var t,r,o,i,u=(t=e,r=n,o=We.fromTag(r),i=Ge(t),Ye(o,i),o);rn(e,u);var a=Ze(e);return un(u,a),an(e),u},fn=tinymce.util.Tools.resolve("tinymce.Env"),ln=g.DOM,dn=function(e,n,t){var r,o,i,u=ln.createFragment(),a=e.schema.getBlockElements();if(e.settings.forced_root_block&&(t=t||e.settings.forced_root_block),t&&((o=ln.create(t)).tagName===e.settings.forced_root_block&&ln.setAttribs(o,e.settings.forced_root_block_attrs),D(n.firstChild,a)||u.appendChild(o)),n)for(;r=n.firstChild;){var s=r.nodeName;i||"SPAN"===s&&"bookmark"===r.getAttribute("data-mce-type")||(i=!0),D(r,a)?(u.appendChild(r),o=null):t?(o||(o=ln.create(t),u.appendChild(o)),o.appendChild(r)):u.appendChild(r)}return e.settings.forced_root_block?i||fn.ie&&!(10<fn.ie)||o.appendChild(ln.create("br",{"data-mce-bogus":"1"})):u.appendChild(ln.create("br")),u},mn=g.DOM,gn=function(e,n,t,r){var o,i,u,a,s;for(u=mn.select('span[data-mce-type="bookmark"]',n),r=r||dn(e,t),(o=mn.createRng()).setStartAfter(t),o.setEndAfter(n),a=(i=o.extractContents()).firstChild;a;a=a.firstChild)if("LI"===a.nodeName&&e.dom.isEmpty(a)){mn.remove(a);break}e.dom.isEmpty(i)||mn.insertAfter(i,n),mn.insertAfter(r,n),w(e.dom,t.parentNode)&&(s=t.parentNode,v.each(u,function(e){s.parentNode.insertBefore(e,t.parentNode)}),mn.remove(s)),mn.remove(t),w(e.dom,n)&&mn.remove(n)},pn=function(e,n){for(var t=[],r=0;r<e.length;r++){var o=e[r];if(!o.isSome())return W.none();t.push(o.getOrDie())}return W.some(n.apply(null,t))},vn=function(e,n,t){if(!K(t))throw console.error("Invalid call to CSS.set. Property ",n,":: Value ",t,":: Element ",e),new Error("CSS value must be a string: "+t);e.style!==undefined&&e.style.setProperty(n,t)},hn=function(e,n){on(e.item,n.list)},yn=function(i,e,u){for(var a=[],n=function(e){var n,t,r,o=(n=i,t=u,r={list:We.fromTag(t,n),item:We.fromTag("li",n)},on(r.list,r.item),r);ie(a).each(function(e){return hn(e,o)}),a.push(o)},t=0;t<e;t++)n();return a},Nn=function(c,e,f){var n=e.slice(0,f.depth);return ie(n).each(function(e){var n,t,r,o,i,u,a,s;n=e,r=c,o=f.itemAttributes,i=f.content,u=We.fromTag("li",r),Ye(u,o),un(u,i),t=u,on(n.list,t),n.item=t,s=f,Qe((a=e).list).toUpperCase()!==s.listType&&(a.list=cn(a.list,s.listType)),Ye(a.list,s.listAttributes)}),n},Sn=function(e,n,t){var r=yn(e,t.depth-n.length,t.listType);return function(e,n){ie(e).each(function(e){Ye(e.list,n.listAttributes),Ye(e.item,n.itemAttributes),un(e.item,n.content)});for(var t=0;t<e.length-1;t++)r=e[t].item,o="list-style-type",i="none",u=r.dom(),vn(u,o,i);var r,o,i,u}(r,t),pn([ie(n),oe(r)],hn),n.concat(r)},On=function(e){return 0<e.depth},Cn=function(e){return e.isSelected},bn=Object.prototype.hasOwnProperty,Ln=(a=function(e,n){return n},function(){for(var e=new Array(arguments.length),n=0;n<e.length;n++)e[n]=arguments[n];if(0===e.length)throw new Error("Can't merge zero objects");for(var t={},r=0;r<e.length;r++){var o=e[r];for(var i in o)bn.call(o,i)&&(t[i]=a(t[i],o[i]))}return t}),Tn=function(e,r){var n=r.depth-1;e[n].each(function(e){return t=e,(n=r).listType=t.listType,void(n.listAttributes=Ln({},t.listAttributes));var n,t});var t=e.slice(0,n);return t.push(W.some(r)),t},Dn=function(e){Z(e,function(e,n){return n.depth>e.length?function(e,n){for(var t=e.slice(0),r=n.depth-e.length,o=1;o<r;o++)t.push(W.none());return t.push(W.some(n)),t}(e,n):Tn(e,n)},[])},En=function(e){var n=e,t=function(){return n};return{get:t,set:function(e){n=e},clone:function(){return En(t())}}};(s=l||(l={})).OL="OL",s.UL="UL",s.DL="DL";var wn=function(e){switch(Qe(e)){case"ol":return W.some(l.OL);case"ul":return W.some(l.UL);case"dl":return W.some(l.DL);default:return W.none()}},kn=function(e){return Ve(e,"OL,UL,DL")},An=function(e){return nn(e).map(kn).getOr(!1)},xn=function(e){var n=Ze(e),t=n.length+(tn(e).map(kn).getOr(!1)?-1:0);return Y(n.slice(0,t),sn)},Rn=function(u,e,a,s){var c=function(r){for(var o=[],e=1;e<arguments.length;e++)o[e-1]=arguments[e];return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var t=o.concat(e);return r.apply(null,t)}}(In,u,e,a),f=function(r){return e.each(function(e){var n,t;n="Start"===r?e.start:e.end,t=s,n.dom()===t.dom()&&a.set("Start"===r)})};return nn(s).filter(kn).fold(function(){f("Start");var e,n,t,r,o=(e=s,n=u,t=a.get(),r=Je(e),{depth:n,isSelected:t,content:xn(e),listType:r.bind(wn).getOr(l.OL),listAttributes:r.map(Ge).getOr({}),itemAttributes:Ge(e)});f("End");var i=tn(s).filter(kn).map(c).getOr([]);return[o].concat(i)},c)},In=function(e,n,t,r){var o=e+1;return te(Ze(r),function(e){return kn(e)?In(o,n,t,e):Rn(o,n,t,e)})},Bn=function(i,e){return Y(e,function(e){var n,t,r,o=(n=e.content,r=(t||document).createDocumentFragment(),G(n,function(e){r.appendChild(e.dom())}),We.fromDom(r));return We.fromDom(dn(i,o.dom()))})},_n=function(e,n){return Dn(n),(t=e.contentDocument,r=n,o=Z(r,function(e,n){return n.depth>e.length?Sn(t,e,n):Nn(t,e,n)},[]),oe(o).map(function(e){return e.list})).toArray();var t,r,o},Pn=function(e){var n,t,r=Y(ve.getSelectedListItems(e),We.fromDom);return pn([ee(r,P(An)),ee((n=r,t=re.call(n,0),t.reverse(),t),P(An))],function(e,n){return{start:e,end:n}})},Mn=function(a,e,s){var n,t,r,o=(n=e,t=Pn(a),r=En(!1),Y(n,function(e){return{entries:In(0,t,r,e),sourceList:e}}));G(o,function(e){var n,t,r,o,i,u;n=e.entries,t=s,G(J(n,Cn),function(e){return function(e,n){switch(e){case"Indent":n.depth++;break;case"Outdent":n.depth--;break;case"Flatten":n.depth=0}}(t,e)}),r=e.sourceList,i=a,u=e.entries,o=te(function(e,n){if(0===e.length)return[];for(var t=n(e[0]),r=[],o=[],i=0,u=e.length;i<u;i++){var a=e[i],s=n(a);s!==t&&(r.push(o),o=[]),t=s,o.push(a)}return 0!==o.length&&r.push(o),r}(u,On),function(e){return oe(e).map(On).getOr(!1)?_n(i,e):Bn(i,e)}),G(o,function(e){rn(r,e)}),an(e.sourceList)})},Un=function(e){Ve(e,"DT")&&cn(e,"DD")},Fn=function(r,e,n){G(n,"Indent"===e?Un:function(e){return n=r,void(Ve(t=e,"DD")?cn(t,"DT"):Ve(t,"DT")&&Je(t).each(function(e){return gn(n,e.dom(),t.dom())}));var n,t})},jn=function(e,n){var t=Y(ve.getSelectedDlItems(e),We.fromDom),r=Y(ve.getSelectedListRoots(e),We.fromDom);if(t.length||r.length){var o=e.selection.getBookmark();Fn(e,n,t),Mn(e,r,n),e.selection.moveToBookmark(o),e.selection.setRng(x(e.selection.getRng())),e.nodeChanged()}},Hn=function(e){jn(e,"Indent")},$n=function(e){jn(e,"Outdent")},qn=function(e){jn(e,"Flatten")},Wn=function(t,e){v.each(e,function(e,n){t.setAttribute(n,e)})},zn=function(e,n,t){var r,o,i,u,a,s,c;r=e,o=n,u=(i=t)["list-style-type"]?i["list-style-type"]:null,r.setStyle(o,"list-style-type",u),a=e,Wn(s=n,(c=t)["list-attributes"]),v.each(a.select("li",s),function(e){Wn(e,c["list-item-attributes"])})},Kn=function(e,n,t,r){var o,i;for(o=n[t?"startContainer":"endContainer"],i=n[t?"startOffset":"endOffset"],1===o.nodeType&&(o=o.childNodes[Math.min(i,o.childNodes.length-1)]||o),!t&&L(o.nextSibling)&&(o=o.nextSibling);o.parentNode!==r;){if(T(e,o))return o;if(/^(TD|TH)$/.test(o.parentNode.nodeName))return o;o=o.parentNode}return o},Vn=function(f,l,d){void 0===d&&(d={});var e,n=f.selection.getRng(!0),m="LI",t=ve.getClosestListRootElm(f,f.selection.getStart(!0)),g=f.dom;"false"!==g.getContentEditable(f.selection.getNode())&&("DL"===(l=l.toUpperCase())&&(m="DT"),e=I(n),v.each(function(t,e,r){for(var o,i=[],u=t.dom,n=Kn(t,e,!0,r),a=Kn(t,e,!1,r),s=[],c=n;c&&(s.push(c),c!==a);c=c.nextSibling);return v.each(s,function(e){if(T(t,e))return i.push(e),void(o=null);if(u.isBlock(e)||L(e))return L(e)&&u.remove(e),void(o=null);var n=e.nextSibling;p.isBookmarkNode(e)&&(T(t,n)||!n&&e.parentNode===r)?o=null:(o||(o=u.create("p"),e.parentNode.insertBefore(o,e),i.push(o)),o.appendChild(e))}),i}(f,n,t),function(e){var n,t,r,o,i,u,a,s,c;(t=e.previousSibling)&&N(t)&&t.nodeName===l&&(r=t,o=d,i=g.getStyle(r,"list-style-type"),u=o?o["list-style-type"]:"",i===(u=null===u?"":u))?(n=t,e=g.rename(e,m),t.appendChild(e)):(n=g.create(l),e.parentNode.insertBefore(n,e),n.appendChild(e),e=g.rename(e,m)),a=g,s=e,c=["margin","margin-right","margin-bottom","margin-left","margin-top","padding","padding-right","padding-bottom","padding-left","padding-top"],v.each(c,function(e){var n;return a.setStyle(s,((n={})[e]="",n))}),zn(g,n,d),Qn(f.dom,n)}),f.selection.setRng(B(e)))},Xn=function(e,n,t){return s=t,(a=n)&&s&&N(a)&&a.nodeName===s.nodeName&&(i=n,u=t,(o=e).getStyle(i,"list-style-type",!0)===o.getStyle(u,"list-style-type",!0))&&(r=t,n.className===r.className);var r,o,i,u,a,s},Qn=function(e,n){var t,r;if(t=n.nextSibling,Xn(e,n,t)){for(;r=t.firstChild;)n.appendChild(r);e.remove(t)}if(t=n.previousSibling,Xn(e,n,t)){for(;r=t.lastChild;)n.insertBefore(r,n.firstChild);e.remove(t)}},Yn=function(n,e,t,r,o){if(e.nodeName!==r||Gn(o)){var i=I(n.selection.getRng(!0));v.each([e].concat(t),function(e){!function(e,n,t,r){if(n.nodeName!==t){var o=e.rename(n,t);zn(e,o,r)}else zn(e,n,r)}(n.dom,e,r,o)}),n.selection.setRng(B(i))}else qn(n)},Gn=function(e){return"list-style-type"in e},Jn={toggleList:function(e,n,t){var r=ve.getParentList(e),o=ve.getSelectedSubLists(e);t=t||{},r&&0<o.length?Yn(e,r,o,n,t):function(e,n,t,r){if(n!==e.getBody())if(n)if(n.nodeName!==t||Gn(r)){var o=I(e.selection.getRng(!0));zn(e.dom,n,r),Qn(e.dom,e.dom.rename(n,t)),e.selection.setRng(B(o))}else qn(e);else Vn(e,t,r)}(e,r,n,t)},mergeWithAdjacentLists:Qn},Zn=g.DOM,et=function(e,n){var t,r=n.parentNode;"LI"===r.nodeName&&r.firstChild===n&&((t=r.previousSibling)&&"LI"===t.nodeName?(t.appendChild(n),w(e,r)&&Zn.remove(r)):Zn.setStyle(r,"listStyleType","none")),N(r)&&(t=r.previousSibling)&&"LI"===t.nodeName&&t.appendChild(n)},nt=function(n,e){v.each(v.grep(n.select("ol,ul",e)),function(e){et(n,e)})},tt=function(e,n,t,r){var o,i,u=n.startContainer,a=n.startOffset;if(3===u.nodeType&&(t?a<u.data.length:0<a))return u;for(o=e.schema.getNonEmptyElements(),1===u.nodeType&&(u=f.getNode(u,a)),i=new d(u,r),t&&E(e.dom,u)&&i.next();u=i[t?"next":"prev2"]();){if("LI"===u.nodeName&&!u.hasChildNodes())return u;if(o[u.nodeName])return u;if(3===u.nodeType&&0<u.data.length)return u}},rt=function(e,n){var t=n.childNodes;return 1===t.length&&!N(t[0])&&e.isBlock(t[0])},ot=function(e,n,t){var r,o,i,u;if(o=rt(e,t)?t.firstChild:t,rt(i=e,u=n)&&i.remove(u.firstChild,!0),!w(e,n,!0))for(;r=n.firstChild;)o.appendChild(r)},it=function(e,n,t){var r,o,i=n.parentNode;k(e,n)&&k(e,t)&&(N(t.lastChild)&&(o=t.lastChild),i===t.lastChild&&L(i.previousSibling)&&e.remove(i.previousSibling),(r=t.lastChild)&&L(r)&&n.hasChildNodes()&&e.remove(r),w(e,t,!0)&&e.$(t).empty(),ot(e,n,t),o&&t.appendChild(o),e.remove(n),w(e,i)&&i!==e.getRoot()&&e.remove(i))},ut=function(e,n,t,r){var o,i,u,a=e.dom;if(a.isEmpty(r))i=t,u=r,(o=e).dom.$(u).empty(),it(o.dom,i,u),o.selection.setCursorLocation(u);else{var s=I(n);it(a,t,r),e.selection.setRng(B(s))}},at=function(e,n){var t,r,o,i=e.dom,u=e.selection,a=u.getStart(),s=ve.getClosestListRootElm(e,a),c=i.getParent(u.getStart(),"LI",s);if(c){if((t=c.parentNode)===e.getBody()&&w(i,t))return!0;if(r=x(u.getRng(!0)),(o=i.getParent(tt(e,r,n,s),"LI",s))&&o!==c)return n?ut(e,r,o,c):function(e,n,t,r){var o=I(n);it(e.dom,t,r);var i=B(o);e.selection.setRng(i)}(e,r,c,o),!0;if(!o&&!n)return qn(e),!0}return!1},st=function(e,n){return at(e,n)||function(o,i){var u=o.dom,e=o.selection.getStart(),a=ve.getClosestListRootElm(o,e),s=u.getParent(e,u.isBlock,a);if(s&&u.isEmpty(s)){var n=x(o.selection.getRng(!0)),c=u.getParent(tt(o,n,i,a),"LI",a);if(c)return o.undoManager.transact(function(){var e,n,t,r;n=s,t=a,r=(e=u).getParent(n.parentNode,e.isBlock,t),e.remove(n),r&&e.isEmpty(r)&&e.remove(r),Jn.mergeWithAdjacentLists(u,c.parentNode),o.selection.select(c,!0),o.selection.collapse(i)}),!0}return!1}(e,n)},ct=function(e,n){return e.selection.isCollapsed()?st(e,n):(r=(t=e).selection.getStart(),o=ve.getClosestListRootElm(t,r),!!(t.dom.getParent(r,"LI,DT,DD",o)||0<ve.getSelectedListItems(t).length)&&(t.undoManager.transact(function(){t.execCommand("Delete"),nt(t.dom,t.getBody())}),!0));var t,r,o},ft=function(n){n.on("keydown",function(e){e.keyCode===m.BACKSPACE?ct(n,!1)&&e.preventDefault():e.keyCode===m.DELETE&&ct(n,!0)&&e.preventDefault()})},lt=ct,dt=function(n){return{backspaceDelete:function(e){lt(n,e)}}},mt=function(n,t){return function(){var e=n.dom.getParent(n.selection.getStart(),"UL,OL,DL");return e&&e.nodeName===t}},gt=function(t){t.on("BeforeExecCommand",function(e){var n=e.command.toLowerCase();"indent"===n?Hn(t):"outdent"===n&&$n(t)}),t.addCommand("InsertUnorderedList",function(e,n){Jn.toggleList(t,"UL",n)}),t.addCommand("InsertOrderedList",function(e,n){Jn.toggleList(t,"OL",n)}),t.addCommand("InsertDefinitionList",function(e,n){Jn.toggleList(t,"DL",n)}),t.addCommand("RemoveList",function(){qn(t)}),t.addQueryStateHandler("InsertUnorderedList",mt(t,"UL")),t.addQueryStateHandler("InsertOrderedList",mt(t,"OL")),t.addQueryStateHandler("InsertDefinitionList",mt(t,"DL"))},pt=function(e){return e.getParam("lists_indent_on_tab",!0)},vt=function(e){var n;pt(e)&&(n=e).on("keydown",function(e){e.keyCode!==m.TAB||m.metaKeyPressed(e)||ve.isList(n)&&(e.preventDefault(),n.undoManager.transact(function(){e.shiftKey?$n(n):Hn(n)}))}),ft(e)},ht=function(n,i){return function(e){var o=e.control;n.on("NodeChange",function(e){var n=function(e,n){for(var t=0;t<e.length;t++)if(n(e[t]))return t;return-1}(e.parents,b),t=-1!==n?e.parents.slice(0,n):e.parents,r=v.grep(t,N);o.active(0<r.length&&r[0].nodeName===i)})}},yt=function(e){var n,t,r;t="advlist",r=(n=e).settings.plugins?n.settings.plugins:"",-1===v.inArray(r.split(/[ ,]/),t)&&(e.addButton("numlist",{active:!1,title:"Numbered list",cmd:"InsertOrderedList",onPostRender:ht(e,"OL")}),e.addButton("bullist",{active:!1,title:"Bullet list",cmd:"InsertUnorderedList",onPostRender:ht(e,"UL")})),e.addButton("indent",{icon:"indent",title:"Increase indent",cmd:"Indent"})};c.add("lists",function(e){return vt(e),yt(e),gt(e),dt(e)})}();
|
@@ -1,1166 +1,1166 @@
|
|
1
1
|
(function () {
|
2
2
|
var media = (function () {
|
3
|
-
|
3
|
+
'use strict';
|
4
4
|
|
5
|
-
|
5
|
+
var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
6
6
|
|
7
|
-
|
7
|
+
var global$1 = tinymce.util.Tools.resolve('tinymce.Env');
|
8
8
|
|
9
|
-
|
9
|
+
var global$2 = tinymce.util.Tools.resolve('tinymce.util.Tools');
|
10
10
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
11
|
+
var getScripts = function (editor) {
|
12
|
+
return editor.getParam('media_scripts');
|
13
|
+
};
|
14
|
+
var getAudioTemplateCallback = function (editor) {
|
15
|
+
return editor.getParam('audio_template_callback');
|
16
|
+
};
|
17
|
+
var getVideoTemplateCallback = function (editor) {
|
18
|
+
return editor.getParam('video_template_callback');
|
19
|
+
};
|
20
|
+
var hasLiveEmbeds = function (editor) {
|
21
|
+
return editor.getParam('media_live_embeds', true);
|
22
|
+
};
|
23
|
+
var shouldFilterHtml = function (editor) {
|
24
|
+
return editor.getParam('media_filter_html', true);
|
25
|
+
};
|
26
|
+
var getUrlResolver = function (editor) {
|
27
|
+
return editor.getParam('media_url_resolver');
|
28
|
+
};
|
29
|
+
var hasAltSource = function (editor) {
|
30
|
+
return editor.getParam('media_alt_source', true);
|
31
|
+
};
|
32
|
+
var hasPoster = function (editor) {
|
33
|
+
return editor.getParam('media_poster', true);
|
34
|
+
};
|
35
|
+
var hasDimensions = function (editor) {
|
36
|
+
return editor.getParam('media_dimensions', true);
|
37
|
+
};
|
38
|
+
var Settings = {
|
39
|
+
getScripts: getScripts,
|
40
|
+
getAudioTemplateCallback: getAudioTemplateCallback,
|
41
|
+
getVideoTemplateCallback: getVideoTemplateCallback,
|
42
|
+
hasLiveEmbeds: hasLiveEmbeds,
|
43
|
+
shouldFilterHtml: shouldFilterHtml,
|
44
|
+
getUrlResolver: getUrlResolver,
|
45
|
+
hasAltSource: hasAltSource,
|
46
|
+
hasPoster: hasPoster,
|
47
|
+
hasDimensions: hasDimensions
|
48
|
+
};
|
49
49
|
|
50
|
-
|
50
|
+
var global$3 = tinymce.util.Tools.resolve('tinymce.html.SaxParser');
|
51
51
|
|
52
|
-
|
52
|
+
var global$4 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');
|
53
53
|
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
54
|
+
var getVideoScriptMatch = function (prefixes, src) {
|
55
|
+
if (prefixes) {
|
56
|
+
for (var i = 0; i < prefixes.length; i++) {
|
57
|
+
if (src.indexOf(prefixes[i].filter) !== -1) {
|
58
|
+
return prefixes[i];
|
59
|
+
}
|
59
60
|
}
|
60
61
|
}
|
61
|
-
}
|
62
|
-
};
|
63
|
-
var $_545y8yh6jm0ofzjb = { getVideoScriptMatch: getVideoScriptMatch };
|
64
|
-
|
65
|
-
var trimPx = function (value) {
|
66
|
-
return value.replace(/px$/, '');
|
67
|
-
};
|
68
|
-
var addPx = function (value) {
|
69
|
-
return /^[0-9.]+$/.test(value) ? value + 'px' : value;
|
70
|
-
};
|
71
|
-
var getSize = function (name) {
|
72
|
-
return function (elm) {
|
73
|
-
return elm ? trimPx(elm.style[name]) : '';
|
74
|
-
};
|
75
|
-
};
|
76
|
-
var setSize = function (name) {
|
77
|
-
return function (elm, value) {
|
78
|
-
if (elm) {
|
79
|
-
elm.style[name] = addPx(value);
|
80
|
-
}
|
81
62
|
};
|
82
|
-
|
83
|
-
var $_am85wh7jm0ofzjc = {
|
84
|
-
getMaxWidth: getSize('maxWidth'),
|
85
|
-
getMaxHeight: getSize('maxHeight'),
|
86
|
-
setMaxWidth: setSize('maxWidth'),
|
87
|
-
setMaxHeight: setSize('maxHeight')
|
88
|
-
};
|
63
|
+
var VideoScript = { getVideoScriptMatch: getVideoScriptMatch };
|
89
64
|
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
if (!data.source1 && name === 'param') {
|
106
|
-
data.source1 = attrs.map.movie;
|
65
|
+
var trimPx = function (value) {
|
66
|
+
return value.replace(/px$/, '');
|
67
|
+
};
|
68
|
+
var addPx = function (value) {
|
69
|
+
return /^[0-9.]+$/.test(value) ? value + 'px' : value;
|
70
|
+
};
|
71
|
+
var getSize = function (name) {
|
72
|
+
return function (elm) {
|
73
|
+
return elm ? trimPx(elm.style[name]) : '';
|
74
|
+
};
|
75
|
+
};
|
76
|
+
var setSize = function (name) {
|
77
|
+
return function (elm, value) {
|
78
|
+
if (elm) {
|
79
|
+
elm.style[name] = addPx(value);
|
107
80
|
}
|
108
|
-
|
109
|
-
|
110
|
-
|
81
|
+
};
|
82
|
+
};
|
83
|
+
var Size = {
|
84
|
+
getMaxWidth: getSize('maxWidth'),
|
85
|
+
getMaxHeight: getSize('maxHeight'),
|
86
|
+
setMaxWidth: setSize('maxWidth'),
|
87
|
+
setMaxHeight: setSize('maxHeight')
|
88
|
+
};
|
89
|
+
|
90
|
+
var DOM = global$4.DOM;
|
91
|
+
var getEphoxEmbedIri = function (elm) {
|
92
|
+
return DOM.getAttrib(elm, 'data-ephox-embed-iri');
|
93
|
+
};
|
94
|
+
var isEphoxEmbed = function (html) {
|
95
|
+
var fragment = DOM.createFragment(html);
|
96
|
+
return getEphoxEmbedIri(fragment.firstChild) !== '';
|
97
|
+
};
|
98
|
+
var htmlToDataSax = function (prefixes, html) {
|
99
|
+
var data = {};
|
100
|
+
global$3({
|
101
|
+
validate: false,
|
102
|
+
allow_conditional_comments: true,
|
103
|
+
special: 'script,noscript',
|
104
|
+
start: function (name, attrs) {
|
105
|
+
if (!data.source1 && name === 'param') {
|
106
|
+
data.source1 = attrs.map.movie;
|
111
107
|
}
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
return;
|
108
|
+
if (name === 'iframe' || name === 'object' || name === 'embed' || name === 'video' || name === 'audio') {
|
109
|
+
if (!data.type) {
|
110
|
+
data.type = name;
|
111
|
+
}
|
112
|
+
data = global$2.extend(attrs.map, data);
|
118
113
|
}
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
114
|
+
if (name === 'script') {
|
115
|
+
var videoScript = VideoScript.getVideoScriptMatch(prefixes, attrs.map.src);
|
116
|
+
if (!videoScript) {
|
117
|
+
return;
|
118
|
+
}
|
119
|
+
data = {
|
120
|
+
type: 'script',
|
121
|
+
source1: attrs.map.src,
|
122
|
+
width: videoScript.width,
|
123
|
+
height: videoScript.height
|
124
|
+
};
|
125
|
+
}
|
126
|
+
if (name === 'source') {
|
127
|
+
if (!data.source1) {
|
128
|
+
data.source1 = attrs.map.src;
|
129
|
+
} else if (!data.source2) {
|
130
|
+
data.source2 = attrs.map.src;
|
131
|
+
}
|
132
|
+
}
|
133
|
+
if (name === 'img' && !data.poster) {
|
134
|
+
data.poster = attrs.map.src;
|
131
135
|
}
|
132
136
|
}
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
};
|
154
|
-
|
155
|
-
var htmlToData = function (prefixes, html) {
|
156
|
-
return isEphoxEmbed(html) ? ephoxEmbedHtmlToData(html) : htmlToDataSax(prefixes, html);
|
157
|
-
};
|
158
|
-
var $_5d5iuvh3jm0ofzj8 = { htmlToData: htmlToData };
|
137
|
+
}).parse(html);
|
138
|
+
data.source1 = data.source1 || data.src || data.data;
|
139
|
+
data.source2 = data.source2 || '';
|
140
|
+
data.poster = data.poster || '';
|
141
|
+
return data;
|
142
|
+
};
|
143
|
+
var ephoxEmbedHtmlToData = function (html) {
|
144
|
+
var fragment = DOM.createFragment(html);
|
145
|
+
var div = fragment.firstChild;
|
146
|
+
return {
|
147
|
+
type: 'ephox-embed-iri',
|
148
|
+
source1: getEphoxEmbedIri(div),
|
149
|
+
source2: '',
|
150
|
+
poster: '',
|
151
|
+
width: Size.getMaxWidth(div),
|
152
|
+
height: Size.getMaxHeight(div)
|
153
|
+
};
|
154
|
+
};
|
155
|
+
var htmlToData = function (prefixes, html) {
|
156
|
+
return isEphoxEmbed(html) ? ephoxEmbedHtmlToData(html) : htmlToDataSax(prefixes, html);
|
157
|
+
};
|
158
|
+
var HtmlToData = { htmlToData: htmlToData };
|
159
159
|
|
160
|
-
|
160
|
+
var global$5 = tinymce.util.Tools.resolve('tinymce.util.Promise');
|
161
161
|
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
162
|
+
var guess = function (url) {
|
163
|
+
var mimes = {
|
164
|
+
mp3: 'audio/mpeg',
|
165
|
+
wav: 'audio/wav',
|
166
|
+
mp4: 'video/mp4',
|
167
|
+
webm: 'video/webm',
|
168
|
+
ogg: 'video/ogg',
|
169
|
+
swf: 'application/x-shockwave-flash'
|
170
|
+
};
|
171
|
+
var fileEnd = url.toLowerCase().split('.').pop();
|
172
|
+
var mime = mimes[fileEnd];
|
173
|
+
return mime ? mime : '';
|
174
|
+
};
|
175
|
+
var Mime = { guess: guess };
|
176
176
|
|
177
|
-
|
177
|
+
var global$6 = tinymce.util.Tools.resolve('tinymce.html.Writer');
|
178
178
|
|
179
|
-
|
179
|
+
var global$7 = tinymce.util.Tools.resolve('tinymce.html.Schema');
|
180
180
|
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
181
|
+
var DOM$1 = global$4.DOM;
|
182
|
+
var setAttributes = function (attrs, updatedAttrs) {
|
183
|
+
var name;
|
184
|
+
var i;
|
185
|
+
var value;
|
186
|
+
var attr;
|
187
|
+
for (name in updatedAttrs) {
|
188
|
+
value = '' + updatedAttrs[name];
|
189
|
+
if (attrs.map[name]) {
|
190
|
+
i = attrs.length;
|
191
|
+
while (i--) {
|
192
|
+
attr = attrs[i];
|
193
|
+
if (attr.name === name) {
|
194
|
+
if (value) {
|
195
|
+
attrs.map[name] = value;
|
196
|
+
attr.value = value;
|
197
|
+
} else {
|
198
|
+
delete attrs.map[name];
|
199
|
+
attrs.splice(i, 1);
|
200
|
+
}
|
200
201
|
}
|
201
202
|
}
|
203
|
+
} else if (value) {
|
204
|
+
attrs.push({
|
205
|
+
name: name,
|
206
|
+
value: value
|
207
|
+
});
|
208
|
+
attrs.map[name] = value;
|
202
209
|
}
|
203
|
-
} else if (value) {
|
204
|
-
attrs.push({
|
205
|
-
name: name,
|
206
|
-
value: value
|
207
|
-
});
|
208
|
-
attrs.map[name] = value;
|
209
210
|
}
|
210
|
-
}
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
start: function (name, attrs, empty) {
|
236
|
-
switch (name) {
|
237
|
-
case 'video':
|
238
|
-
case 'object':
|
239
|
-
case 'embed':
|
240
|
-
case 'img':
|
241
|
-
case 'iframe':
|
242
|
-
if (data.height !== undefined && data.width !== undefined) {
|
243
|
-
setAttributes(attrs, {
|
244
|
-
width: data.width,
|
245
|
-
height: data.height
|
246
|
-
});
|
247
|
-
}
|
248
|
-
break;
|
249
|
-
}
|
250
|
-
if (updateAll) {
|
211
|
+
};
|
212
|
+
var normalizeHtml = function (html) {
|
213
|
+
var writer = global$6();
|
214
|
+
var parser = global$3(writer);
|
215
|
+
parser.parse(html);
|
216
|
+
return writer.getContent();
|
217
|
+
};
|
218
|
+
var updateHtmlSax = function (html, data, updateAll) {
|
219
|
+
var writer = global$6();
|
220
|
+
var sourceCount = 0;
|
221
|
+
var hasImage;
|
222
|
+
global$3({
|
223
|
+
validate: false,
|
224
|
+
allow_conditional_comments: true,
|
225
|
+
special: 'script,noscript',
|
226
|
+
comment: function (text) {
|
227
|
+
writer.comment(text);
|
228
|
+
},
|
229
|
+
cdata: function (text) {
|
230
|
+
writer.cdata(text);
|
231
|
+
},
|
232
|
+
text: function (text, raw) {
|
233
|
+
writer.text(text, raw);
|
234
|
+
},
|
235
|
+
start: function (name, attrs, empty) {
|
251
236
|
switch (name) {
|
252
237
|
case 'video':
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
});
|
257
|
-
if (data.source2) {
|
258
|
-
setAttributes(attrs, { src: '' });
|
259
|
-
}
|
260
|
-
break;
|
238
|
+
case 'object':
|
239
|
+
case 'embed':
|
240
|
+
case 'img':
|
261
241
|
case 'iframe':
|
262
|
-
|
263
|
-
break;
|
264
|
-
case 'source':
|
265
|
-
sourceCount++;
|
266
|
-
if (sourceCount <= 2) {
|
242
|
+
if (data.height !== undefined && data.width !== undefined) {
|
267
243
|
setAttributes(attrs, {
|
268
|
-
|
269
|
-
|
244
|
+
width: data.width,
|
245
|
+
height: data.height
|
270
246
|
});
|
271
|
-
if (!data['source' + sourceCount]) {
|
272
|
-
return;
|
273
|
-
}
|
274
247
|
}
|
275
248
|
break;
|
276
|
-
case 'img':
|
277
|
-
if (!data.poster) {
|
278
|
-
return;
|
279
|
-
}
|
280
|
-
hasImage = true;
|
281
|
-
break;
|
282
249
|
}
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
250
|
+
if (updateAll) {
|
251
|
+
switch (name) {
|
252
|
+
case 'video':
|
253
|
+
setAttributes(attrs, {
|
254
|
+
poster: data.poster,
|
255
|
+
src: ''
|
256
|
+
});
|
257
|
+
if (data.source2) {
|
258
|
+
setAttributes(attrs, { src: '' });
|
259
|
+
}
|
260
|
+
break;
|
261
|
+
case 'iframe':
|
262
|
+
setAttributes(attrs, { src: data.source1 });
|
263
|
+
break;
|
264
|
+
case 'source':
|
265
|
+
sourceCount++;
|
266
|
+
if (sourceCount <= 2) {
|
293
267
|
setAttributes(attrs, {
|
294
|
-
src: data['source' +
|
295
|
-
type: data['source' +
|
268
|
+
src: data['source' + sourceCount],
|
269
|
+
type: data['source' + sourceCount + 'mime']
|
296
270
|
});
|
297
|
-
|
271
|
+
if (!data['source' + sourceCount]) {
|
272
|
+
return;
|
273
|
+
}
|
298
274
|
}
|
275
|
+
break;
|
276
|
+
case 'img':
|
277
|
+
if (!data.poster) {
|
278
|
+
return;
|
279
|
+
}
|
280
|
+
hasImage = true;
|
281
|
+
break;
|
299
282
|
}
|
300
283
|
}
|
284
|
+
writer.start(name, attrs, empty);
|
285
|
+
},
|
286
|
+
end: function (name) {
|
287
|
+
if (name === 'video' && updateAll) {
|
288
|
+
for (var index = 1; index <= 2; index++) {
|
289
|
+
if (data['source' + index]) {
|
290
|
+
var attrs = [];
|
291
|
+
attrs.map = {};
|
292
|
+
if (sourceCount < index) {
|
293
|
+
setAttributes(attrs, {
|
294
|
+
src: data['source' + index],
|
295
|
+
type: data['source' + index + 'mime']
|
296
|
+
});
|
297
|
+
writer.start('source', attrs, true);
|
298
|
+
}
|
299
|
+
}
|
300
|
+
}
|
301
|
+
}
|
302
|
+
if (data.poster && name === 'object' && updateAll && !hasImage) {
|
303
|
+
var imgAttrs = [];
|
304
|
+
imgAttrs.map = {};
|
305
|
+
setAttributes(imgAttrs, {
|
306
|
+
src: data.poster,
|
307
|
+
width: data.width,
|
308
|
+
height: data.height
|
309
|
+
});
|
310
|
+
writer.start('img', imgAttrs, true);
|
311
|
+
}
|
312
|
+
writer.end(name);
|
301
313
|
}
|
302
|
-
|
303
|
-
|
304
|
-
imgAttrs.map = {};
|
305
|
-
setAttributes(imgAttrs, {
|
306
|
-
src: data.poster,
|
307
|
-
width: data.width,
|
308
|
-
height: data.height
|
309
|
-
});
|
310
|
-
writer.start('img', imgAttrs, true);
|
311
|
-
}
|
312
|
-
writer.end(name);
|
313
|
-
}
|
314
|
-
}, global$7({})).parse(html);
|
315
|
-
return writer.getContent();
|
316
|
-
};
|
317
|
-
var isEphoxEmbed$1 = function (html) {
|
318
|
-
var fragment = DOM$1.createFragment(html);
|
319
|
-
return DOM$1.getAttrib(fragment.firstChild, 'data-ephox-embed-iri') !== '';
|
320
|
-
};
|
321
|
-
var updateEphoxEmbed = function (html, data) {
|
322
|
-
var fragment = DOM$1.createFragment(html);
|
323
|
-
var div = fragment.firstChild;
|
324
|
-
$_am85wh7jm0ofzjc.setMaxWidth(div, data.width);
|
325
|
-
$_am85wh7jm0ofzjc.setMaxHeight(div, data.height);
|
326
|
-
return normalizeHtml(div.outerHTML);
|
327
|
-
};
|
328
|
-
var updateHtml = function (html, data, updateAll) {
|
329
|
-
return isEphoxEmbed$1(html) ? updateEphoxEmbed(html, data) : updateHtmlSax(html, data, updateAll);
|
330
|
-
};
|
331
|
-
var $_cok7l6hcjm0ofzjm = { updateHtml: updateHtml };
|
332
|
-
|
333
|
-
var urlPatterns = [
|
334
|
-
{
|
335
|
-
regex: /youtu\.be\/([\w\-_\?&=.]+)/i,
|
336
|
-
type: 'iframe',
|
337
|
-
w: 560,
|
338
|
-
h: 314,
|
339
|
-
url: '//www.youtube.com/embed/$1',
|
340
|
-
allowFullscreen: true
|
341
|
-
},
|
342
|
-
{
|
343
|
-
regex: /youtube\.com(.+)v=([^&]+)(&([a-z0-9&=\-_]+))?/i,
|
344
|
-
type: 'iframe',
|
345
|
-
w: 560,
|
346
|
-
h: 314,
|
347
|
-
url: '//www.youtube.com/embed/$2?$4',
|
348
|
-
allowFullscreen: true
|
349
|
-
},
|
350
|
-
{
|
351
|
-
regex: /youtube.com\/embed\/([a-z0-9\?&=\-_]+)/i,
|
352
|
-
type: 'iframe',
|
353
|
-
w: 560,
|
354
|
-
h: 314,
|
355
|
-
url: '//www.youtube.com/embed/$1',
|
356
|
-
allowFullscreen: true
|
357
|
-
},
|
358
|
-
{
|
359
|
-
regex: /vimeo\.com\/([0-9]+)/,
|
360
|
-
type: 'iframe',
|
361
|
-
w: 425,
|
362
|
-
h: 350,
|
363
|
-
url: '//player.vimeo.com/video/$1?title=0&byline=0&portrait=0&color=8dc7dc',
|
364
|
-
allowFullscreen: true
|
365
|
-
},
|
366
|
-
{
|
367
|
-
regex: /vimeo\.com\/(.*)\/([0-9]+)/,
|
368
|
-
type: 'iframe',
|
369
|
-
w: 425,
|
370
|
-
h: 350,
|
371
|
-
url: '//player.vimeo.com/video/$2?title=0&byline=0',
|
372
|
-
allowFullscreen: true
|
373
|
-
},
|
374
|
-
{
|
375
|
-
regex: /maps\.google\.([a-z]{2,3})\/maps\/(.+)msid=(.+)/,
|
376
|
-
type: 'iframe',
|
377
|
-
w: 425,
|
378
|
-
h: 350,
|
379
|
-
url: '//maps.google.com/maps/ms?msid=$2&output=embed"',
|
380
|
-
allowFullscreen: false
|
381
|
-
},
|
382
|
-
{
|
383
|
-
regex: /dailymotion\.com\/video\/([^_]+)/,
|
384
|
-
type: 'iframe',
|
385
|
-
w: 480,
|
386
|
-
h: 270,
|
387
|
-
url: '//www.dailymotion.com/embed/video/$1',
|
388
|
-
allowFullscreen: true
|
389
|
-
},
|
390
|
-
{
|
391
|
-
regex: /dai\.ly\/([^_]+)/,
|
392
|
-
type: 'iframe',
|
393
|
-
w: 480,
|
394
|
-
h: 270,
|
395
|
-
url: '//www.dailymotion.com/embed/video/$1',
|
396
|
-
allowFullscreen: true
|
397
|
-
}
|
398
|
-
];
|
399
|
-
var getUrl = function (pattern, url) {
|
400
|
-
var match = pattern.regex.exec(url);
|
401
|
-
var newUrl = pattern.url;
|
402
|
-
var _loop_1 = function (i) {
|
403
|
-
newUrl = newUrl.replace('$' + i, function () {
|
404
|
-
return match[i] ? match[i] : '';
|
405
|
-
});
|
314
|
+
}, global$7({})).parse(html);
|
315
|
+
return writer.getContent();
|
406
316
|
};
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
return
|
420
|
-
}
|
421
|
-
|
317
|
+
var isEphoxEmbed$1 = function (html) {
|
318
|
+
var fragment = DOM$1.createFragment(html);
|
319
|
+
return DOM$1.getAttrib(fragment.firstChild, 'data-ephox-embed-iri') !== '';
|
320
|
+
};
|
321
|
+
var updateEphoxEmbed = function (html, data) {
|
322
|
+
var fragment = DOM$1.createFragment(html);
|
323
|
+
var div = fragment.firstChild;
|
324
|
+
Size.setMaxWidth(div, data.width);
|
325
|
+
Size.setMaxHeight(div, data.height);
|
326
|
+
return normalizeHtml(div.outerHTML);
|
327
|
+
};
|
328
|
+
var updateHtml = function (html, data, updateAll) {
|
329
|
+
return isEphoxEmbed$1(html) ? updateEphoxEmbed(html, data) : updateHtmlSax(html, data, updateAll);
|
330
|
+
};
|
331
|
+
var UpdateHtml = { updateHtml: updateHtml };
|
422
332
|
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
333
|
+
var urlPatterns = [
|
334
|
+
{
|
335
|
+
regex: /youtu\.be\/([\w\-_\?&=.]+)/i,
|
336
|
+
type: 'iframe',
|
337
|
+
w: 560,
|
338
|
+
h: 314,
|
339
|
+
url: '//www.youtube.com/embed/$1',
|
340
|
+
allowFullscreen: true
|
341
|
+
},
|
342
|
+
{
|
343
|
+
regex: /youtube\.com(.+)v=([^&]+)(&([a-z0-9&=\-_]+))?/i,
|
344
|
+
type: 'iframe',
|
345
|
+
w: 560,
|
346
|
+
h: 314,
|
347
|
+
url: '//www.youtube.com/embed/$2?$4',
|
348
|
+
allowFullscreen: true
|
349
|
+
},
|
350
|
+
{
|
351
|
+
regex: /youtube.com\/embed\/([a-z0-9\?&=\-_]+)/i,
|
352
|
+
type: 'iframe',
|
353
|
+
w: 560,
|
354
|
+
h: 314,
|
355
|
+
url: '//www.youtube.com/embed/$1',
|
356
|
+
allowFullscreen: true
|
357
|
+
},
|
358
|
+
{
|
359
|
+
regex: /vimeo\.com\/([0-9]+)/,
|
360
|
+
type: 'iframe',
|
361
|
+
w: 425,
|
362
|
+
h: 350,
|
363
|
+
url: '//player.vimeo.com/video/$1?title=0&byline=0&portrait=0&color=8dc7dc',
|
364
|
+
allowFullscreen: true
|
365
|
+
},
|
366
|
+
{
|
367
|
+
regex: /vimeo\.com\/(.*)\/([0-9]+)/,
|
368
|
+
type: 'iframe',
|
369
|
+
w: 425,
|
370
|
+
h: 350,
|
371
|
+
url: '//player.vimeo.com/video/$2?title=0&byline=0',
|
372
|
+
allowFullscreen: true
|
373
|
+
},
|
374
|
+
{
|
375
|
+
regex: /maps\.google\.([a-z]{2,3})\/maps\/(.+)msid=(.+)/,
|
376
|
+
type: 'iframe',
|
377
|
+
w: 425,
|
378
|
+
h: 350,
|
379
|
+
url: '//maps.google.com/maps/ms?msid=$2&output=embed"',
|
380
|
+
allowFullscreen: false
|
381
|
+
},
|
382
|
+
{
|
383
|
+
regex: /dailymotion\.com\/video\/([^_]+)/,
|
384
|
+
type: 'iframe',
|
385
|
+
w: 480,
|
386
|
+
h: 270,
|
387
|
+
url: '//www.dailymotion.com/embed/video/$1',
|
388
|
+
allowFullscreen: true
|
389
|
+
},
|
390
|
+
{
|
391
|
+
regex: /dai\.ly\/([^_]+)/,
|
392
|
+
type: 'iframe',
|
393
|
+
w: 480,
|
394
|
+
h: 270,
|
395
|
+
url: '//www.dailymotion.com/embed/video/$1',
|
396
|
+
allowFullscreen: true
|
458
397
|
}
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
data.poster = editor.convertURL(data.poster, 'poster');
|
471
|
-
var pattern = matchPattern(data.source1);
|
472
|
-
if (pattern) {
|
473
|
-
data.source1 = pattern.url;
|
474
|
-
data.type = pattern.type;
|
475
|
-
data.allowFullscreen = pattern.allowFullscreen;
|
476
|
-
data.width = data.width || pattern.w;
|
477
|
-
data.height = data.height || pattern.h;
|
478
|
-
}
|
479
|
-
if (data.embed) {
|
480
|
-
return $_cok7l6hcjm0ofzjm.updateHtml(data.embed, data, true);
|
481
|
-
} else {
|
482
|
-
var videoScript = $_545y8yh6jm0ofzjb.getVideoScriptMatch($_5hjeirh2jm0ofzj6.getScripts(editor), data.source1);
|
483
|
-
if (videoScript) {
|
484
|
-
data.type = 'script';
|
485
|
-
data.width = videoScript.width;
|
486
|
-
data.height = videoScript.height;
|
398
|
+
];
|
399
|
+
var getUrl = function (pattern, url) {
|
400
|
+
var match = pattern.regex.exec(url);
|
401
|
+
var newUrl = pattern.url;
|
402
|
+
var _loop_1 = function (i) {
|
403
|
+
newUrl = newUrl.replace('$' + i, function () {
|
404
|
+
return match[i] ? match[i] : '';
|
405
|
+
});
|
406
|
+
};
|
407
|
+
for (var i = 0; i < match.length; i++) {
|
408
|
+
_loop_1(i);
|
487
409
|
}
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
data[key] = editor.dom.encode(value);
|
410
|
+
return newUrl.replace(/\?$/, '');
|
411
|
+
};
|
412
|
+
var matchPattern = function (url) {
|
413
|
+
var pattern = urlPatterns.filter(function (pattern) {
|
414
|
+
return pattern.regex.test(url);
|
494
415
|
});
|
495
|
-
if (
|
496
|
-
return
|
497
|
-
} else if (data.source1mime === 'application/x-shockwave-flash') {
|
498
|
-
return getFlashHtml(data);
|
499
|
-
} else if (data.source1mime.indexOf('audio') !== -1) {
|
500
|
-
return getAudioHtml(data, audioTemplateCallback);
|
501
|
-
} else if (data.type === 'script') {
|
502
|
-
return getScriptHtml(data);
|
416
|
+
if (pattern.length > 0) {
|
417
|
+
return global$2.extend({}, pattern[0], { url: getUrl(pattern[0], url) });
|
503
418
|
} else {
|
504
|
-
return
|
419
|
+
return null;
|
505
420
|
}
|
506
|
-
}
|
507
|
-
};
|
508
|
-
var $_32etinhajm0ofzjg = { dataToHtml: dataToHtml };
|
421
|
+
};
|
509
422
|
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
423
|
+
var getIframeHtml = function (data) {
|
424
|
+
var allowFullscreen = data.allowFullscreen ? ' allowFullscreen="1"' : '';
|
425
|
+
return '<iframe src="' + data.source1 + '" width="' + data.width + '" height="' + data.height + '"' + allowFullscreen + '></iframe>';
|
426
|
+
};
|
427
|
+
var getFlashHtml = function (data) {
|
428
|
+
var html = '<object data="' + data.source1 + '" width="' + data.width + '" height="' + data.height + '" type="application/x-shockwave-flash">';
|
429
|
+
if (data.poster) {
|
430
|
+
html += '<img src="' + data.poster + '" width="' + data.width + '" height="' + data.height + '" />';
|
431
|
+
}
|
432
|
+
html += '</object>';
|
433
|
+
return html;
|
434
|
+
};
|
435
|
+
var getAudioHtml = function (data, audioTemplateCallback) {
|
436
|
+
if (audioTemplateCallback) {
|
437
|
+
return audioTemplateCallback(data);
|
524
438
|
} else {
|
525
|
-
|
439
|
+
return '<audio controls="controls" src="' + data.source1 + '">' + (data.source2 ? '\n<source src="' + data.source2 + '"' + (data.source2mime ? ' type="' + data.source2mime + '"' : '') + ' />\n' : '') + '</audio>';
|
526
440
|
}
|
527
|
-
}
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
return embedHandler ? embedPromise(data, loadedData(editor), embedHandler) : defaultPromise(data, loadedData(editor));
|
545
|
-
};
|
546
|
-
var isCached = function (url) {
|
547
|
-
return cache.hasOwnProperty(url);
|
548
|
-
};
|
549
|
-
var $_bs9hzwh8jm0ofzje = {
|
550
|
-
getEmbedHtml: getEmbedHtml,
|
551
|
-
isCached: isCached
|
552
|
-
};
|
553
|
-
|
554
|
-
var doSyncSize = function (widthCtrl, heightCtrl) {
|
555
|
-
widthCtrl.state.set('oldVal', widthCtrl.value());
|
556
|
-
heightCtrl.state.set('oldVal', heightCtrl.value());
|
557
|
-
};
|
558
|
-
var doSizeControls = function (win, f) {
|
559
|
-
var widthCtrl = win.find('#width')[0];
|
560
|
-
var heightCtrl = win.find('#height')[0];
|
561
|
-
var constrained = win.find('#constrain')[0];
|
562
|
-
if (widthCtrl && heightCtrl && constrained) {
|
563
|
-
f(widthCtrl, heightCtrl, constrained.checked());
|
564
|
-
}
|
565
|
-
};
|
566
|
-
var doUpdateSize = function (widthCtrl, heightCtrl, isContrained) {
|
567
|
-
var oldWidth = widthCtrl.state.get('oldVal');
|
568
|
-
var oldHeight = heightCtrl.state.get('oldVal');
|
569
|
-
var newWidth = widthCtrl.value();
|
570
|
-
var newHeight = heightCtrl.value();
|
571
|
-
if (isContrained && oldWidth && oldHeight && newWidth && newHeight) {
|
572
|
-
if (newWidth !== oldWidth) {
|
573
|
-
newHeight = Math.round(newWidth / oldWidth * newHeight);
|
574
|
-
if (!isNaN(newHeight)) {
|
575
|
-
heightCtrl.value(newHeight);
|
441
|
+
};
|
442
|
+
var getVideoHtml = function (data, videoTemplateCallback) {
|
443
|
+
if (videoTemplateCallback) {
|
444
|
+
return videoTemplateCallback(data);
|
445
|
+
} else {
|
446
|
+
return '<video width="' + data.width + '" height="' + data.height + '"' + (data.poster ? ' poster="' + data.poster + '"' : '') + ' controls="controls">\n' + '<source src="' + data.source1 + '"' + (data.source1mime ? ' type="' + data.source1mime + '"' : '') + ' />\n' + (data.source2 ? '<source src="' + data.source2 + '"' + (data.source2mime ? ' type="' + data.source2mime + '"' : '') + ' />\n' : '') + '</video>';
|
447
|
+
}
|
448
|
+
};
|
449
|
+
var getScriptHtml = function (data) {
|
450
|
+
return '<script src="' + data.source1 + '"></script>';
|
451
|
+
};
|
452
|
+
var dataToHtml = function (editor, dataIn) {
|
453
|
+
var data = global$2.extend({}, dataIn);
|
454
|
+
if (!data.source1) {
|
455
|
+
global$2.extend(data, HtmlToData.htmlToData(Settings.getScripts(editor), data.embed));
|
456
|
+
if (!data.source1) {
|
457
|
+
return '';
|
576
458
|
}
|
459
|
+
}
|
460
|
+
if (!data.source2) {
|
461
|
+
data.source2 = '';
|
462
|
+
}
|
463
|
+
if (!data.poster) {
|
464
|
+
data.poster = '';
|
465
|
+
}
|
466
|
+
data.source1 = editor.convertURL(data.source1, 'source');
|
467
|
+
data.source2 = editor.convertURL(data.source2, 'source');
|
468
|
+
data.source1mime = Mime.guess(data.source1);
|
469
|
+
data.source2mime = Mime.guess(data.source2);
|
470
|
+
data.poster = editor.convertURL(data.poster, 'poster');
|
471
|
+
var pattern = matchPattern(data.source1);
|
472
|
+
if (pattern) {
|
473
|
+
data.source1 = pattern.url;
|
474
|
+
data.type = pattern.type;
|
475
|
+
data.allowFullscreen = pattern.allowFullscreen;
|
476
|
+
data.width = data.width || pattern.w;
|
477
|
+
data.height = data.height || pattern.h;
|
478
|
+
}
|
479
|
+
if (data.embed) {
|
480
|
+
return UpdateHtml.updateHtml(data.embed, data, true);
|
577
481
|
} else {
|
578
|
-
|
579
|
-
if (
|
580
|
-
|
482
|
+
var videoScript = VideoScript.getVideoScriptMatch(Settings.getScripts(editor), data.source1);
|
483
|
+
if (videoScript) {
|
484
|
+
data.type = 'script';
|
485
|
+
data.width = videoScript.width;
|
486
|
+
data.height = videoScript.height;
|
487
|
+
}
|
488
|
+
var audioTemplateCallback = Settings.getAudioTemplateCallback(editor);
|
489
|
+
var videoTemplateCallback = Settings.getVideoTemplateCallback(editor);
|
490
|
+
data.width = data.width || 300;
|
491
|
+
data.height = data.height || 150;
|
492
|
+
global$2.each(data, function (value, key) {
|
493
|
+
data[key] = editor.dom.encode(value);
|
494
|
+
});
|
495
|
+
if (data.type === 'iframe') {
|
496
|
+
return getIframeHtml(data);
|
497
|
+
} else if (data.source1mime === 'application/x-shockwave-flash') {
|
498
|
+
return getFlashHtml(data);
|
499
|
+
} else if (data.source1mime.indexOf('audio') !== -1) {
|
500
|
+
return getAudioHtml(data, audioTemplateCallback);
|
501
|
+
} else if (data.type === 'script') {
|
502
|
+
return getScriptHtml(data);
|
503
|
+
} else {
|
504
|
+
return getVideoHtml(data, videoTemplateCallback);
|
581
505
|
}
|
582
506
|
}
|
583
|
-
}
|
584
|
-
doSyncSize(widthCtrl, heightCtrl);
|
585
|
-
};
|
586
|
-
var syncSize = function (win) {
|
587
|
-
doSizeControls(win, doSyncSize);
|
588
|
-
};
|
589
|
-
var updateSize = function (win) {
|
590
|
-
doSizeControls(win, doUpdateSize);
|
591
|
-
};
|
592
|
-
var createUi = function (onChange) {
|
593
|
-
var recalcSize = function () {
|
594
|
-
onChange(function (win) {
|
595
|
-
updateSize(win);
|
596
|
-
});
|
597
507
|
};
|
598
|
-
|
599
|
-
type: 'container',
|
600
|
-
label: 'Dimensions',
|
601
|
-
layout: 'flex',
|
602
|
-
align: 'center',
|
603
|
-
spacing: 5,
|
604
|
-
items: [
|
605
|
-
{
|
606
|
-
name: 'width',
|
607
|
-
type: 'textbox',
|
608
|
-
maxLength: 5,
|
609
|
-
size: 5,
|
610
|
-
onchange: recalcSize,
|
611
|
-
ariaLabel: 'Width'
|
612
|
-
},
|
613
|
-
{
|
614
|
-
type: 'label',
|
615
|
-
text: 'x'
|
616
|
-
},
|
617
|
-
{
|
618
|
-
name: 'height',
|
619
|
-
type: 'textbox',
|
620
|
-
maxLength: 5,
|
621
|
-
size: 5,
|
622
|
-
onchange: recalcSize,
|
623
|
-
ariaLabel: 'Height'
|
624
|
-
},
|
625
|
-
{
|
626
|
-
name: 'constrain',
|
627
|
-
type: 'checkbox',
|
628
|
-
checked: true,
|
629
|
-
text: 'Constrain proportions'
|
630
|
-
}
|
631
|
-
]
|
632
|
-
};
|
633
|
-
};
|
634
|
-
var $_3pmnovhgjm0ofzju = {
|
635
|
-
createUi: createUi,
|
636
|
-
syncSize: syncSize,
|
637
|
-
updateSize: updateSize
|
638
|
-
};
|
508
|
+
var DataToHtml = { dataToHtml: dataToHtml };
|
639
509
|
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
|
646
|
-
|
510
|
+
var cache = {};
|
511
|
+
var embedPromise = function (data, dataToHtml, handler) {
|
512
|
+
return new global$5(function (res, rej) {
|
513
|
+
var wrappedResolve = function (response) {
|
514
|
+
if (response.html) {
|
515
|
+
cache[data.source1] = response;
|
516
|
+
}
|
517
|
+
return res({
|
518
|
+
url: data.source1,
|
519
|
+
html: response.html ? response.html : dataToHtml(data)
|
520
|
+
});
|
521
|
+
};
|
522
|
+
if (cache[data.source1]) {
|
523
|
+
wrappedResolve(cache[data.source1]);
|
524
|
+
} else {
|
525
|
+
handler({ url: data.source1 }, wrappedResolve, rej);
|
526
|
+
}
|
647
527
|
});
|
648
528
|
};
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
529
|
+
var defaultPromise = function (data, dataToHtml) {
|
530
|
+
return new global$5(function (res) {
|
531
|
+
res({
|
532
|
+
html: dataToHtml(data),
|
533
|
+
url: data.source1
|
534
|
+
});
|
535
|
+
});
|
536
|
+
};
|
537
|
+
var loadedData = function (editor) {
|
538
|
+
return function (data) {
|
539
|
+
return DataToHtml.dataToHtml(editor, data);
|
659
540
|
};
|
660
|
-
}
|
661
|
-
|
662
|
-
|
663
|
-
|
664
|
-
|
665
|
-
|
666
|
-
return
|
667
|
-
}
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
675
|
-
|
676
|
-
|
677
|
-
|
541
|
+
};
|
542
|
+
var getEmbedHtml = function (editor, data) {
|
543
|
+
var embedHandler = Settings.getUrlResolver(editor);
|
544
|
+
return embedHandler ? embedPromise(data, loadedData(editor), embedHandler) : defaultPromise(data, loadedData(editor));
|
545
|
+
};
|
546
|
+
var isCached = function (url) {
|
547
|
+
return cache.hasOwnProperty(url);
|
548
|
+
};
|
549
|
+
var Service = {
|
550
|
+
getEmbedHtml: getEmbedHtml,
|
551
|
+
isCached: isCached
|
552
|
+
};
|
553
|
+
|
554
|
+
var doSyncSize = function (widthCtrl, heightCtrl) {
|
555
|
+
widthCtrl.state.set('oldVal', widthCtrl.value());
|
556
|
+
heightCtrl.state.set('oldVal', heightCtrl.value());
|
557
|
+
};
|
558
|
+
var doSizeControls = function (win, f) {
|
559
|
+
var widthCtrl = win.find('#width')[0];
|
560
|
+
var heightCtrl = win.find('#height')[0];
|
561
|
+
var constrained = win.find('#constrain')[0];
|
562
|
+
if (widthCtrl && heightCtrl && constrained) {
|
563
|
+
f(widthCtrl, heightCtrl, constrained.checked());
|
678
564
|
}
|
679
565
|
};
|
680
|
-
|
681
|
-
|
682
|
-
|
683
|
-
|
684
|
-
|
685
|
-
|
686
|
-
|
687
|
-
|
688
|
-
|
566
|
+
var doUpdateSize = function (widthCtrl, heightCtrl, isContrained) {
|
567
|
+
var oldWidth = widthCtrl.state.get('oldVal');
|
568
|
+
var oldHeight = heightCtrl.state.get('oldVal');
|
569
|
+
var newWidth = widthCtrl.value();
|
570
|
+
var newHeight = heightCtrl.value();
|
571
|
+
if (isContrained && oldWidth && oldHeight && newWidth && newHeight) {
|
572
|
+
if (newWidth !== oldWidth) {
|
573
|
+
newHeight = Math.round(newWidth / oldWidth * newHeight);
|
574
|
+
if (!isNaN(newHeight)) {
|
575
|
+
heightCtrl.value(newHeight);
|
576
|
+
}
|
577
|
+
} else {
|
578
|
+
newWidth = Math.round(newHeight / oldHeight * newWidth);
|
579
|
+
if (!isNaN(newWidth)) {
|
580
|
+
widthCtrl.value(newWidth);
|
581
|
+
}
|
689
582
|
}
|
690
583
|
}
|
691
|
-
|
692
|
-
|
693
|
-
|
694
|
-
|
695
|
-
|
696
|
-
|
697
|
-
|
698
|
-
|
699
|
-
|
700
|
-
|
701
|
-
|
702
|
-
|
703
|
-
|
704
|
-
|
705
|
-
|
706
|
-
$_bs9hzwh8jm0ofzje.getEmbedHtml(editor, data).then(function (response) {
|
707
|
-
handleInsert(editor, response.html);
|
708
|
-
}).catch(handleError(editor));
|
709
|
-
}
|
710
|
-
};
|
711
|
-
var populateMeta = function (win, meta) {
|
712
|
-
global$2.each(meta, function (value, key) {
|
713
|
-
win.find('#' + key).value(value);
|
714
|
-
});
|
715
|
-
};
|
716
|
-
var showDialog = function (editor) {
|
717
|
-
var win;
|
718
|
-
var data;
|
719
|
-
var generalFormItems = [{
|
720
|
-
name: 'source1',
|
721
|
-
type: 'filepicker',
|
722
|
-
filetype: 'media',
|
723
|
-
size: 40,
|
724
|
-
autofocus: true,
|
725
|
-
label: 'Source',
|
726
|
-
onpaste: function () {
|
727
|
-
setTimeout(function () {
|
728
|
-
$_bs9hzwh8jm0ofzje.getEmbedHtml(editor, win.toJSON()).then(addEmbedHtml(win, editor)).catch(handleError(editor));
|
729
|
-
}, 1);
|
730
|
-
},
|
731
|
-
onchange: function (e) {
|
732
|
-
$_bs9hzwh8jm0ofzje.getEmbedHtml(editor, win.toJSON()).then(addEmbedHtml(win, editor)).catch(handleError(editor));
|
733
|
-
populateMeta(win, e.meta);
|
734
|
-
},
|
735
|
-
onbeforecall: function (e) {
|
736
|
-
e.meta = win.toJSON();
|
737
|
-
}
|
738
|
-
}];
|
739
|
-
var advancedFormItems = [];
|
740
|
-
var reserialise = function (update) {
|
741
|
-
update(win);
|
742
|
-
data = win.toJSON();
|
743
|
-
win.find('#embed').value($_cok7l6hcjm0ofzjm.updateHtml(data.embed, data));
|
744
|
-
};
|
745
|
-
if ($_5hjeirh2jm0ofzj6.hasAltSource(editor)) {
|
746
|
-
advancedFormItems.push({
|
747
|
-
name: 'source2',
|
748
|
-
type: 'filepicker',
|
749
|
-
filetype: 'media',
|
750
|
-
size: 40,
|
751
|
-
label: 'Alternative source'
|
752
|
-
});
|
753
|
-
}
|
754
|
-
if ($_5hjeirh2jm0ofzj6.hasPoster(editor)) {
|
755
|
-
advancedFormItems.push({
|
756
|
-
name: 'poster',
|
757
|
-
type: 'filepicker',
|
758
|
-
filetype: 'image',
|
759
|
-
size: 40,
|
760
|
-
label: 'Poster'
|
761
|
-
});
|
762
|
-
}
|
763
|
-
if ($_5hjeirh2jm0ofzj6.hasDimensions(editor)) {
|
764
|
-
var control = $_3pmnovhgjm0ofzju.createUi(reserialise);
|
765
|
-
generalFormItems.push(control);
|
766
|
-
}
|
767
|
-
data = getData(editor);
|
768
|
-
var embedTextBox = {
|
769
|
-
id: 'mcemediasource',
|
770
|
-
type: 'textbox',
|
771
|
-
flex: 1,
|
772
|
-
name: 'embed',
|
773
|
-
value: getSource(editor),
|
774
|
-
multiline: true,
|
775
|
-
rows: 5,
|
776
|
-
label: 'Source'
|
777
|
-
};
|
778
|
-
var updateValueOnChange = function () {
|
779
|
-
data = global$2.extend({}, $_5d5iuvh3jm0ofzj8.htmlToData($_5hjeirh2jm0ofzj6.getScripts(editor), this.value()));
|
780
|
-
this.parent().parent().fromJSON(data);
|
781
|
-
};
|
782
|
-
embedTextBox[embedChange] = updateValueOnChange;
|
783
|
-
var body = [
|
784
|
-
{
|
785
|
-
title: 'General',
|
786
|
-
type: 'form',
|
787
|
-
items: generalFormItems
|
788
|
-
},
|
789
|
-
{
|
790
|
-
title: 'Embed',
|
584
|
+
doSyncSize(widthCtrl, heightCtrl);
|
585
|
+
};
|
586
|
+
var syncSize = function (win) {
|
587
|
+
doSizeControls(win, doSyncSize);
|
588
|
+
};
|
589
|
+
var updateSize = function (win) {
|
590
|
+
doSizeControls(win, doUpdateSize);
|
591
|
+
};
|
592
|
+
var createUi = function (onChange) {
|
593
|
+
var recalcSize = function () {
|
594
|
+
onChange(function (win) {
|
595
|
+
updateSize(win);
|
596
|
+
});
|
597
|
+
};
|
598
|
+
return {
|
791
599
|
type: 'container',
|
600
|
+
label: 'Dimensions',
|
792
601
|
layout: 'flex',
|
793
|
-
|
794
|
-
|
795
|
-
padding: 10,
|
796
|
-
spacing: 10,
|
602
|
+
align: 'center',
|
603
|
+
spacing: 5,
|
797
604
|
items: [
|
605
|
+
{
|
606
|
+
name: 'width',
|
607
|
+
type: 'textbox',
|
608
|
+
maxLength: 5,
|
609
|
+
size: 5,
|
610
|
+
onchange: recalcSize,
|
611
|
+
ariaLabel: 'Width'
|
612
|
+
},
|
798
613
|
{
|
799
614
|
type: 'label',
|
800
|
-
text: '
|
801
|
-
|
615
|
+
text: 'x'
|
616
|
+
},
|
617
|
+
{
|
618
|
+
name: 'height',
|
619
|
+
type: 'textbox',
|
620
|
+
maxLength: 5,
|
621
|
+
size: 5,
|
622
|
+
onchange: recalcSize,
|
623
|
+
ariaLabel: 'Height'
|
802
624
|
},
|
803
|
-
|
625
|
+
{
|
626
|
+
name: 'constrain',
|
627
|
+
type: 'checkbox',
|
628
|
+
checked: true,
|
629
|
+
text: 'Constrain proportions'
|
630
|
+
}
|
804
631
|
]
|
632
|
+
};
|
633
|
+
};
|
634
|
+
var SizeManager = {
|
635
|
+
createUi: createUi,
|
636
|
+
syncSize: syncSize,
|
637
|
+
updateSize: updateSize
|
638
|
+
};
|
639
|
+
|
640
|
+
var embedChange = global$1.ie && global$1.ie <= 8 ? 'onChange' : 'onInput';
|
641
|
+
var handleError = function (editor) {
|
642
|
+
return function (error) {
|
643
|
+
var errorMessage = error && error.msg ? 'Media embed handler error: ' + error.msg : 'Media embed handler threw unknown error.';
|
644
|
+
editor.notificationManager.open({
|
645
|
+
type: 'error',
|
646
|
+
text: errorMessage
|
647
|
+
});
|
648
|
+
};
|
649
|
+
};
|
650
|
+
var getData = function (editor) {
|
651
|
+
var element = editor.selection.getNode();
|
652
|
+
var dataEmbed = element.getAttribute('data-ephox-embed-iri');
|
653
|
+
if (dataEmbed) {
|
654
|
+
return {
|
655
|
+
'source1': dataEmbed,
|
656
|
+
'data-ephox-embed-iri': dataEmbed,
|
657
|
+
'width': Size.getMaxWidth(element),
|
658
|
+
'height': Size.getMaxHeight(element)
|
659
|
+
};
|
805
660
|
}
|
806
|
-
|
807
|
-
|
808
|
-
|
809
|
-
|
810
|
-
|
811
|
-
|
661
|
+
return element.getAttribute('data-mce-object') ? HtmlToData.htmlToData(Settings.getScripts(editor), editor.serializer.serialize(element, { selection: true })) : {};
|
662
|
+
};
|
663
|
+
var getSource = function (editor) {
|
664
|
+
var elm = editor.selection.getNode();
|
665
|
+
if (elm.getAttribute('data-mce-object') || elm.getAttribute('data-ephox-embed-iri')) {
|
666
|
+
return editor.selection.getContent();
|
667
|
+
}
|
668
|
+
};
|
669
|
+
var addEmbedHtml = function (win, editor) {
|
670
|
+
return function (response) {
|
671
|
+
var html = response.html;
|
672
|
+
var embed = win.find('#embed')[0];
|
673
|
+
var data = global$2.extend(HtmlToData.htmlToData(Settings.getScripts(editor), html), { source1: response.url });
|
674
|
+
win.fromJSON(data);
|
675
|
+
if (embed) {
|
676
|
+
embed.value(html);
|
677
|
+
SizeManager.updateSize(win);
|
678
|
+
}
|
679
|
+
};
|
680
|
+
};
|
681
|
+
var selectPlaceholder = function (editor, beforeObjects) {
|
682
|
+
var i;
|
683
|
+
var y;
|
684
|
+
var afterObjects = editor.dom.select('img[data-mce-object]');
|
685
|
+
for (i = 0; i < beforeObjects.length; i++) {
|
686
|
+
for (y = afterObjects.length - 1; y >= 0; y--) {
|
687
|
+
if (beforeObjects[i] === afterObjects[y]) {
|
688
|
+
afterObjects.splice(y, 1);
|
689
|
+
}
|
690
|
+
}
|
691
|
+
}
|
692
|
+
editor.selection.select(afterObjects[0]);
|
693
|
+
};
|
694
|
+
var handleInsert = function (editor, html) {
|
695
|
+
var beforeObjects = editor.dom.select('img[data-mce-object]');
|
696
|
+
editor.insertContent(html);
|
697
|
+
selectPlaceholder(editor, beforeObjects);
|
698
|
+
editor.nodeChanged();
|
699
|
+
};
|
700
|
+
var submitForm = function (win, editor) {
|
701
|
+
var data = win.toJSON();
|
702
|
+
data.embed = UpdateHtml.updateHtml(data.embed, data);
|
703
|
+
if (data.embed && Service.isCached(data.source1)) {
|
704
|
+
handleInsert(editor, data.embed);
|
705
|
+
} else {
|
706
|
+
Service.getEmbedHtml(editor, data).then(function (response) {
|
707
|
+
handleInsert(editor, response.html);
|
708
|
+
}).catch(handleError(editor));
|
709
|
+
}
|
710
|
+
};
|
711
|
+
var populateMeta = function (win, meta) {
|
712
|
+
global$2.each(meta, function (value, key) {
|
713
|
+
win.find('#' + key).value(value);
|
812
714
|
});
|
813
|
-
}
|
814
|
-
|
815
|
-
|
816
|
-
|
817
|
-
|
818
|
-
|
819
|
-
|
820
|
-
|
821
|
-
|
715
|
+
};
|
716
|
+
var showDialog = function (editor) {
|
717
|
+
var win;
|
718
|
+
var data;
|
719
|
+
var generalFormItems = [{
|
720
|
+
name: 'source1',
|
721
|
+
type: 'filepicker',
|
722
|
+
filetype: 'media',
|
723
|
+
size: 40,
|
724
|
+
autofocus: true,
|
725
|
+
label: 'Source',
|
726
|
+
onpaste: function () {
|
727
|
+
setTimeout(function () {
|
728
|
+
Service.getEmbedHtml(editor, win.toJSON()).then(addEmbedHtml(win, editor)).catch(handleError(editor));
|
729
|
+
}, 1);
|
730
|
+
},
|
731
|
+
onchange: function (e) {
|
732
|
+
Service.getEmbedHtml(editor, win.toJSON()).then(addEmbedHtml(win, editor)).catch(handleError(editor));
|
733
|
+
populateMeta(win, e.meta);
|
734
|
+
},
|
735
|
+
onbeforecall: function (e) {
|
736
|
+
e.meta = win.toJSON();
|
737
|
+
}
|
738
|
+
}];
|
739
|
+
var advancedFormItems = [];
|
740
|
+
var reserialise = function (update) {
|
741
|
+
update(win);
|
742
|
+
data = win.toJSON();
|
743
|
+
win.find('#embed').value(UpdateHtml.updateHtml(data.embed, data));
|
744
|
+
};
|
745
|
+
if (Settings.hasAltSource(editor)) {
|
746
|
+
advancedFormItems.push({
|
747
|
+
name: 'source2',
|
748
|
+
type: 'filepicker',
|
749
|
+
filetype: 'media',
|
750
|
+
size: 40,
|
751
|
+
label: 'Alternative source'
|
752
|
+
});
|
822
753
|
}
|
823
|
-
|
824
|
-
|
825
|
-
|
826
|
-
|
754
|
+
if (Settings.hasPoster(editor)) {
|
755
|
+
advancedFormItems.push({
|
756
|
+
name: 'poster',
|
757
|
+
type: 'filepicker',
|
758
|
+
filetype: 'image',
|
759
|
+
size: 40,
|
760
|
+
label: 'Poster'
|
761
|
+
});
|
762
|
+
}
|
763
|
+
if (Settings.hasDimensions(editor)) {
|
764
|
+
var control = SizeManager.createUi(reserialise);
|
765
|
+
generalFormItems.push(control);
|
766
|
+
}
|
767
|
+
data = getData(editor);
|
768
|
+
var embedTextBox = {
|
769
|
+
id: 'mcemediasource',
|
770
|
+
type: 'textbox',
|
771
|
+
flex: 1,
|
772
|
+
name: 'embed',
|
773
|
+
value: getSource(editor),
|
774
|
+
multiline: true,
|
775
|
+
rows: 5,
|
776
|
+
label: 'Source'
|
777
|
+
};
|
778
|
+
var updateValueOnChange = function () {
|
779
|
+
data = global$2.extend({}, HtmlToData.htmlToData(Settings.getScripts(editor), this.value()));
|
780
|
+
this.parent().parent().fromJSON(data);
|
781
|
+
};
|
782
|
+
embedTextBox[embedChange] = updateValueOnChange;
|
783
|
+
var body = [
|
784
|
+
{
|
785
|
+
title: 'General',
|
786
|
+
type: 'form',
|
787
|
+
items: generalFormItems
|
788
|
+
},
|
789
|
+
{
|
790
|
+
title: 'Embed',
|
791
|
+
type: 'container',
|
792
|
+
layout: 'flex',
|
793
|
+
direction: 'column',
|
794
|
+
align: 'stretch',
|
795
|
+
padding: 10,
|
796
|
+
spacing: 10,
|
797
|
+
items: [
|
798
|
+
{
|
799
|
+
type: 'label',
|
800
|
+
text: 'Paste your embed code below:',
|
801
|
+
forId: 'mcemediasource'
|
802
|
+
},
|
803
|
+
embedTextBox
|
804
|
+
]
|
805
|
+
}
|
806
|
+
];
|
807
|
+
if (advancedFormItems.length > 0) {
|
808
|
+
body.push({
|
809
|
+
title: 'Advanced',
|
810
|
+
type: 'form',
|
811
|
+
items: advancedFormItems
|
812
|
+
});
|
813
|
+
}
|
814
|
+
win = editor.windowManager.open({
|
815
|
+
title: 'Insert/edit media',
|
816
|
+
data: data,
|
817
|
+
bodyType: 'tabpanel',
|
818
|
+
body: body,
|
819
|
+
onSubmit: function () {
|
820
|
+
SizeManager.updateSize(win);
|
821
|
+
submitForm(win, editor);
|
822
|
+
}
|
823
|
+
});
|
824
|
+
SizeManager.syncSize(win);
|
825
|
+
};
|
826
|
+
var Dialog = { showDialog: showDialog };
|
827
827
|
|
828
|
-
|
829
|
-
|
830
|
-
|
828
|
+
var get = function (editor) {
|
829
|
+
var showDialog = function () {
|
830
|
+
Dialog.showDialog(editor);
|
831
|
+
};
|
832
|
+
return { showDialog: showDialog };
|
831
833
|
};
|
832
|
-
|
833
|
-
};
|
834
|
-
var $_75in9sgyjm0ofziz = { get: get };
|
834
|
+
var Api = { get: get };
|
835
835
|
|
836
|
-
|
837
|
-
|
838
|
-
|
836
|
+
var register = function (editor) {
|
837
|
+
var showDialog = function () {
|
838
|
+
Dialog.showDialog(editor);
|
839
|
+
};
|
840
|
+
editor.addCommand('mceMedia', showDialog);
|
839
841
|
};
|
840
|
-
|
841
|
-
};
|
842
|
-
var $_dhpuelhhjm0ofzjw = { register: register };
|
842
|
+
var Commands = { register: register };
|
843
843
|
|
844
|
-
|
844
|
+
var global$8 = tinymce.util.Tools.resolve('tinymce.html.Node');
|
845
845
|
|
846
|
-
|
847
|
-
|
848
|
-
|
849
|
-
|
850
|
-
|
851
|
-
|
852
|
-
|
853
|
-
|
854
|
-
|
855
|
-
|
856
|
-
|
857
|
-
|
858
|
-
|
859
|
-
|
860
|
-
|
861
|
-
|
862
|
-
|
863
|
-
|
864
|
-
|
865
|
-
|
866
|
-
|
867
|
-
|
868
|
-
return;
|
869
|
-
}
|
870
|
-
for (var i = 0; i < attrs.length; i++) {
|
871
|
-
if (attrs[i].name.indexOf('on') === 0) {
|
846
|
+
var sanitize = function (editor, html) {
|
847
|
+
if (Settings.shouldFilterHtml(editor) === false) {
|
848
|
+
return html;
|
849
|
+
}
|
850
|
+
var writer = global$6();
|
851
|
+
var blocked;
|
852
|
+
global$3({
|
853
|
+
validate: false,
|
854
|
+
allow_conditional_comments: false,
|
855
|
+
special: 'script,noscript',
|
856
|
+
comment: function (text) {
|
857
|
+
writer.comment(text);
|
858
|
+
},
|
859
|
+
cdata: function (text) {
|
860
|
+
writer.cdata(text);
|
861
|
+
},
|
862
|
+
text: function (text, raw) {
|
863
|
+
writer.text(text, raw);
|
864
|
+
},
|
865
|
+
start: function (name, attrs, empty) {
|
866
|
+
blocked = true;
|
867
|
+
if (name === 'script' || name === 'noscript') {
|
872
868
|
return;
|
873
869
|
}
|
874
|
-
|
875
|
-
attrs[i].
|
870
|
+
for (var i = 0; i < attrs.length; i++) {
|
871
|
+
if (attrs[i].name.indexOf('on') === 0) {
|
872
|
+
return;
|
873
|
+
}
|
874
|
+
if (attrs[i].name === 'style') {
|
875
|
+
attrs[i].value = editor.dom.serializeStyle(editor.dom.parseStyle(attrs[i].value), name);
|
876
|
+
}
|
876
877
|
}
|
878
|
+
writer.start(name, attrs, empty);
|
879
|
+
blocked = false;
|
880
|
+
},
|
881
|
+
end: function (name) {
|
882
|
+
if (blocked) {
|
883
|
+
return;
|
884
|
+
}
|
885
|
+
writer.end(name);
|
877
886
|
}
|
878
|
-
|
879
|
-
|
880
|
-
|
881
|
-
|
882
|
-
if (blocked) {
|
883
|
-
return;
|
884
|
-
}
|
885
|
-
writer.end(name);
|
886
|
-
}
|
887
|
-
}, global$7({})).parse(html);
|
888
|
-
return writer.getContent();
|
889
|
-
};
|
890
|
-
var $_5ympa3hljm0ofzkb = { sanitize: sanitize };
|
887
|
+
}, global$7({})).parse(html);
|
888
|
+
return writer.getContent();
|
889
|
+
};
|
890
|
+
var Sanitize = { sanitize: sanitize };
|
891
891
|
|
892
|
-
|
893
|
-
|
894
|
-
|
895
|
-
|
896
|
-
|
897
|
-
|
898
|
-
|
899
|
-
|
900
|
-
|
901
|
-
|
902
|
-
|
903
|
-
|
904
|
-
|
905
|
-
|
906
|
-
|
907
|
-
|
908
|
-
|
909
|
-
|
910
|
-
|
911
|
-
|
912
|
-
|
913
|
-
|
914
|
-
|
915
|
-
|
916
|
-
|
917
|
-
|
918
|
-
|
919
|
-
|
920
|
-
|
921
|
-
|
922
|
-
|
923
|
-
|
924
|
-
|
925
|
-
|
926
|
-
|
927
|
-
|
928
|
-
|
929
|
-
|
930
|
-
|
931
|
-
|
932
|
-
|
933
|
-
|
934
|
-
|
935
|
-
|
936
|
-
|
937
|
-
|
938
|
-
|
939
|
-
|
940
|
-
|
941
|
-
|
942
|
-
|
943
|
-
|
944
|
-
|
945
|
-
|
946
|
-
|
947
|
-
|
948
|
-
|
949
|
-
|
950
|
-
|
892
|
+
var createPlaceholderNode = function (editor, node) {
|
893
|
+
var placeHolder;
|
894
|
+
var name = node.name;
|
895
|
+
placeHolder = new global$8('img', 1);
|
896
|
+
placeHolder.shortEnded = true;
|
897
|
+
retainAttributesAndInnerHtml(editor, node, placeHolder);
|
898
|
+
placeHolder.attr({
|
899
|
+
'width': node.attr('width') || '300',
|
900
|
+
'height': node.attr('height') || (name === 'audio' ? '30' : '150'),
|
901
|
+
'style': node.attr('style'),
|
902
|
+
'src': global$1.transparentSrc,
|
903
|
+
'data-mce-object': name,
|
904
|
+
'class': 'mce-object mce-object-' + name
|
905
|
+
});
|
906
|
+
return placeHolder;
|
907
|
+
};
|
908
|
+
var createPreviewIframeNode = function (editor, node) {
|
909
|
+
var previewWrapper;
|
910
|
+
var previewNode;
|
911
|
+
var shimNode;
|
912
|
+
var name = node.name;
|
913
|
+
previewWrapper = new global$8('span', 1);
|
914
|
+
previewWrapper.attr({
|
915
|
+
'contentEditable': 'false',
|
916
|
+
'style': node.attr('style'),
|
917
|
+
'data-mce-object': name,
|
918
|
+
'class': 'mce-preview-object mce-object-' + name
|
919
|
+
});
|
920
|
+
retainAttributesAndInnerHtml(editor, node, previewWrapper);
|
921
|
+
previewNode = new global$8(name, 1);
|
922
|
+
previewNode.attr({
|
923
|
+
src: node.attr('src'),
|
924
|
+
allowfullscreen: node.attr('allowfullscreen'),
|
925
|
+
style: node.attr('style'),
|
926
|
+
class: node.attr('class'),
|
927
|
+
width: node.attr('width'),
|
928
|
+
height: node.attr('height'),
|
929
|
+
frameborder: '0'
|
930
|
+
});
|
931
|
+
shimNode = new global$8('span', 1);
|
932
|
+
shimNode.attr('class', 'mce-shim');
|
933
|
+
previewWrapper.append(previewNode);
|
934
|
+
previewWrapper.append(shimNode);
|
935
|
+
return previewWrapper;
|
936
|
+
};
|
937
|
+
var retainAttributesAndInnerHtml = function (editor, sourceNode, targetNode) {
|
938
|
+
var attrName;
|
939
|
+
var attrValue;
|
940
|
+
var attribs;
|
941
|
+
var ai;
|
942
|
+
var innerHtml;
|
943
|
+
attribs = sourceNode.attributes;
|
944
|
+
ai = attribs.length;
|
945
|
+
while (ai--) {
|
946
|
+
attrName = attribs[ai].name;
|
947
|
+
attrValue = attribs[ai].value;
|
948
|
+
if (attrName !== 'width' && attrName !== 'height' && attrName !== 'style') {
|
949
|
+
if (attrName === 'data' || attrName === 'src') {
|
950
|
+
attrValue = editor.convertURL(attrValue, attrName);
|
951
|
+
}
|
952
|
+
targetNode.attr('data-mce-p-' + attrName, attrValue);
|
951
953
|
}
|
952
|
-
targetNode.attr('data-mce-p-' + attrName, attrValue);
|
953
954
|
}
|
954
|
-
|
955
|
-
|
956
|
-
|
957
|
-
|
958
|
-
targetNode.firstChild = null;
|
959
|
-
}
|
960
|
-
};
|
961
|
-
var isWithinEphoxEmbed = function (node) {
|
962
|
-
while (node = node.parent) {
|
963
|
-
if (node.attr('data-ephox-embed-iri')) {
|
964
|
-
return true;
|
955
|
+
innerHtml = sourceNode.firstChild && sourceNode.firstChild.value;
|
956
|
+
if (innerHtml) {
|
957
|
+
targetNode.attr('data-mce-html', escape(Sanitize.sanitize(editor, innerHtml)));
|
958
|
+
targetNode.firstChild = null;
|
965
959
|
}
|
966
|
-
}
|
967
|
-
|
968
|
-
|
969
|
-
|
970
|
-
|
971
|
-
var i = nodes.length;
|
972
|
-
var node;
|
973
|
-
var videoScript;
|
974
|
-
while (i--) {
|
975
|
-
node = nodes[i];
|
976
|
-
if (!node.parent) {
|
977
|
-
continue;
|
978
|
-
}
|
979
|
-
if (node.parent.attr('data-mce-object')) {
|
980
|
-
continue;
|
981
|
-
}
|
982
|
-
if (node.name === 'script') {
|
983
|
-
videoScript = $_545y8yh6jm0ofzjb.getVideoScriptMatch($_5hjeirh2jm0ofzj6.getScripts(editor), node.attr('src'));
|
984
|
-
if (!videoScript) {
|
985
|
-
continue;
|
986
|
-
}
|
987
|
-
}
|
988
|
-
if (videoScript) {
|
989
|
-
if (videoScript.width) {
|
990
|
-
node.attr('width', videoScript.width.toString());
|
991
|
-
}
|
992
|
-
if (videoScript.height) {
|
993
|
-
node.attr('height', videoScript.height.toString());
|
994
|
-
}
|
995
|
-
}
|
996
|
-
if (node.name === 'iframe' && $_5hjeirh2jm0ofzj6.hasLiveEmbeds(editor) && global$1.ceFalse) {
|
997
|
-
if (!isWithinEphoxEmbed(node)) {
|
998
|
-
node.replace(createPreviewIframeNode(editor, node));
|
999
|
-
}
|
1000
|
-
} else {
|
1001
|
-
if (!isWithinEphoxEmbed(node)) {
|
1002
|
-
node.replace(createPlaceholderNode(editor, node));
|
1003
|
-
}
|
960
|
+
};
|
961
|
+
var isWithinEphoxEmbed = function (node) {
|
962
|
+
while (node = node.parent) {
|
963
|
+
if (node.attr('data-ephox-embed-iri')) {
|
964
|
+
return true;
|
1004
965
|
}
|
1005
966
|
}
|
967
|
+
return false;
|
1006
968
|
};
|
1007
|
-
|
1008
|
-
|
1009
|
-
createPreviewIframeNode: createPreviewIframeNode,
|
1010
|
-
createPlaceholderNode: createPlaceholderNode,
|
1011
|
-
placeHolderConverter: placeHolderConverter
|
1012
|
-
};
|
1013
|
-
|
1014
|
-
var setup = function (editor) {
|
1015
|
-
editor.on('preInit', function () {
|
1016
|
-
var specialElements = editor.schema.getSpecialElements();
|
1017
|
-
global$2.each('video audio iframe object'.split(' '), function (name) {
|
1018
|
-
specialElements[name] = new RegExp('</' + name + '[^>]*>', 'gi');
|
1019
|
-
});
|
1020
|
-
var boolAttrs = editor.schema.getBoolAttrs();
|
1021
|
-
global$2.each('webkitallowfullscreen mozallowfullscreen allowfullscreen'.split(' '), function (name) {
|
1022
|
-
boolAttrs[name] = {};
|
1023
|
-
});
|
1024
|
-
editor.parser.addNodeFilter('iframe,video,audio,object,embed,script', $_11usglhkjm0ofzk7.placeHolderConverter(editor));
|
1025
|
-
editor.serializer.addAttributeFilter('data-mce-object', function (nodes, name) {
|
969
|
+
var placeHolderConverter = function (editor) {
|
970
|
+
return function (nodes) {
|
1026
971
|
var i = nodes.length;
|
1027
972
|
var node;
|
1028
|
-
var
|
1029
|
-
var ai;
|
1030
|
-
var attribs;
|
1031
|
-
var innerHtml;
|
1032
|
-
var innerNode;
|
1033
|
-
var realElmName;
|
1034
|
-
var className;
|
973
|
+
var videoScript;
|
1035
974
|
while (i--) {
|
1036
975
|
node = nodes[i];
|
1037
976
|
if (!node.parent) {
|
1038
977
|
continue;
|
1039
978
|
}
|
1040
|
-
|
1041
|
-
|
1042
|
-
if (realElmName !== 'audio' && realElmName !== 'script') {
|
1043
|
-
className = node.attr('class');
|
1044
|
-
if (className && className.indexOf('mce-preview-object') !== -1) {
|
1045
|
-
realElm.attr({
|
1046
|
-
width: node.firstChild.attr('width'),
|
1047
|
-
height: node.firstChild.attr('height')
|
1048
|
-
});
|
1049
|
-
} else {
|
1050
|
-
realElm.attr({
|
1051
|
-
width: node.attr('width'),
|
1052
|
-
height: node.attr('height')
|
1053
|
-
});
|
1054
|
-
}
|
979
|
+
if (node.parent.attr('data-mce-object')) {
|
980
|
+
continue;
|
1055
981
|
}
|
1056
|
-
|
1057
|
-
|
1058
|
-
|
1059
|
-
|
1060
|
-
var attrName = attribs[ai].name;
|
1061
|
-
if (attrName.indexOf('data-mce-p-') === 0) {
|
1062
|
-
realElm.attr(attrName.substr(11), attribs[ai].value);
|
982
|
+
if (node.name === 'script') {
|
983
|
+
videoScript = VideoScript.getVideoScriptMatch(Settings.getScripts(editor), node.attr('src'));
|
984
|
+
if (!videoScript) {
|
985
|
+
continue;
|
1063
986
|
}
|
1064
987
|
}
|
1065
|
-
if (
|
1066
|
-
|
988
|
+
if (videoScript) {
|
989
|
+
if (videoScript.width) {
|
990
|
+
node.attr('width', videoScript.width.toString());
|
991
|
+
}
|
992
|
+
if (videoScript.height) {
|
993
|
+
node.attr('height', videoScript.height.toString());
|
994
|
+
}
|
1067
995
|
}
|
1068
|
-
|
1069
|
-
|
1070
|
-
|
1071
|
-
|
1072
|
-
|
1073
|
-
|
996
|
+
if (node.name === 'iframe' && Settings.hasLiveEmbeds(editor) && global$1.ceFalse) {
|
997
|
+
if (!isWithinEphoxEmbed(node)) {
|
998
|
+
node.replace(createPreviewIframeNode(editor, node));
|
999
|
+
}
|
1000
|
+
} else {
|
1001
|
+
if (!isWithinEphoxEmbed(node)) {
|
1002
|
+
node.replace(createPlaceholderNode(editor, node));
|
1003
|
+
}
|
1074
1004
|
}
|
1075
|
-
node.replace(realElm);
|
1076
1005
|
}
|
1006
|
+
};
|
1007
|
+
};
|
1008
|
+
var Nodes = {
|
1009
|
+
createPreviewIframeNode: createPreviewIframeNode,
|
1010
|
+
createPlaceholderNode: createPlaceholderNode,
|
1011
|
+
placeHolderConverter: placeHolderConverter
|
1012
|
+
};
|
1013
|
+
|
1014
|
+
var setup = function (editor) {
|
1015
|
+
editor.on('preInit', function () {
|
1016
|
+
var specialElements = editor.schema.getSpecialElements();
|
1017
|
+
global$2.each('video audio iframe object'.split(' '), function (name) {
|
1018
|
+
specialElements[name] = new RegExp('</' + name + '[^>]*>', 'gi');
|
1019
|
+
});
|
1020
|
+
var boolAttrs = editor.schema.getBoolAttrs();
|
1021
|
+
global$2.each('webkitallowfullscreen mozallowfullscreen allowfullscreen'.split(' '), function (name) {
|
1022
|
+
boolAttrs[name] = {};
|
1023
|
+
});
|
1024
|
+
editor.parser.addNodeFilter('iframe,video,audio,object,embed,script', Nodes.placeHolderConverter(editor));
|
1025
|
+
editor.serializer.addAttributeFilter('data-mce-object', function (nodes, name) {
|
1026
|
+
var i = nodes.length;
|
1027
|
+
var node;
|
1028
|
+
var realElm;
|
1029
|
+
var ai;
|
1030
|
+
var attribs;
|
1031
|
+
var innerHtml;
|
1032
|
+
var innerNode;
|
1033
|
+
var realElmName;
|
1034
|
+
var className;
|
1035
|
+
while (i--) {
|
1036
|
+
node = nodes[i];
|
1037
|
+
if (!node.parent) {
|
1038
|
+
continue;
|
1039
|
+
}
|
1040
|
+
realElmName = node.attr(name);
|
1041
|
+
realElm = new global$8(realElmName, 1);
|
1042
|
+
if (realElmName !== 'audio' && realElmName !== 'script') {
|
1043
|
+
className = node.attr('class');
|
1044
|
+
if (className && className.indexOf('mce-preview-object') !== -1) {
|
1045
|
+
realElm.attr({
|
1046
|
+
width: node.firstChild.attr('width'),
|
1047
|
+
height: node.firstChild.attr('height')
|
1048
|
+
});
|
1049
|
+
} else {
|
1050
|
+
realElm.attr({
|
1051
|
+
width: node.attr('width'),
|
1052
|
+
height: node.attr('height')
|
1053
|
+
});
|
1054
|
+
}
|
1055
|
+
}
|
1056
|
+
realElm.attr({ style: node.attr('style') });
|
1057
|
+
attribs = node.attributes;
|
1058
|
+
ai = attribs.length;
|
1059
|
+
while (ai--) {
|
1060
|
+
var attrName = attribs[ai].name;
|
1061
|
+
if (attrName.indexOf('data-mce-p-') === 0) {
|
1062
|
+
realElm.attr(attrName.substr(11), attribs[ai].value);
|
1063
|
+
}
|
1064
|
+
}
|
1065
|
+
if (realElmName === 'script') {
|
1066
|
+
realElm.attr('type', 'text/javascript');
|
1067
|
+
}
|
1068
|
+
innerHtml = node.attr('data-mce-html');
|
1069
|
+
if (innerHtml) {
|
1070
|
+
innerNode = new global$8('#text', 3);
|
1071
|
+
innerNode.raw = true;
|
1072
|
+
innerNode.value = Sanitize.sanitize(editor, unescape(innerHtml));
|
1073
|
+
realElm.append(innerNode);
|
1074
|
+
}
|
1075
|
+
node.replace(realElm);
|
1076
|
+
}
|
1077
|
+
});
|
1077
1078
|
});
|
1078
|
-
|
1079
|
-
|
1080
|
-
|
1081
|
-
|
1082
|
-
|
1083
|
-
|
1084
|
-
}
|
1079
|
+
editor.on('setContent', function () {
|
1080
|
+
editor.$('span.mce-preview-object').each(function (index, elm) {
|
1081
|
+
var $elm = editor.$(elm);
|
1082
|
+
if ($elm.find('span.mce-shim', elm).length === 0) {
|
1083
|
+
$elm.append('<span class="mce-shim"></span>');
|
1084
|
+
}
|
1085
|
+
});
|
1085
1086
|
});
|
1086
|
-
}
|
1087
|
-
|
1088
|
-
var $_fbo9b6hijm0ofzjy = { setup: setup };
|
1087
|
+
};
|
1088
|
+
var FilterContent = { setup: setup };
|
1089
1089
|
|
1090
|
-
|
1091
|
-
|
1092
|
-
|
1093
|
-
|
1094
|
-
|
1095
|
-
|
1096
|
-
|
1097
|
-
|
1098
|
-
|
1090
|
+
var setup$1 = function (editor) {
|
1091
|
+
editor.on('ResolveName', function (e) {
|
1092
|
+
var name;
|
1093
|
+
if (e.target.nodeType === 1 && (name = e.target.getAttribute('data-mce-object'))) {
|
1094
|
+
e.name = name;
|
1095
|
+
}
|
1096
|
+
});
|
1097
|
+
};
|
1098
|
+
var ResolveName = { setup: setup$1 };
|
1099
1099
|
|
1100
|
-
|
1101
|
-
|
1102
|
-
|
1103
|
-
|
1104
|
-
|
1105
|
-
|
1100
|
+
var setup$2 = function (editor) {
|
1101
|
+
editor.on('click keyup', function () {
|
1102
|
+
var selectedNode = editor.selection.getNode();
|
1103
|
+
if (selectedNode && editor.dom.hasClass(selectedNode, 'mce-preview-object')) {
|
1104
|
+
if (editor.dom.getAttrib(selectedNode, 'data-mce-selected')) {
|
1105
|
+
selectedNode.setAttribute('data-mce-selected', '2');
|
1106
|
+
}
|
1106
1107
|
}
|
1107
|
-
}
|
1108
|
-
|
1109
|
-
|
1110
|
-
|
1111
|
-
|
1112
|
-
e.preventDefault();
|
1113
|
-
}
|
1114
|
-
});
|
1115
|
-
editor.on('objectResized', function (e) {
|
1116
|
-
var target = e.target;
|
1117
|
-
var html;
|
1118
|
-
if (target.getAttribute('data-mce-object')) {
|
1119
|
-
html = target.getAttribute('data-mce-html');
|
1120
|
-
if (html) {
|
1121
|
-
html = unescape(html);
|
1122
|
-
target.setAttribute('data-mce-html', escape($_cok7l6hcjm0ofzjm.updateHtml(html, {
|
1123
|
-
width: e.width,
|
1124
|
-
height: e.height
|
1125
|
-
})));
|
1108
|
+
});
|
1109
|
+
editor.on('ObjectSelected', function (e) {
|
1110
|
+
var objectType = e.target.getAttribute('data-mce-object');
|
1111
|
+
if (objectType === 'audio' || objectType === 'script') {
|
1112
|
+
e.preventDefault();
|
1126
1113
|
}
|
1127
|
-
}
|
1128
|
-
|
1129
|
-
|
1130
|
-
|
1114
|
+
});
|
1115
|
+
editor.on('objectResized', function (e) {
|
1116
|
+
var target = e.target;
|
1117
|
+
var html;
|
1118
|
+
if (target.getAttribute('data-mce-object')) {
|
1119
|
+
html = target.getAttribute('data-mce-html');
|
1120
|
+
if (html) {
|
1121
|
+
html = unescape(html);
|
1122
|
+
target.setAttribute('data-mce-html', escape(UpdateHtml.updateHtml(html, {
|
1123
|
+
width: e.width,
|
1124
|
+
height: e.height
|
1125
|
+
})));
|
1126
|
+
}
|
1127
|
+
}
|
1128
|
+
});
|
1129
|
+
};
|
1130
|
+
var Selection = { setup: setup$2 };
|
1131
1131
|
|
1132
|
-
|
1133
|
-
|
1134
|
-
|
1135
|
-
|
1136
|
-
|
1137
|
-
|
1138
|
-
|
1139
|
-
|
1140
|
-
|
1141
|
-
|
1142
|
-
|
1143
|
-
|
1144
|
-
|
1145
|
-
|
1146
|
-
|
1147
|
-
|
1148
|
-
|
1149
|
-
|
1150
|
-
|
1132
|
+
var register$1 = function (editor) {
|
1133
|
+
editor.addButton('media', {
|
1134
|
+
tooltip: 'Insert/edit media',
|
1135
|
+
cmd: 'mceMedia',
|
1136
|
+
stateSelector: [
|
1137
|
+
'img[data-mce-object]',
|
1138
|
+
'span[data-mce-object]',
|
1139
|
+
'div[data-ephox-embed-iri]'
|
1140
|
+
]
|
1141
|
+
});
|
1142
|
+
editor.addMenuItem('media', {
|
1143
|
+
icon: 'media',
|
1144
|
+
text: 'Media',
|
1145
|
+
cmd: 'mceMedia',
|
1146
|
+
context: 'insert',
|
1147
|
+
prependToContext: true
|
1148
|
+
});
|
1149
|
+
};
|
1150
|
+
var Buttons = { register: register$1 };
|
1151
1151
|
|
1152
|
-
|
1153
|
-
|
1154
|
-
|
1155
|
-
|
1156
|
-
|
1157
|
-
|
1158
|
-
|
1159
|
-
|
1160
|
-
|
1161
|
-
|
1152
|
+
global.add('media', function (editor) {
|
1153
|
+
Commands.register(editor);
|
1154
|
+
Buttons.register(editor);
|
1155
|
+
ResolveName.setup(editor);
|
1156
|
+
FilterContent.setup(editor);
|
1157
|
+
Selection.setup(editor);
|
1158
|
+
return Api.get(editor);
|
1159
|
+
});
|
1160
|
+
function Plugin () {
|
1161
|
+
}
|
1162
1162
|
|
1163
|
-
|
1163
|
+
return Plugin;
|
1164
1164
|
|
1165
1165
|
}());
|
1166
1166
|
})();
|