bedrock_sass 0.1.9 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -5
- data/assets/_vendor/ace/ace.js +21635 -0
- data/assets/_vendor/ace/ext-beautify.js +318 -0
- data/assets/_vendor/ace/ext-elastic_tabstops_lite.js +277 -0
- data/assets/_vendor/ace/ext-emmet.js +1226 -0
- data/assets/_vendor/ace/ext-error_marker.js +10 -0
- data/assets/_vendor/ace/ext-keybinding_menu.js +189 -0
- data/assets/_vendor/ace/ext-language_tools.js +1997 -0
- data/assets/_vendor/ace/ext-linking.js +65 -0
- data/assets/_vendor/ace/ext-modelist.js +228 -0
- data/assets/_vendor/ace/ext-options.js +750 -0
- data/assets/_vendor/ace/ext-rtl.js +110 -0
- data/assets/_vendor/ace/ext-searchbox.js +512 -0
- data/assets/_vendor/ace/ext-settings_menu.js +771 -0
- data/assets/_vendor/ace/ext-spellcheck.js +75 -0
- data/assets/_vendor/ace/ext-split.js +208 -0
- data/assets/_vendor/ace/ext-static_highlight.js +226 -0
- data/assets/_vendor/ace/ext-statusbar.js +57 -0
- data/assets/_vendor/ace/ext-textarea.js +567 -0
- data/assets/_vendor/ace/ext-themelist.js +67 -0
- data/assets/_vendor/ace/ext-whitespace.js +210 -0
- data/assets/_vendor/ace/keybinding-emacs.js +1165 -0
- data/assets/_vendor/ace/keybinding-vim.js +5673 -0
- data/assets/_vendor/ace/mode-abap.js +222 -0
- data/assets/_vendor/ace/mode-abc.js +267 -0
- data/assets/_vendor/ace/mode-actionscript.js +274 -0
- data/assets/_vendor/ace/mode-ada.js +138 -0
- data/assets/_vendor/ace/mode-apache_conf.js +363 -0
- data/assets/_vendor/ace/mode-applescript.js +279 -0
- data/assets/_vendor/ace/mode-asciidoc.js +349 -0
- data/assets/_vendor/ace/mode-asl.js +422 -0
- data/assets/_vendor/ace/mode-assembly_x86.js +193 -0
- data/assets/_vendor/ace/mode-autohotkey.js +243 -0
- data/assets/_vendor/ace/mode-batchfile.js +230 -0
- data/assets/_vendor/ace/mode-bro.js +334 -0
- data/assets/_vendor/ace/mode-c9search.js +294 -0
- data/assets/_vendor/ace/mode-c_cpp.js +502 -0
- data/assets/_vendor/ace/mode-cirru.js +211 -0
- data/assets/_vendor/ace/mode-clojure.js +314 -0
- data/assets/_vendor/ace/mode-cobol.js +102 -0
- data/assets/_vendor/ace/mode-coffee.js +400 -0
- data/assets/_vendor/ace/mode-coldfusion.js +2596 -0
- data/assets/_vendor/ace/mode-csharp.js +502 -0
- data/assets/_vendor/ace/mode-csound_document.js +3749 -0
- data/assets/_vendor/ace/mode-csound_orchestra.js +2687 -0
- data/assets/_vendor/ace/mode-csound_score.js +454 -0
- data/assets/_vendor/ace/mode-csp.js +60 -0
- data/assets/_vendor/ace/mode-css.js +723 -0
- data/assets/_vendor/ace/mode-curly.js +2564 -0
- data/assets/_vendor/ace/mode-d.js +520 -0
- data/assets/_vendor/ace/mode-dart.js +703 -0
- data/assets/_vendor/ace/mode-diff.js +146 -0
- data/assets/_vendor/ace/mode-django.js +2594 -0
- data/assets/_vendor/ace/mode-dockerfile.js +498 -0
- data/assets/_vendor/ace/mode-dot.js +418 -0
- data/assets/_vendor/ace/mode-drools.js +496 -0
- data/assets/_vendor/ace/mode-edifact.js +165 -0
- data/assets/_vendor/ace/mode-eiffel.js +136 -0
- data/assets/_vendor/ace/mode-ejs.js +3026 -0
- data/assets/_vendor/ace/mode-elixir.js +501 -0
- data/assets/_vendor/ace/mode-elm.js +307 -0
- data/assets/_vendor/ace/mode-erlang.js +1009 -0
- data/assets/_vendor/ace/mode-forth.js +297 -0
- data/assets/_vendor/ace/mode-fortran.js +431 -0
- data/assets/_vendor/ace/mode-fsharp.js +314 -0
- data/assets/_vendor/ace/mode-ftl.js +1192 -0
- data/assets/_vendor/ace/mode-gcode.js +94 -0
- data/assets/_vendor/ace/mode-gherkin.js +172 -0
- data/assets/_vendor/ace/mode-gitignore.js +60 -0
- data/assets/_vendor/ace/mode-glsl.js +579 -0
- data/assets/_vendor/ace/mode-gobstones.js +929 -0
- data/assets/_vendor/ace/mode-golang.js +414 -0
- data/assets/_vendor/ace/mode-graphqlschema.js +214 -0
- data/assets/_vendor/ace/mode-groovy.js +986 -0
- data/assets/_vendor/ace/mode-haml.js +1555 -0
- data/assets/_vendor/ace/mode-handlebars.js +2622 -0
- data/assets/_vendor/ace/mode-haskell.js +379 -0
- data/assets/_vendor/ace/mode-haskell_cabal.js +142 -0
- data/assets/_vendor/ace/mode-haxe.js +386 -0
- data/assets/_vendor/ace/mode-hjson.js +353 -0
- data/assets/_vendor/ace/mode-html.js +2509 -0
- data/assets/_vendor/ace/mode-html_elixir.js +3087 -0
- data/assets/_vendor/ace/mode-html_ruby.js +3043 -0
- data/assets/_vendor/ace/mode-ini.js +163 -0
- data/assets/_vendor/ace/mode-io.js +253 -0
- data/assets/_vendor/ace/mode-jack.js +347 -0
- data/assets/_vendor/ace/mode-jade.js +2126 -0
- data/assets/_vendor/ace/mode-java.js +975 -0
- data/assets/_vendor/ace/mode-javascript.js +797 -0
- data/assets/_vendor/ace/mode-json.js +327 -0
- data/assets/_vendor/ace/mode-jsoniq.js +4940 -0
- data/assets/_vendor/ace/mode-jsp.js +1430 -0
- data/assets/_vendor/ace/mode-jssm.js +325 -0
- data/assets/_vendor/ace/mode-jsx.js +412 -0
- data/assets/_vendor/ace/mode-julia.js +303 -0
- data/assets/_vendor/ace/mode-kotlin.js +795 -0
- data/assets/_vendor/ace/mode-latex.js +297 -0
- data/assets/_vendor/ace/mode-less.js +841 -0
- data/assets/_vendor/ace/mode-liquid.js +1193 -0
- data/assets/_vendor/ace/mode-lisp.js +112 -0
- data/assets/_vendor/ace/mode-livescript.js +280 -0
- data/assets/_vendor/ace/mode-logiql.js +317 -0
- data/assets/_vendor/ace/mode-lsl.js +343 -0
- data/assets/_vendor/ace/mode-lua.js +432 -0
- data/assets/_vendor/ace/mode-luapage.js +3007 -0
- data/assets/_vendor/ace/mode-lucene.js +87 -0
- data/assets/_vendor/ace/mode-makefile.js +410 -0
- data/assets/_vendor/ace/mode-markdown.js +3189 -0
- data/assets/_vendor/ace/mode-mask.js +1802 -0
- data/assets/_vendor/ace/mode-matlab.js +264 -0
- data/assets/_vendor/ace/mode-maze.js +291 -0
- data/assets/_vendor/ace/mode-mel.js +263 -0
- data/assets/_vendor/ace/mode-mixal.js +123 -0
- data/assets/_vendor/ace/mode-mushcode.js +681 -0
- data/assets/_vendor/ace/mode-mysql.js +168 -0
- data/assets/_vendor/ace/mode-nix.js +646 -0
- data/assets/_vendor/ace/mode-nsis.js +312 -0
- data/assets/_vendor/ace/mode-objectivec.js +739 -0
- data/assets/_vendor/ace/mode-ocaml.js +422 -0
- data/assets/_vendor/ace/mode-pascal.js +205 -0
- data/assets/_vendor/ace/mode-perl.js +380 -0
- data/assets/_vendor/ace/mode-pgsql.js +1508 -0
- data/assets/_vendor/ace/mode-php.js +13088 -0
- data/assets/_vendor/ace/mode-php_laravel_blade.js +13289 -0
- data/assets/_vendor/ace/mode-pig.js +310 -0
- data/assets/_vendor/ace/mode-plain_text.js +33 -0
- data/assets/_vendor/ace/mode-powershell.js +418 -0
- data/assets/_vendor/ace/mode-praat.js +478 -0
- data/assets/_vendor/ace/mode-prolog.js +371 -0
- data/assets/_vendor/ace/mode-properties.js +81 -0
- data/assets/_vendor/ace/mode-protobuf.js +592 -0
- data/assets/_vendor/ace/mode-puppet.js +370 -0
- data/assets/_vendor/ace/mode-python.js +273 -0
- data/assets/_vendor/ace/mode-r.js +310 -0
- data/assets/_vendor/ace/mode-razor.js +2869 -0
- data/assets/_vendor/ace/mode-rdoc.js +243 -0
- data/assets/_vendor/ace/mode-red.js +450 -0
- data/assets/_vendor/ace/mode-redshift.js +361 -0
- data/assets/_vendor/ace/mode-rhtml.js +2806 -0
- data/assets/_vendor/ace/mode-rst.js +257 -0
- data/assets/_vendor/ace/mode-ruby.js +497 -0
- data/assets/_vendor/ace/mode-rust.js +279 -0
- data/assets/_vendor/ace/mode-sass.js +441 -0
- data/assets/_vendor/ace/mode-scad.js +414 -0
- data/assets/_vendor/ace/mode-scala.js +982 -0
- data/assets/_vendor/ace/mode-scheme.js +232 -0
- data/assets/_vendor/ace/mode-scss.js +606 -0
- data/assets/_vendor/ace/mode-sh.js +447 -0
- data/assets/_vendor/ace/mode-sjs.js +1014 -0
- data/assets/_vendor/ace/mode-slim.js +4736 -0
- data/assets/_vendor/ace/mode-smarty.js +2635 -0
- data/assets/_vendor/ace/mode-snippets.js +207 -0
- data/assets/_vendor/ace/mode-soy_template.js +2847 -0
- data/assets/_vendor/ace/mode-space.js +168 -0
- data/assets/_vendor/ace/mode-sparql.js +320 -0
- data/assets/_vendor/ace/mode-sql.js +111 -0
- data/assets/_vendor/ace/mode-sqlserver.js +444 -0
- data/assets/_vendor/ace/mode-stylus.js +471 -0
- data/assets/_vendor/ace/mode-svg.js +1581 -0
- data/assets/_vendor/ace/mode-swift.js +390 -0
- data/assets/_vendor/ace/mode-tcl.js +383 -0
- data/assets/_vendor/ace/mode-terraform.js +398 -0
- data/assets/_vendor/ace/mode-tex.js +159 -0
- data/assets/_vendor/ace/mode-text.js +10 -0
- data/assets/_vendor/ace/mode-textile.js +150 -0
- data/assets/_vendor/ace/mode-toml.js +154 -0
- data/assets/_vendor/ace/mode-tsx.js +887 -0
- data/assets/_vendor/ace/mode-turtle.js +296 -0
- data/assets/_vendor/ace/mode-twig.js +2693 -0
- data/assets/_vendor/ace/mode-typescript.js +868 -0
- data/assets/_vendor/ace/mode-vala.js +676 -0
- data/assets/_vendor/ace/mode-vbscript.js +207 -0
- data/assets/_vendor/ace/mode-velocity.js +2790 -0
- data/assets/_vendor/ace/mode-verilog.js +119 -0
- data/assets/_vendor/ace/mode-vhdl.js +118 -0
- data/assets/_vendor/ace/mode-wollok.js +911 -0
- data/assets/_vendor/ace/mode-xml.js +677 -0
- data/assets/_vendor/ace/mode-xquery.js +4922 -0
- data/assets/_vendor/ace/mode-yaml.js +300 -0
- data/assets/_vendor/ace/snippets/abap.js +15 -0
- data/assets/_vendor/ace/snippets/abc.js +46 -0
- data/assets/_vendor/ace/snippets/actionscript.js +172 -0
- data/assets/_vendor/ace/snippets/ada.js +15 -0
- data/assets/_vendor/ace/snippets/apache_conf.js +15 -0
- data/assets/_vendor/ace/snippets/applescript.js +15 -0
- data/assets/_vendor/ace/snippets/asciidoc.js +15 -0
- data/assets/_vendor/ace/snippets/asl.js +14 -0
- data/assets/_vendor/ace/snippets/assembly_x86.js +15 -0
- data/assets/_vendor/ace/snippets/autohotkey.js +15 -0
- data/assets/_vendor/ace/snippets/batchfile.js +15 -0
- data/assets/_vendor/ace/snippets/bro.js +15 -0
- data/assets/_vendor/ace/snippets/c9search.js +15 -0
- data/assets/_vendor/ace/snippets/c_cpp.js +146 -0
- data/assets/_vendor/ace/snippets/cirru.js +15 -0
- data/assets/_vendor/ace/snippets/clojure.js +105 -0
- data/assets/_vendor/ace/snippets/cobol.js +15 -0
- data/assets/_vendor/ace/snippets/coffee.js +110 -0
- data/assets/_vendor/ace/snippets/coldfusion.js +15 -0
- data/assets/_vendor/ace/snippets/csharp.js +15 -0
- data/assets/_vendor/ace/snippets/csound_document.js +25 -0
- data/assets/_vendor/ace/snippets/csound_orchestra.js +62 -0
- data/assets/_vendor/ace/snippets/csound_score.js +15 -0
- data/assets/_vendor/ace/snippets/csp.js +15 -0
- data/assets/_vendor/ace/snippets/css.js +982 -0
- data/assets/_vendor/ace/snippets/curly.js +15 -0
- data/assets/_vendor/ace/snippets/d.js +15 -0
- data/assets/_vendor/ace/snippets/dart.js +98 -0
- data/assets/_vendor/ace/snippets/diff.js +26 -0
- data/assets/_vendor/ace/snippets/django.js +123 -0
- data/assets/_vendor/ace/snippets/dockerfile.js +15 -0
- data/assets/_vendor/ace/snippets/dot.js +15 -0
- data/assets/_vendor/ace/snippets/drools.js +34 -0
- data/assets/_vendor/ace/snippets/edifact.js +255 -0
- data/assets/_vendor/ace/snippets/eiffel.js +15 -0
- data/assets/_vendor/ace/snippets/ejs.js +15 -0
- data/assets/_vendor/ace/snippets/elixir.js +15 -0
- data/assets/_vendor/ace/snippets/elm.js +15 -0
- data/assets/_vendor/ace/snippets/erlang.js +175 -0
- data/assets/_vendor/ace/snippets/forth.js +15 -0
- data/assets/_vendor/ace/snippets/fortran.js +15 -0
- data/assets/_vendor/ace/snippets/fsharp.js +15 -0
- data/assets/_vendor/ace/snippets/ftl.js +15 -0
- data/assets/_vendor/ace/snippets/gcode.js +15 -0
- data/assets/_vendor/ace/snippets/gherkin.js +15 -0
- data/assets/_vendor/ace/snippets/gitignore.js +15 -0
- data/assets/_vendor/ace/snippets/glsl.js +15 -0
- data/assets/_vendor/ace/snippets/gobstones.js +49 -0
- data/assets/_vendor/ace/snippets/golang.js +15 -0
- data/assets/_vendor/ace/snippets/graphqlschema.js +47 -0
- data/assets/_vendor/ace/snippets/groovy.js +15 -0
- data/assets/_vendor/ace/snippets/haml.js +35 -0
- data/assets/_vendor/ace/snippets/handlebars.js +15 -0
- data/assets/_vendor/ace/snippets/haskell.js +97 -0
- data/assets/_vendor/ace/snippets/haskell_cabal.js +15 -0
- data/assets/_vendor/ace/snippets/haxe.js +15 -0
- data/assets/_vendor/ace/snippets/hjson.js +15 -0
- data/assets/_vendor/ace/snippets/html.js +870 -0
- data/assets/_vendor/ace/snippets/html_elixir.js +15 -0
- data/assets/_vendor/ace/snippets/html_ruby.js +15 -0
- data/assets/_vendor/ace/snippets/ini.js +15 -0
- data/assets/_vendor/ace/snippets/io.js +77 -0
- data/assets/_vendor/ace/snippets/jack.js +15 -0
- data/assets/_vendor/ace/snippets/jade.js +15 -0
- data/assets/_vendor/ace/snippets/java.js +255 -0
- data/assets/_vendor/ace/snippets/javascript.js +210 -0
- data/assets/_vendor/ace/snippets/json.js +15 -0
- data/assets/_vendor/ace/snippets/jsoniq.js +76 -0
- data/assets/_vendor/ace/snippets/jsp.js +114 -0
- data/assets/_vendor/ace/snippets/jssm.js +15 -0
- data/assets/_vendor/ace/snippets/jsx.js +15 -0
- data/assets/_vendor/ace/snippets/julia.js +15 -0
- data/assets/_vendor/ace/snippets/kotlin.js +15 -0
- data/assets/_vendor/ace/snippets/latex.js +15 -0
- data/assets/_vendor/ace/snippets/less.js +15 -0
- data/assets/_vendor/ace/snippets/liquid.js +15 -0
- data/assets/_vendor/ace/snippets/lisp.js +15 -0
- data/assets/_vendor/ace/snippets/livescript.js +15 -0
- data/assets/_vendor/ace/snippets/logiql.js +15 -0
- data/assets/_vendor/ace/snippets/lsl.js +1247 -0
- data/assets/_vendor/ace/snippets/lua.js +36 -0
- data/assets/_vendor/ace/snippets/luapage.js +15 -0
- data/assets/_vendor/ace/snippets/lucene.js +15 -0
- data/assets/_vendor/ace/snippets/makefile.js +19 -0
- data/assets/_vendor/ace/snippets/markdown.js +103 -0
- data/assets/_vendor/ace/snippets/mask.js +15 -0
- data/assets/_vendor/ace/snippets/matlab.js +15 -0
- data/assets/_vendor/ace/snippets/maze.js +24 -0
- data/assets/_vendor/ace/snippets/mel.js +15 -0
- data/assets/_vendor/ace/snippets/mixal.js +15 -0
- data/assets/_vendor/ace/snippets/mushcode.js +15 -0
- data/assets/_vendor/ace/snippets/mysql.js +15 -0
- data/assets/_vendor/ace/snippets/nix.js +15 -0
- data/assets/_vendor/ace/snippets/nsis.js +15 -0
- data/assets/_vendor/ace/snippets/objectivec.js +15 -0
- data/assets/_vendor/ace/snippets/ocaml.js +15 -0
- data/assets/_vendor/ace/snippets/pascal.js +15 -0
- data/assets/_vendor/ace/snippets/perl.js +362 -0
- data/assets/_vendor/ace/snippets/pgsql.js +15 -0
- data/assets/_vendor/ace/snippets/php.js +398 -0
- data/assets/_vendor/ace/snippets/php_laravel_blade.js +15 -0
- data/assets/_vendor/ace/snippets/pig.js +15 -0
- data/assets/_vendor/ace/snippets/plain_text.js +15 -0
- data/assets/_vendor/ace/snippets/powershell.js +15 -0
- data/assets/_vendor/ace/snippets/praat.js +15 -0
- data/assets/_vendor/ace/snippets/prolog.js +15 -0
- data/assets/_vendor/ace/snippets/properties.js +15 -0
- data/assets/_vendor/ace/snippets/protobuf.js +15 -0
- data/assets/_vendor/ace/snippets/puppet.js +15 -0
- data/assets/_vendor/ace/snippets/python.js +173 -0
- data/assets/_vendor/ace/snippets/r.js +136 -0
- data/assets/_vendor/ace/snippets/razor.js +18 -0
- data/assets/_vendor/ace/snippets/rdoc.js +15 -0
- data/assets/_vendor/ace/snippets/red.js +15 -0
- data/assets/_vendor/ace/snippets/redshift.js +15 -0
- data/assets/_vendor/ace/snippets/rhtml.js +15 -0
- data/assets/_vendor/ace/snippets/rst.js +37 -0
- data/assets/_vendor/ace/snippets/ruby.js +943 -0
- data/assets/_vendor/ace/snippets/rust.js +15 -0
- data/assets/_vendor/ace/snippets/sass.js +15 -0
- data/assets/_vendor/ace/snippets/scad.js +15 -0
- data/assets/_vendor/ace/snippets/scala.js +15 -0
- data/assets/_vendor/ace/snippets/scheme.js +15 -0
- data/assets/_vendor/ace/snippets/scss.js +15 -0
- data/assets/_vendor/ace/snippets/sh.js +98 -0
- data/assets/_vendor/ace/snippets/sjs.js +15 -0
- data/assets/_vendor/ace/snippets/slim.js +15 -0
- data/assets/_vendor/ace/snippets/smarty.js +15 -0
- data/assets/_vendor/ace/snippets/snippets.js +24 -0
- data/assets/_vendor/ace/snippets/soy_template.js +15 -0
- data/assets/_vendor/ace/snippets/space.js +15 -0
- data/assets/_vendor/ace/snippets/sparql.js +15 -0
- data/assets/_vendor/ace/snippets/sql.js +41 -0
- data/assets/_vendor/ace/snippets/sqlserver.js +84 -0
- data/assets/_vendor/ace/snippets/stylus.js +15 -0
- data/assets/_vendor/ace/snippets/svg.js +15 -0
- data/assets/_vendor/ace/snippets/swift.js +15 -0
- data/assets/_vendor/ace/snippets/tcl.js +107 -0
- data/assets/_vendor/ace/snippets/terraform.js +15 -0
- data/assets/_vendor/ace/snippets/tex.js +205 -0
- data/assets/_vendor/ace/snippets/text.js +15 -0
- data/assets/_vendor/ace/snippets/textile.js +45 -0
- data/assets/_vendor/ace/snippets/toml.js +15 -0
- data/assets/_vendor/ace/snippets/tsx.js +15 -0
- data/assets/_vendor/ace/snippets/turtle.js +15 -0
- data/assets/_vendor/ace/snippets/twig.js +15 -0
- data/assets/_vendor/ace/snippets/typescript.js +15 -0
- data/assets/_vendor/ace/snippets/vala.js +201 -0
- data/assets/_vendor/ace/snippets/vbscript.js +15 -0
- data/assets/_vendor/ace/snippets/velocity.js +44 -0
- data/assets/_vendor/ace/snippets/verilog.js +15 -0
- data/assets/_vendor/ace/snippets/vhdl.js +15 -0
- data/assets/_vendor/ace/snippets/wollok.js +99 -0
- data/assets/_vendor/ace/snippets/xml.js +15 -0
- data/assets/_vendor/ace/snippets/xquery.js +76 -0
- data/assets/_vendor/ace/snippets/yaml.js +15 -0
- data/assets/_vendor/ace/theme-ambiance.js +185 -0
- data/assets/_vendor/ace/theme-chaos.js +164 -0
- data/assets/_vendor/ace/theme-chrome.js +136 -0
- data/assets/_vendor/ace/theme-clouds.js +103 -0
- data/assets/_vendor/ace/theme-clouds_midnight.js +104 -0
- data/assets/_vendor/ace/theme-cobalt.js +121 -0
- data/assets/_vendor/ace/theme-crimson_editor.js +126 -0
- data/assets/_vendor/ace/theme-dawn.js +116 -0
- data/assets/_vendor/ace/theme-dracula.js +136 -0
- data/assets/_vendor/ace/theme-dreamweaver.js +149 -0
- data/assets/_vendor/ace/theme-eclipse.js +106 -0
- data/assets/_vendor/ace/theme-github.js +110 -0
- data/assets/_vendor/ace/theme-gob.js +120 -0
- data/assets/_vendor/ace/theme-gruvbox.js +90 -0
- data/assets/_vendor/ace/theme-idle_fingers.js +104 -0
- data/assets/_vendor/ace/theme-iplastic.js +129 -0
- data/assets/_vendor/ace/theme-katzenmilch.js +129 -0
- data/assets/_vendor/ace/theme-kr_theme.js +112 -0
- data/assets/_vendor/ace/theme-kuroir.js +69 -0
- data/assets/_vendor/ace/theme-merbivore.js +103 -0
- data/assets/_vendor/ace/theme-merbivore_soft.js +104 -0
- data/assets/_vendor/ace/theme-mono_industrial.js +115 -0
- data/assets/_vendor/ace/theme-monokai.js +113 -0
- data/assets/_vendor/ace/theme-pastel_on_dark.js +116 -0
- data/assets/_vendor/ace/theme-solarized_dark.js +96 -0
- data/assets/_vendor/ace/theme-solarized_light.js +99 -0
- data/assets/_vendor/ace/theme-sqlserver.js +146 -0
- data/assets/_vendor/ace/theme-terminal.js +122 -0
- data/assets/_vendor/ace/theme-textmate.js +138 -0
- data/assets/_vendor/ace/theme-tomorrow.js +116 -0
- data/assets/_vendor/ace/theme-tomorrow_night.js +116 -0
- data/assets/_vendor/ace/theme-tomorrow_night_blue.js +114 -0
- data/assets/_vendor/ace/theme-tomorrow_night_bright.js +129 -0
- data/assets/_vendor/ace/theme-tomorrow_night_eighties.js +116 -0
- data/assets/_vendor/ace/theme-twilight.js +117 -0
- data/assets/_vendor/ace/theme-vibrant_ink.js +102 -0
- data/assets/_vendor/ace/theme-xcode.js +96 -0
- data/assets/_vendor/ace/worker-coffee.js +2165 -0
- data/assets/_vendor/ace/worker-css.js +8764 -0
- data/assets/_vendor/ace/worker-html.js +11614 -0
- data/assets/_vendor/ace/worker-javascript.js +12491 -0
- data/assets/_vendor/ace/worker-json.js +2396 -0
- data/assets/_vendor/ace/worker-lua.js +3637 -0
- data/assets/_vendor/ace/worker-php.js +4313 -0
- data/assets/_vendor/ace/worker-xml.js +3899 -0
- data/assets/_vendor/ace/worker-xquery.js +70688 -0
- data/assets/_vendor/motion-ui/_settings.scss +1 -0
- data/assets/_vendor/motion-ui/effects/_fade.scss +1 -4
- data/assets/_vendor/motion-ui/effects/_hinge.scss +4 -3
- data/assets/_vendor/motion-ui/effects/_shake.scss +1 -1
- data/assets/_vendor/motion-ui/effects/_slide.scss +4 -3
- data/assets/_vendor/motion-ui/effects/_spin.scss +4 -3
- data/assets/_vendor/motion-ui/effects/_wiggle.scss +1 -1
- data/assets/_vendor/motion-ui/effects/_zoom.scss +2 -2
- data/assets/_vendor/motion-ui/motion-ui.scss +2 -0
- data/assets/_vendor/motion-ui/transitions/_fade.scss +6 -4
- data/assets/_vendor/motion-ui/transitions/_hinge.scss +3 -2
- data/assets/_vendor/motion-ui/transitions/_slide.scss +3 -2
- data/assets/_vendor/motion-ui/transitions/_spin.scss +2 -1
- data/assets/_vendor/motion-ui/transitions/_zoom.scss +6 -4
- data/assets/_vendor/motion-ui/util/_animation.scss +1 -1
- data/assets/_vendor/motion-ui/util/_args.scss +2 -2
- data/assets/_vendor/motion-ui/util/_function.scss +94 -0
- data/assets/_vendor/motion-ui/util/_keyframe.scss +5 -5
- data/assets/_vendor/motion-ui/util/_series.scss +20 -17
- data/assets/_vendor/motion-ui/util/_string.scss +36 -0
- data/assets/_vendor/tinymce/plugins/advlist/plugin.js +136 -404
- data/assets/_vendor/tinymce/plugins/advlist/plugin.min.js +1 -1
- data/assets/_vendor/tinymce/plugins/anchor/plugin.js +103 -323
- data/assets/_vendor/tinymce/plugins/anchor/plugin.min.js +1 -1
- data/assets/_vendor/tinymce/plugins/autolink/plugin.js +153 -377
- data/assets/_vendor/tinymce/plugins/autolink/plugin.min.js +1 -1
- data/assets/_vendor/tinymce/plugins/autoresize/plugin.js +145 -427
- data/assets/_vendor/tinymce/plugins/autoresize/plugin.min.js +1 -1
- data/assets/_vendor/tinymce/plugins/autosave/plugin.js +197 -579
- data/assets/_vendor/tinymce/plugins/autosave/plugin.min.js +1 -1
- data/assets/_vendor/tinymce/plugins/bbcode/plugin.js +88 -251
- data/assets/_vendor/tinymce/plugins/bbcode/plugin.min.js +1 -1
- data/assets/_vendor/tinymce/plugins/charmap/plugin.js +1243 -818
- data/assets/_vendor/tinymce/plugins/charmap/plugin.min.js +1 -1
- data/assets/_vendor/tinymce/plugins/code/plugin.js +82 -326
- data/assets/_vendor/tinymce/plugins/code/plugin.min.js +1 -1
- data/assets/_vendor/tinymce/plugins/codesample/plugin.js +829 -1444
- data/assets/_vendor/tinymce/plugins/codesample/plugin.min.js +1 -1
- data/assets/_vendor/tinymce/plugins/colorpicker/plugin.js +111 -257
- data/assets/_vendor/tinymce/plugins/colorpicker/plugin.min.js +1 -1
- data/assets/_vendor/tinymce/plugins/contextmenu/plugin.js +141 -469
- data/assets/_vendor/tinymce/plugins/contextmenu/plugin.min.js +1 -1
- data/assets/_vendor/tinymce/plugins/directionality/plugin.js +57 -261
- data/assets/_vendor/tinymce/plugins/directionality/plugin.min.js +1 -1
- data/assets/_vendor/tinymce/plugins/emoticons/plugin.js +78 -247
- data/assets/_vendor/tinymce/plugins/emoticons/plugin.min.js +1 -1
- data/assets/_vendor/tinymce/plugins/fullpage/plugin.js +463 -906
- data/assets/_vendor/tinymce/plugins/fullpage/plugin.min.js +1 -1
- data/assets/_vendor/tinymce/plugins/fullscreen/plugin.js +149 -427
- data/assets/_vendor/tinymce/plugins/fullscreen/plugin.min.js +1 -1
- data/assets/_vendor/tinymce/plugins/help/plugin.js +634 -1434
- data/assets/_vendor/tinymce/plugins/help/plugin.min.js +1 -1
- data/assets/_vendor/tinymce/plugins/hr/plugin.js +29 -185
- data/assets/_vendor/tinymce/plugins/hr/plugin.min.js +1 -1
- data/assets/_vendor/tinymce/plugins/image/plugin.js +1147 -1508
- data/assets/_vendor/tinymce/plugins/image/plugin.min.js +1 -1
- data/assets/_vendor/tinymce/plugins/imagetools/plugin.js +3319 -4079
- data/assets/_vendor/tinymce/plugins/imagetools/plugin.min.js +1 -2
- data/assets/_vendor/tinymce/plugins/importcss/plugin.js +230 -543
- data/assets/_vendor/tinymce/plugins/importcss/plugin.min.js +1 -1
- data/assets/_vendor/tinymce/plugins/insertdatetime/plugin.js +151 -460
- data/assets/_vendor/tinymce/plugins/insertdatetime/plugin.min.js +1 -1
- data/assets/_vendor/tinymce/plugins/legacyoutput/plugin.js +204 -379
- data/assets/_vendor/tinymce/plugins/legacyoutput/plugin.min.js +1 -1
- data/assets/_vendor/tinymce/plugins/link/plugin.js +644 -1162
- data/assets/_vendor/tinymce/plugins/link/plugin.min.js +1 -1
- data/assets/_vendor/tinymce/plugins/lists/plugin.js +1005 -1875
- data/assets/_vendor/tinymce/plugins/lists/plugin.min.js +1 -1
- data/assets/_vendor/tinymce/plugins/media/plugin.js +1066 -1926
- data/assets/_vendor/tinymce/plugins/media/plugin.min.js +1 -1
- data/assets/_vendor/tinymce/plugins/nonbreaking/plugin.js +70 -298
- data/assets/_vendor/tinymce/plugins/nonbreaking/plugin.min.js +1 -1
- data/assets/_vendor/tinymce/plugins/noneditable/plugin.js +96 -294
- data/assets/_vendor/tinymce/plugins/noneditable/plugin.min.js +1 -1
- data/assets/_vendor/tinymce/plugins/pagebreak/plugin.js +92 -337
- data/assets/_vendor/tinymce/plugins/pagebreak/plugin.min.js +1 -1
- data/assets/_vendor/tinymce/plugins/paste/plugin.js +1363 -2801
- data/assets/_vendor/tinymce/plugins/paste/plugin.min.js +1 -1
- data/assets/_vendor/tinymce/plugins/preview/plugin.js +106 -393
- data/assets/_vendor/tinymce/plugins/preview/plugin.min.js +1 -1
- data/assets/_vendor/tinymce/plugins/print/plugin.js +29 -185
- data/assets/_vendor/tinymce/plugins/print/plugin.min.js +1 -1
- data/assets/_vendor/tinymce/plugins/save/plugin.js +100 -350
- data/assets/_vendor/tinymce/plugins/save/plugin.min.js +1 -1
- data/assets/_vendor/tinymce/plugins/searchreplace/plugin.js +491 -865
- data/assets/_vendor/tinymce/plugins/searchreplace/plugin.min.js +1 -1
- data/assets/_vendor/tinymce/plugins/spellchecker/plugin.js +630 -1292
- data/assets/_vendor/tinymce/plugins/spellchecker/plugin.min.js +1 -1
- data/assets/_vendor/tinymce/plugins/tabfocus/plugin.js +96 -391
- data/assets/_vendor/tinymce/plugins/tabfocus/plugin.min.js +1 -1
- data/assets/_vendor/tinymce/plugins/table/plugin.js +9537 -14920
- data/assets/_vendor/tinymce/plugins/table/plugin.min.js +1 -5
- data/assets/_vendor/tinymce/plugins/template/plugin.js +309 -771
- data/assets/_vendor/tinymce/plugins/template/plugin.min.js +1 -1
- data/assets/_vendor/tinymce/plugins/textcolor/plugin.js +319 -592
- data/assets/_vendor/tinymce/plugins/textcolor/plugin.min.js +1 -1
- data/assets/_vendor/tinymce/plugins/textpattern/plugin.js +326 -674
- data/assets/_vendor/tinymce/plugins/textpattern/plugin.min.js +1 -1
- data/assets/_vendor/tinymce/plugins/toc/plugin.js +199 -530
- data/assets/_vendor/tinymce/plugins/toc/plugin.min.js +1 -1
- data/assets/_vendor/tinymce/plugins/visualblocks/plugin.js +112 -436
- data/assets/_vendor/tinymce/plugins/visualblocks/plugin.min.js +1 -1
- data/assets/_vendor/tinymce/plugins/visualchars/plugin.js +428 -1248
- data/assets/_vendor/tinymce/plugins/visualchars/plugin.min.js +1 -1
- data/assets/_vendor/tinymce/plugins/wordcount/plugin.js +307 -699
- data/assets/_vendor/tinymce/plugins/wordcount/plugin.min.js +1 -1
- data/assets/_vendor/tinymce/skins/lightgray/content.inline.min.css +1 -1
- data/assets/_vendor/tinymce/skins/lightgray/content.min.css +1 -1
- data/assets/_vendor/tinymce/skins/lightgray/fonts/tinymce.eot +0 -0
- data/assets/_vendor/tinymce/skins/lightgray/fonts/tinymce.svg +1 -1
- 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/skins/lightgray/skin.mobile.min.css +1 -1
- data/assets/_vendor/tinymce/themes/inlite/theme.js +9693 -18245
- data/assets/_vendor/tinymce/themes/inlite/theme.min.js +1 -5
- data/assets/_vendor/tinymce/themes/mobile/theme.js +12629 -22467
- data/assets/_vendor/tinymce/themes/mobile/theme.min.js +1 -8
- data/assets/_vendor/tinymce/themes/modern/theme.js +9510 -17780
- data/assets/_vendor/tinymce/themes/modern/theme.min.js +1 -5
- data/assets/_vendor/tinymce/tinymce.js +25087 -42606
- data/assets/_vendor/yoastseo/css/_icons.scss +7 -7
- data/assets/_vendor/yoastseo/css/_snippet-editor.scss +1 -1
- data/assets/bedrock/js/bedrock.js +1 -71697
- data/assets/bedrock/scss/_bedrock-components.scss +20 -0
- data/assets/bedrock/scss/_bedrock-settings.scss +12 -4
- data/assets/bedrock/scss/_foundation-settings.scss +4 -2
- data/assets/bedrock/scss/components/ace-editor.scss +21 -0
- data/assets/bedrock/scss/components/attachments-grid.scss +18 -15
- data/assets/bedrock/scss/components/date-picker.scss +146 -0
- data/assets/bedrock/scss/components/dropzone-upload.scss +7 -0
- data/assets/bedrock/scss/components/file-input.scss +7 -0
- data/assets/bedrock/scss/components/file-preview.scss +36 -0
- data/assets/bedrock/scss/components/frame-embed.scss +23 -0
- data/assets/bedrock/scss/components/global.scss +27 -0
- data/assets/bedrock/scss/components/helper-classes.scss +1 -0
- data/assets/bedrock/scss/components/icon-box.scss +38 -0
- data/assets/bedrock/scss/components/item-list.scss +66 -0
- data/assets/bedrock/scss/components/lists.scss +58 -0
- data/assets/bedrock/scss/components/off-canvas-menu.scss +27 -15
- data/assets/bedrock/scss/components/place-autocomplete.scss +90 -0
- data/assets/bedrock/scss/components/rrule-generator.scss +102 -0
- data/assets/bedrock/scss/components/rrule-reveal.scss +14 -0
- data/assets/bedrock/scss/components/select-box.scss +1 -0
- data/assets/bedrock/scss/components/seo-analysis.scss +5 -0
- data/assets/bedrock/scss/components/textarea.scss +14 -2
- data/assets/bedrock/scss/components/tiny-mce-editor.scss +5 -16
- data/lib/bedrock_sass.rb +5 -0
- data/lib/bedrock_sass/version.rb +1 -1
- data/lib/tasks/before_assets_precompile.rake +1 -0
- metadata +395 -4
- data/CODE_OF_CONDUCT.md +0 -74
@@ -1 +1 @@
|
|
1
|
-
!function(){
|
1
|
+
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),o=tinymce.util.Tools.resolve("tinymce.util.Tools"),t=function(a){a.settings.inline_styles=!1,a.on("init",function(){var e,t,n,i;e=a,t="p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img",n=o.explode(e.settings.font_size_style_values),i=e.schema,e.formatter.register({alignleft:{selector:t,attributes:{align:"left"}},aligncenter:{selector:t,attributes:{align:"center"}},alignright:{selector:t,attributes:{align:"right"}},alignjustify:{selector:t,attributes:{align:"justify"}},bold:[{inline:"b",remove:"all"},{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}}],italic:[{inline:"i",remove:"all"},{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}}],underline:[{inline:"u",remove:"all"},{inline:"span",styles:{textDecoration:"underline"},exact:!0}],strikethrough:[{inline:"strike",remove:"all"},{inline:"span",styles:{textDecoration:"line-through"},exact:!0}],fontname:{inline:"font",attributes:{face:"%value"}},fontsize:{inline:"font",attributes:{size:function(e){return o.inArray(n,e.value)+1}}},forecolor:{inline:"font",attributes:{color:"%value"}},hilitecolor:{inline:"font",styles:{backgroundColor:"%value"}}}),o.each("b,i,u,strike".split(","),function(e){i.addValidElements(e+"[*]")}),i.getElementRule("font")||i.addValidElements("font[face|size|color|style]"),o.each(t.split(","),function(e){var t=i.getElementRule(e);t&&(t.attributes.align||(t.attributes.align={},t.attributesOrder.push("align")))})})},n=function(i){i.addButton("fontsizeselect",function(){var o=[],e=i.settings.fontsizeFormats||"8pt=1 10pt=2 12pt=3 14pt=4 18pt=5 24pt=6 36pt=7";return i.$.each(e.split(" "),function(e,t){var n=t,i=t,a=t.split("=");1<a.length&&(n=a[0],i=a[1]),o.push({text:n,value:i})}),{type:"listbox",text:"Font Sizes",tooltip:"Font Sizes",values:o,fixedWidth:!0,onPostRender:function(){var t=this;i.on("NodeChange",function(){var e;(e=i.dom.getParent(i.selection.getNode(),"font"))?t.value(e.size):t.value("")})},onclick:function(e){e.control.settings.value&&i.execCommand("FontSize",!1,e.control.settings.value)}}}),i.addButton("fontselect",function(){var n=[],e=function(e){for(var t=(e=e.replace(/;$/,"").split(";")).length;t--;)e[t]=e[t].split("=");return e}(i.settings.font_formats||"Andale Mono=andale mono,monospace;Arial=arial,helvetica,sans-serif;Arial Black=arial black,sans-serif;Book Antiqua=book antiqua,palatino,serif;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,palatino,serif;Helvetica=helvetica,arial,sans-serif;Impact=impact,sans-serif;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco,monospace;Times New Roman=times new roman,times,serif;Trebuchet MS=trebuchet ms,geneva,sans-serif;Verdana=verdana,geneva,sans-serif;Webdings=webdings;Wingdings=wingdings,zapf dingbats");return i.$.each(e,function(e,t){n.push({text:{raw:t[0]},value:t[1],textStyle:-1===t[1].indexOf("dings")?"font-family:"+t[1]:""})}),{type:"listbox",text:"Font Family",tooltip:"Font Family",values:n,fixedWidth:!0,onPostRender:function(){var t=this;i.on("NodeChange",function(){var e;(e=i.dom.getParent(i.selection.getNode(),"font"))?t.value(e.face):t.value("")})},onselect:function(e){e.control.settings.value&&i.execCommand("FontName",!1,e.control.settings.value)}}})};e.add("legacyoutput",function(e){t(e),n(e)})}();
|
@@ -1,1231 +1,713 @@
|
|
1
1
|
(function () {
|
2
|
+
var link = (function () {
|
3
|
+
'use strict';
|
2
4
|
|
3
|
-
var
|
5
|
+
var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
4
6
|
|
5
|
-
|
6
|
-
// The name is probably (hopefully) unique so minification removes for releases.
|
7
|
-
var register_3795 = function (id) {
|
8
|
-
var module = dem(id);
|
9
|
-
var fragments = id.split('.');
|
10
|
-
var target = Function('return this;')();
|
11
|
-
for (var i = 0; i < fragments.length - 1; ++i) {
|
12
|
-
if (target[fragments[i]] === undefined)
|
13
|
-
target[fragments[i]] = {};
|
14
|
-
target = target[fragments[i]];
|
15
|
-
}
|
16
|
-
target[fragments[fragments.length - 1]] = module;
|
17
|
-
};
|
18
|
-
|
19
|
-
var instantiate = function (id) {
|
20
|
-
var actual = defs[id];
|
21
|
-
var dependencies = actual.deps;
|
22
|
-
var definition = actual.defn;
|
23
|
-
var len = dependencies.length;
|
24
|
-
var instances = new Array(len);
|
25
|
-
for (var i = 0; i < len; ++i)
|
26
|
-
instances[i] = dem(dependencies[i]);
|
27
|
-
var defResult = definition.apply(null, instances);
|
28
|
-
if (defResult === undefined)
|
29
|
-
throw 'module [' + id + '] returned undefined';
|
30
|
-
actual.instance = defResult;
|
31
|
-
};
|
7
|
+
var global$1 = tinymce.util.Tools.resolve('tinymce.util.VK');
|
32
8
|
|
33
|
-
var
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
9
|
+
var assumeExternalTargets = function (editorSettings) {
|
10
|
+
return typeof editorSettings.link_assume_external_targets === 'boolean' ? editorSettings.link_assume_external_targets : false;
|
11
|
+
};
|
12
|
+
var hasContextToolbar = function (editorSettings) {
|
13
|
+
return typeof editorSettings.link_context_toolbar === 'boolean' ? editorSettings.link_context_toolbar : false;
|
14
|
+
};
|
15
|
+
var getLinkList = function (editorSettings) {
|
16
|
+
return editorSettings.link_list;
|
17
|
+
};
|
18
|
+
var hasDefaultLinkTarget = function (editorSettings) {
|
19
|
+
return typeof editorSettings.default_link_target === 'string';
|
20
|
+
};
|
21
|
+
var getDefaultLinkTarget = function (editorSettings) {
|
22
|
+
return editorSettings.default_link_target;
|
23
|
+
};
|
24
|
+
var getTargetList = function (editorSettings) {
|
25
|
+
return editorSettings.target_list;
|
26
|
+
};
|
27
|
+
var setTargetList = function (editor, list) {
|
28
|
+
editor.settings.target_list = list;
|
29
|
+
};
|
30
|
+
var shouldShowTargetList = function (editorSettings) {
|
31
|
+
return getTargetList(editorSettings) !== false;
|
32
|
+
};
|
33
|
+
var getRelList = function (editorSettings) {
|
34
|
+
return editorSettings.rel_list;
|
35
|
+
};
|
36
|
+
var hasRelList = function (editorSettings) {
|
37
|
+
return getRelList(editorSettings) !== undefined;
|
38
|
+
};
|
39
|
+
var getLinkClassList = function (editorSettings) {
|
40
|
+
return editorSettings.link_class_list;
|
41
|
+
};
|
42
|
+
var hasLinkClassList = function (editorSettings) {
|
43
|
+
return getLinkClassList(editorSettings) !== undefined;
|
44
|
+
};
|
45
|
+
var shouldShowLinkTitle = function (editorSettings) {
|
46
|
+
return editorSettings.link_title !== false;
|
47
|
+
};
|
48
|
+
var allowUnsafeLinkTarget = function (editorSettings) {
|
49
|
+
return typeof editorSettings.allow_unsafe_link_target === 'boolean' ? editorSettings.allow_unsafe_link_target : false;
|
50
|
+
};
|
51
|
+
var $_4b6xsbfujm0ofzch = {
|
52
|
+
assumeExternalTargets: assumeExternalTargets,
|
53
|
+
hasContextToolbar: hasContextToolbar,
|
54
|
+
getLinkList: getLinkList,
|
55
|
+
hasDefaultLinkTarget: hasDefaultLinkTarget,
|
56
|
+
getDefaultLinkTarget: getDefaultLinkTarget,
|
57
|
+
getTargetList: getTargetList,
|
58
|
+
setTargetList: setTargetList,
|
59
|
+
shouldShowTargetList: shouldShowTargetList,
|
60
|
+
getRelList: getRelList,
|
61
|
+
hasRelList: hasRelList,
|
62
|
+
getLinkClassList: getLinkClassList,
|
63
|
+
hasLinkClassList: hasLinkClassList,
|
64
|
+
shouldShowLinkTitle: shouldShowLinkTitle,
|
65
|
+
allowUnsafeLinkTarget: allowUnsafeLinkTarget
|
44
66
|
};
|
45
|
-
};
|
46
|
-
|
47
|
-
var dem = function (id) {
|
48
|
-
var actual = defs[id];
|
49
|
-
if (actual === undefined)
|
50
|
-
throw 'module [' + id + '] was undefined';
|
51
|
-
else if (actual.instance === undefined)
|
52
|
-
instantiate(id);
|
53
|
-
return actual.instance;
|
54
|
-
};
|
55
67
|
|
56
|
-
var
|
57
|
-
var len = ids.length;
|
58
|
-
var instances = new Array(len);
|
59
|
-
for (var i = 0; i < len; ++i)
|
60
|
-
instances[i] = dem(ids[i]);
|
61
|
-
callback.apply(null, instances);
|
62
|
-
};
|
68
|
+
var global$2 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');
|
63
69
|
|
64
|
-
var
|
70
|
+
var global$3 = tinymce.util.Tools.resolve('tinymce.Env');
|
65
71
|
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
+
var appendClickRemove = function (link, evt) {
|
73
|
+
document.body.appendChild(link);
|
74
|
+
link.dispatchEvent(evt);
|
75
|
+
document.body.removeChild(link);
|
76
|
+
};
|
77
|
+
var open$$1 = function (url) {
|
78
|
+
if (!global$3.ie || global$3.ie > 10) {
|
79
|
+
var link = document.createElement('a');
|
80
|
+
link.target = '_blank';
|
81
|
+
link.href = url;
|
82
|
+
link.rel = 'noreferrer noopener';
|
83
|
+
var evt = document.createEvent('MouseEvents');
|
84
|
+
evt.initMouseEvent('click', true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
|
85
|
+
appendClickRemove(link, evt);
|
86
|
+
} else {
|
87
|
+
var win = window.open('', '_blank');
|
88
|
+
if (win) {
|
89
|
+
win.opener = null;
|
90
|
+
var doc = win.document;
|
91
|
+
doc.open();
|
92
|
+
doc.write('<meta http-equiv="refresh" content="0; url=' + global$2.DOM.encode(url) + '">');
|
93
|
+
doc.close();
|
94
|
+
}
|
72
95
|
}
|
73
|
-
}
|
74
|
-
};
|
75
|
-
|
76
|
-
var define = def;
|
77
|
-
var require = req;
|
78
|
-
var demand = dem;
|
79
|
-
// this helps with minification when using a lot of global references
|
80
|
-
var defineGlobal = function (id, ref) {
|
81
|
-
define(id, [], function () { return ref; });
|
82
|
-
};
|
83
|
-
/*jsc
|
84
|
-
["tinymce.plugins.link.Plugin","tinymce.core.PluginManager","tinymce.plugins.link.api.Commands","tinymce.plugins.link.core.Actions","tinymce.plugins.link.core.Keyboard","tinymce.plugins.link.ui.Controls","global!tinymce.util.Tools.resolve","tinymce.core.util.VK","tinymce.plugins.link.api.Settings","tinymce.plugins.link.core.OpenUrl","tinymce.plugins.link.core.Utils","tinymce.plugins.link.ui.Dialog","global!document","global!window","tinymce.core.dom.DOMUtils","tinymce.core.Env","global!RegExp","tinymce.core.util.Tools","tinymce.core.util.Delay","tinymce.core.util.XHR"]
|
85
|
-
jsc*/
|
86
|
-
defineGlobal("global!tinymce.util.Tools.resolve", tinymce.util.Tools.resolve);
|
87
|
-
/**
|
88
|
-
* ResolveGlobal.js
|
89
|
-
*
|
90
|
-
* Released under LGPL License.
|
91
|
-
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
92
|
-
*
|
93
|
-
* License: http://www.tinymce.com/license
|
94
|
-
* Contributing: http://www.tinymce.com/contributing
|
95
|
-
*/
|
96
|
-
|
97
|
-
define(
|
98
|
-
'tinymce.core.PluginManager',
|
99
|
-
[
|
100
|
-
'global!tinymce.util.Tools.resolve'
|
101
|
-
],
|
102
|
-
function (resolve) {
|
103
|
-
return resolve('tinymce.PluginManager');
|
104
|
-
}
|
105
|
-
);
|
106
|
-
|
107
|
-
/**
|
108
|
-
* ResolveGlobal.js
|
109
|
-
*
|
110
|
-
* Released under LGPL License.
|
111
|
-
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
112
|
-
*
|
113
|
-
* License: http://www.tinymce.com/license
|
114
|
-
* Contributing: http://www.tinymce.com/contributing
|
115
|
-
*/
|
116
|
-
|
117
|
-
define(
|
118
|
-
'tinymce.core.util.VK',
|
119
|
-
[
|
120
|
-
'global!tinymce.util.Tools.resolve'
|
121
|
-
],
|
122
|
-
function (resolve) {
|
123
|
-
return resolve('tinymce.util.VK');
|
124
|
-
}
|
125
|
-
);
|
126
|
-
|
127
|
-
/**
|
128
|
-
* Settings.js
|
129
|
-
*
|
130
|
-
* Released under LGPL License.
|
131
|
-
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
132
|
-
*
|
133
|
-
* License: http://www.tinymce.com/license
|
134
|
-
* Contributing: http://www.tinymce.com/contributing
|
135
|
-
*/
|
136
|
-
|
137
|
-
define(
|
138
|
-
'tinymce.plugins.link.api.Settings',
|
139
|
-
[
|
140
|
-
],
|
141
|
-
function () {
|
142
|
-
var assumeExternalTargets = function (editorSettings) {
|
143
|
-
return typeof editorSettings.link_assume_external_targets === 'boolean' ? editorSettings.link_assume_external_targets : false;
|
144
|
-
};
|
145
|
-
|
146
|
-
var hasContextToolbar = function (editorSettings) {
|
147
|
-
return typeof editorSettings.link_context_toolbar === 'boolean' ? editorSettings.link_context_toolbar : false;
|
148
|
-
};
|
149
|
-
|
150
|
-
var getLinkList = function (editorSettings) {
|
151
|
-
return editorSettings.link_list;
|
152
|
-
};
|
153
|
-
|
154
|
-
var hasDefaultLinkTarget = function (editorSettings) {
|
155
|
-
return typeof editorSettings.default_link_target === 'string';
|
156
|
-
};
|
157
|
-
|
158
|
-
var getDefaultLinkTarget = function (editorSettings) {
|
159
|
-
return editorSettings.default_link_target;
|
160
|
-
};
|
161
|
-
|
162
|
-
var getTargetList = function (editorSettings) {
|
163
|
-
return editorSettings.target_list;
|
164
|
-
};
|
165
|
-
|
166
|
-
var setTargetList = function (editor, list) {
|
167
|
-
editor.settings.target_list = list;
|
168
|
-
};
|
169
|
-
|
170
|
-
var shouldShowTargetList = function (editorSettings) {
|
171
|
-
return getTargetList(editorSettings) !== false;
|
172
|
-
};
|
173
|
-
|
174
|
-
var getRelList = function (editorSettings) {
|
175
|
-
return editorSettings.rel_list;
|
176
|
-
};
|
177
|
-
|
178
|
-
var hasRelList = function (editorSettings) {
|
179
|
-
return getRelList(editorSettings) !== undefined;
|
180
|
-
};
|
181
|
-
|
182
|
-
var getLinkClassList = function (editorSettings) {
|
183
|
-
return editorSettings.link_class_list;
|
184
|
-
};
|
185
|
-
|
186
|
-
var hasLinkClassList = function (editorSettings) {
|
187
|
-
return getLinkClassList(editorSettings) !== undefined;
|
188
|
-
};
|
96
|
+
};
|
97
|
+
var $_evd3tpfvjm0ofzck = { open: open$$1 };
|
189
98
|
|
190
|
-
|
191
|
-
return editorSettings.link_title !== false;
|
192
|
-
};
|
99
|
+
var global$4 = tinymce.util.Tools.resolve('tinymce.util.Tools');
|
193
100
|
|
194
|
-
|
195
|
-
|
101
|
+
var toggleTargetRules = function (rel, isUnsafe) {
|
102
|
+
var rules = ['noopener'];
|
103
|
+
var newRel = rel ? rel.split(/\s+/) : [];
|
104
|
+
var toString = function (rel) {
|
105
|
+
return global$4.trim(rel.sort().join(' '));
|
196
106
|
};
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
hasContextToolbar: hasContextToolbar,
|
201
|
-
getLinkList: getLinkList,
|
202
|
-
hasDefaultLinkTarget: hasDefaultLinkTarget,
|
203
|
-
getDefaultLinkTarget: getDefaultLinkTarget,
|
204
|
-
getTargetList: getTargetList,
|
205
|
-
setTargetList: setTargetList,
|
206
|
-
shouldShowTargetList: shouldShowTargetList,
|
207
|
-
getRelList: getRelList,
|
208
|
-
hasRelList: hasRelList,
|
209
|
-
getLinkClassList: getLinkClassList,
|
210
|
-
hasLinkClassList: hasLinkClassList,
|
211
|
-
shouldShowLinkTitle: shouldShowLinkTitle,
|
212
|
-
allowUnsafeLinkTarget: allowUnsafeLinkTarget
|
107
|
+
var addTargetRules = function (rel) {
|
108
|
+
rel = removeTargetRules(rel);
|
109
|
+
return rel.length ? rel.concat(rules) : rules;
|
213
110
|
};
|
214
|
-
|
215
|
-
)
|
216
|
-
|
217
|
-
|
218
|
-
defineGlobal("global!window", window);
|
219
|
-
/**
|
220
|
-
* ResolveGlobal.js
|
221
|
-
*
|
222
|
-
* Released under LGPL License.
|
223
|
-
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
224
|
-
*
|
225
|
-
* License: http://www.tinymce.com/license
|
226
|
-
* Contributing: http://www.tinymce.com/contributing
|
227
|
-
*/
|
228
|
-
|
229
|
-
define(
|
230
|
-
'tinymce.core.dom.DOMUtils',
|
231
|
-
[
|
232
|
-
'global!tinymce.util.Tools.resolve'
|
233
|
-
],
|
234
|
-
function (resolve) {
|
235
|
-
return resolve('tinymce.dom.DOMUtils');
|
236
|
-
}
|
237
|
-
);
|
238
|
-
|
239
|
-
/**
|
240
|
-
* ResolveGlobal.js
|
241
|
-
*
|
242
|
-
* Released under LGPL License.
|
243
|
-
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
244
|
-
*
|
245
|
-
* License: http://www.tinymce.com/license
|
246
|
-
* Contributing: http://www.tinymce.com/contributing
|
247
|
-
*/
|
248
|
-
|
249
|
-
define(
|
250
|
-
'tinymce.core.Env',
|
251
|
-
[
|
252
|
-
'global!tinymce.util.Tools.resolve'
|
253
|
-
],
|
254
|
-
function (resolve) {
|
255
|
-
return resolve('tinymce.Env');
|
256
|
-
}
|
257
|
-
);
|
258
|
-
|
259
|
-
/**
|
260
|
-
* OpenUrl.js
|
261
|
-
*
|
262
|
-
* Released under LGPL License.
|
263
|
-
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
264
|
-
*
|
265
|
-
* License: http://www.tinymce.com/license
|
266
|
-
* Contributing: http://www.tinymce.com/contributing
|
267
|
-
*/
|
268
|
-
|
269
|
-
define(
|
270
|
-
'tinymce.plugins.link.core.OpenUrl',
|
271
|
-
[
|
272
|
-
'global!document',
|
273
|
-
'global!window',
|
274
|
-
'tinymce.core.dom.DOMUtils',
|
275
|
-
'tinymce.core.Env'
|
276
|
-
],
|
277
|
-
function (document, window, DOMUtils, Env) {
|
278
|
-
var appendClickRemove = function (link, evt) {
|
279
|
-
document.body.appendChild(link);
|
280
|
-
link.dispatchEvent(evt);
|
281
|
-
document.body.removeChild(link);
|
111
|
+
var removeTargetRules = function (rel) {
|
112
|
+
return rel.filter(function (val) {
|
113
|
+
return global$4.inArray(rules, val) === -1;
|
114
|
+
});
|
282
115
|
};
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
116
|
+
newRel = isUnsafe ? addTargetRules(newRel) : removeTargetRules(newRel);
|
117
|
+
return newRel.length ? toString(newRel) : null;
|
118
|
+
};
|
119
|
+
var trimCaretContainers = function (text) {
|
120
|
+
return text.replace(/\uFEFF/g, '');
|
121
|
+
};
|
122
|
+
var getAnchorElement = function (editor, selectedElm) {
|
123
|
+
selectedElm = selectedElm || editor.selection.getNode();
|
124
|
+
if (isImageFigure(selectedElm)) {
|
125
|
+
return editor.dom.select('a[href]', selectedElm)[0];
|
126
|
+
} else {
|
127
|
+
return editor.dom.getParent(selectedElm, 'a[href]');
|
128
|
+
}
|
129
|
+
};
|
130
|
+
var getAnchorText = function (selection, anchorElm) {
|
131
|
+
var text = anchorElm ? anchorElm.innerText || anchorElm.textContent : selection.getContent({ format: 'text' });
|
132
|
+
return trimCaretContainers(text);
|
133
|
+
};
|
134
|
+
var isLink = function (elm) {
|
135
|
+
return elm && elm.nodeName === 'A' && elm.href;
|
136
|
+
};
|
137
|
+
var hasLinks = function (elements) {
|
138
|
+
return global$4.grep(elements, isLink).length > 0;
|
139
|
+
};
|
140
|
+
var isOnlyTextSelected = function (html) {
|
141
|
+
if (/</.test(html) && (!/^<a [^>]+>[^<]+<\/a>$/.test(html) || html.indexOf('href=') === -1)) {
|
142
|
+
return false;
|
143
|
+
}
|
144
|
+
return true;
|
145
|
+
};
|
146
|
+
var isImageFigure = function (node) {
|
147
|
+
return node && node.nodeName === 'FIGURE' && /\bimage\b/i.test(node.className);
|
148
|
+
};
|
149
|
+
var link = function (editor, attachState) {
|
150
|
+
return function (data) {
|
151
|
+
editor.undoManager.transact(function () {
|
152
|
+
var selectedElm = editor.selection.getNode();
|
153
|
+
var anchorElm = getAnchorElement(editor, selectedElm);
|
154
|
+
var linkAttrs = {
|
155
|
+
href: data.href,
|
156
|
+
target: data.target ? data.target : null,
|
157
|
+
rel: data.rel ? data.rel : null,
|
158
|
+
class: data.class ? data.class : null,
|
159
|
+
title: data.title ? data.title : null
|
160
|
+
};
|
161
|
+
if (!$_4b6xsbfujm0ofzch.hasRelList(editor.settings) && $_4b6xsbfujm0ofzch.allowUnsafeLinkTarget(editor.settings) === false) {
|
162
|
+
linkAttrs.rel = toggleTargetRules(linkAttrs.rel, linkAttrs.target === '_blank');
|
307
163
|
}
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
)
|
316
|
-
|
317
|
-
/**
|
318
|
-
* ResolveGlobal.js
|
319
|
-
*
|
320
|
-
* Released under LGPL License.
|
321
|
-
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
322
|
-
*
|
323
|
-
* License: http://www.tinymce.com/license
|
324
|
-
* Contributing: http://www.tinymce.com/contributing
|
325
|
-
*/
|
326
|
-
|
327
|
-
define(
|
328
|
-
'tinymce.core.util.Tools',
|
329
|
-
[
|
330
|
-
'global!tinymce.util.Tools.resolve'
|
331
|
-
],
|
332
|
-
function (resolve) {
|
333
|
-
return resolve('tinymce.util.Tools');
|
334
|
-
}
|
335
|
-
);
|
336
|
-
|
337
|
-
/**
|
338
|
-
* Utils.js
|
339
|
-
*
|
340
|
-
* Released under LGPL License.
|
341
|
-
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
342
|
-
*
|
343
|
-
* License: http://www.tinymce.com/license
|
344
|
-
* Contributing: http://www.tinymce.com/contributing
|
345
|
-
*/
|
346
|
-
|
347
|
-
define(
|
348
|
-
'tinymce.plugins.link.core.Utils',
|
349
|
-
[
|
350
|
-
'global!RegExp',
|
351
|
-
'tinymce.core.util.Tools',
|
352
|
-
'tinymce.plugins.link.api.Settings'
|
353
|
-
],
|
354
|
-
function (RegExp, Tools, Settings) {
|
355
|
-
var toggleTargetRules = function (rel, isUnsafe) {
|
356
|
-
var rules = ['noopener'];
|
357
|
-
var newRel = rel ? rel.split(/\s+/) : [];
|
358
|
-
|
359
|
-
var toString = function (rel) {
|
360
|
-
return Tools.trim(rel.sort().join(' '));
|
361
|
-
};
|
362
|
-
|
363
|
-
var addTargetRules = function (rel) {
|
364
|
-
rel = removeTargetRules(rel);
|
365
|
-
return rel.length ? rel.concat(rules) : rules;
|
366
|
-
};
|
367
|
-
|
368
|
-
var removeTargetRules = function (rel) {
|
369
|
-
return rel.filter(function (val) {
|
370
|
-
return Tools.inArray(rules, val) === -1;
|
371
|
-
});
|
372
|
-
};
|
373
|
-
|
374
|
-
newRel = isUnsafe ? addTargetRules(newRel) : removeTargetRules(newRel);
|
375
|
-
return newRel.length ? toString(newRel) : null;
|
376
|
-
};
|
377
|
-
|
378
|
-
var trimCaretContainers = function (text) {
|
379
|
-
return text.replace(/\uFEFF/g, '');
|
380
|
-
};
|
381
|
-
|
382
|
-
var getAnchorElement = function (editor, selectedElm) {
|
383
|
-
selectedElm = selectedElm || editor.selection.getNode();
|
384
|
-
if (isImageFigure(selectedElm)) {
|
385
|
-
// for an image conained in a figure we look for a link inside the selected element
|
386
|
-
return editor.dom.select('a[href]', selectedElm)[0];
|
387
|
-
} else {
|
388
|
-
return editor.dom.getParent(selectedElm, 'a[href]');
|
389
|
-
}
|
390
|
-
};
|
391
|
-
|
392
|
-
var getAnchorText = function (selection, anchorElm) {
|
393
|
-
var text = anchorElm ? (anchorElm.innerText || anchorElm.textContent) : selection.getContent({ format: 'text' });
|
394
|
-
return trimCaretContainers(text);
|
395
|
-
};
|
396
|
-
|
397
|
-
var isLink = function (elm) {
|
398
|
-
return elm && elm.nodeName === 'A' && elm.href;
|
399
|
-
};
|
400
|
-
|
401
|
-
var hasLinks = function (elements) {
|
402
|
-
return Tools.grep(elements, isLink).length > 0;
|
403
|
-
};
|
404
|
-
|
405
|
-
var isOnlyTextSelected = function (html) {
|
406
|
-
// Partial html and not a fully selected anchor element
|
407
|
-
if (/</.test(html) && (!/^<a [^>]+>[^<]+<\/a>$/.test(html) || html.indexOf('href=') === -1)) {
|
408
|
-
return false;
|
409
|
-
}
|
410
|
-
|
411
|
-
return true;
|
412
|
-
};
|
413
|
-
|
414
|
-
var isImageFigure = function (node) {
|
415
|
-
return node && node.nodeName === 'FIGURE' && /\bimage\b/i.test(node.className);
|
416
|
-
};
|
417
|
-
|
418
|
-
var link = function (editor, attachState) {
|
419
|
-
return function (data) {
|
420
|
-
editor.undoManager.transact(function () {
|
421
|
-
var selectedElm = editor.selection.getNode();
|
422
|
-
var anchorElm = getAnchorElement(editor, selectedElm);
|
423
|
-
|
424
|
-
var linkAttrs = {
|
425
|
-
href: data.href,
|
426
|
-
target: data.target ? data.target : null,
|
427
|
-
rel: data.rel ? data.rel : null,
|
428
|
-
"class": data["class"] ? data["class"] : null,
|
429
|
-
title: data.title ? data.title : null
|
430
|
-
};
|
431
|
-
|
432
|
-
if (!Settings.hasRelList(editor.settings) && Settings.allowUnsafeLinkTarget(editor.settings) === false) {
|
433
|
-
linkAttrs.rel = toggleTargetRules(linkAttrs.rel, linkAttrs.target === '_blank');
|
434
|
-
}
|
435
|
-
|
436
|
-
if (data.href === attachState.href) {
|
437
|
-
attachState.attach();
|
438
|
-
attachState = {};
|
439
|
-
}
|
440
|
-
|
441
|
-
if (anchorElm) {
|
442
|
-
editor.focus();
|
443
|
-
|
444
|
-
if (data.hasOwnProperty('text')) {
|
445
|
-
if ("innerText" in anchorElm) {
|
446
|
-
anchorElm.innerText = data.text;
|
447
|
-
} else {
|
448
|
-
anchorElm.textContent = data.text;
|
449
|
-
}
|
450
|
-
}
|
451
|
-
|
452
|
-
editor.dom.setAttribs(anchorElm, linkAttrs);
|
453
|
-
|
454
|
-
editor.selection.select(anchorElm);
|
455
|
-
editor.undoManager.add();
|
456
|
-
} else {
|
457
|
-
if (isImageFigure(selectedElm)) {
|
458
|
-
linkImageFigure(editor, selectedElm, linkAttrs);
|
459
|
-
} else if (data.hasOwnProperty('text')) {
|
460
|
-
editor.insertContent(editor.dom.createHTML('a', linkAttrs, editor.dom.encode(data.text)));
|
164
|
+
if (data.href === attachState.href) {
|
165
|
+
attachState.attach();
|
166
|
+
attachState = {};
|
167
|
+
}
|
168
|
+
if (anchorElm) {
|
169
|
+
editor.focus();
|
170
|
+
if (data.hasOwnProperty('text')) {
|
171
|
+
if ('innerText' in anchorElm) {
|
172
|
+
anchorElm.innerText = data.text;
|
461
173
|
} else {
|
462
|
-
|
174
|
+
anchorElm.textContent = data.text;
|
463
175
|
}
|
464
176
|
}
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
if (isImageFigure(node)) {
|
474
|
-
unlinkImageFigure(editor, node);
|
177
|
+
editor.dom.setAttribs(anchorElm, linkAttrs);
|
178
|
+
editor.selection.select(anchorElm);
|
179
|
+
editor.undoManager.add();
|
180
|
+
} else {
|
181
|
+
if (isImageFigure(selectedElm)) {
|
182
|
+
linkImageFigure(editor, selectedElm, linkAttrs);
|
183
|
+
} else if (data.hasOwnProperty('text')) {
|
184
|
+
editor.insertContent(editor.dom.createHTML('a', linkAttrs, editor.dom.encode(data.text)));
|
475
185
|
} else {
|
476
|
-
editor.execCommand('
|
186
|
+
editor.execCommand('mceInsertLink', false, linkAttrs);
|
477
187
|
}
|
478
|
-
}
|
479
|
-
};
|
188
|
+
}
|
189
|
+
});
|
480
190
|
};
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
editor.
|
191
|
+
};
|
192
|
+
var unlink = function (editor) {
|
193
|
+
return function () {
|
194
|
+
editor.undoManager.transact(function () {
|
195
|
+
var node = editor.selection.getNode();
|
196
|
+
if (isImageFigure(node)) {
|
197
|
+
unlinkImageFigure(editor, node);
|
198
|
+
} else {
|
199
|
+
editor.execCommand('unlink');
|
490
200
|
}
|
491
|
-
}
|
201
|
+
});
|
492
202
|
};
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
a.
|
203
|
+
};
|
204
|
+
var unlinkImageFigure = function (editor, fig) {
|
205
|
+
var a, img;
|
206
|
+
img = editor.dom.select('img', fig)[0];
|
207
|
+
if (img) {
|
208
|
+
a = editor.dom.getParents(img, 'a[href]', fig)[0];
|
209
|
+
if (a) {
|
210
|
+
a.parentNode.insertBefore(img, a);
|
211
|
+
editor.dom.remove(a);
|
501
212
|
}
|
502
|
-
}
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
* Contributing: http://www.tinymce.com/contributing
|
524
|
-
*/
|
525
|
-
|
526
|
-
define(
|
527
|
-
'tinymce.core.util.Delay',
|
528
|
-
[
|
529
|
-
'global!tinymce.util.Tools.resolve'
|
530
|
-
],
|
531
|
-
function (resolve) {
|
532
|
-
return resolve('tinymce.util.Delay');
|
533
|
-
}
|
534
|
-
);
|
535
|
-
|
536
|
-
/**
|
537
|
-
* ResolveGlobal.js
|
538
|
-
*
|
539
|
-
* Released under LGPL License.
|
540
|
-
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
541
|
-
*
|
542
|
-
* License: http://www.tinymce.com/license
|
543
|
-
* Contributing: http://www.tinymce.com/contributing
|
544
|
-
*/
|
545
|
-
|
546
|
-
define(
|
547
|
-
'tinymce.core.util.XHR',
|
548
|
-
[
|
549
|
-
'global!tinymce.util.Tools.resolve'
|
550
|
-
],
|
551
|
-
function (resolve) {
|
552
|
-
return resolve('tinymce.util.XHR');
|
553
|
-
}
|
554
|
-
);
|
555
|
-
|
556
|
-
/**
|
557
|
-
* Dialog.js
|
558
|
-
*
|
559
|
-
* Released under LGPL License.
|
560
|
-
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
561
|
-
*
|
562
|
-
* License: http://www.tinymce.com/license
|
563
|
-
* Contributing: http://www.tinymce.com/contributing
|
564
|
-
*/
|
213
|
+
}
|
214
|
+
};
|
215
|
+
var linkImageFigure = function (editor, fig, attrs) {
|
216
|
+
var a, img;
|
217
|
+
img = editor.dom.select('img', fig)[0];
|
218
|
+
if (img) {
|
219
|
+
a = editor.dom.create('a', attrs);
|
220
|
+
img.parentNode.insertBefore(a, img);
|
221
|
+
a.appendChild(img);
|
222
|
+
}
|
223
|
+
};
|
224
|
+
var $_d522tkfzjm0ofzda = {
|
225
|
+
link: link,
|
226
|
+
unlink: unlink,
|
227
|
+
isLink: isLink,
|
228
|
+
hasLinks: hasLinks,
|
229
|
+
isOnlyTextSelected: isOnlyTextSelected,
|
230
|
+
getAnchorElement: getAnchorElement,
|
231
|
+
getAnchorText: getAnchorText,
|
232
|
+
toggleTargetRules: toggleTargetRules
|
233
|
+
};
|
565
234
|
|
566
|
-
|
567
|
-
'tinymce.plugins.link.ui.Dialog',
|
568
|
-
[
|
569
|
-
'tinymce.core.util.Delay',
|
570
|
-
'tinymce.core.util.Tools',
|
571
|
-
'tinymce.core.util.XHR',
|
572
|
-
'tinymce.plugins.link.api.Settings',
|
573
|
-
'tinymce.plugins.link.core.Utils'
|
574
|
-
],
|
575
|
-
function (Delay, Tools, XHR, Settings, Utils) {
|
576
|
-
var attachState = {};
|
235
|
+
var global$5 = tinymce.util.Tools.resolve('tinymce.util.Delay');
|
577
236
|
|
578
|
-
|
579
|
-
var linkList = Settings.getLinkList(editor.settings);
|
237
|
+
var global$6 = tinymce.util.Tools.resolve('tinymce.util.XHR');
|
580
238
|
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
239
|
+
var attachState = {};
|
240
|
+
var createLinkList = function (editor, callback) {
|
241
|
+
var linkList = $_4b6xsbfujm0ofzch.getLinkList(editor.settings);
|
242
|
+
if (typeof linkList === 'string') {
|
243
|
+
global$6.send({
|
244
|
+
url: linkList,
|
245
|
+
success: function (text) {
|
246
|
+
callback(editor, JSON.parse(text));
|
247
|
+
}
|
248
|
+
});
|
249
|
+
} else if (typeof linkList === 'function') {
|
250
|
+
linkList(function (list) {
|
251
|
+
callback(editor, list);
|
252
|
+
});
|
253
|
+
} else {
|
254
|
+
callback(editor, linkList);
|
255
|
+
}
|
256
|
+
};
|
257
|
+
var buildListItems = function (inputList, itemCallback, startItems) {
|
258
|
+
var appendItems = function (values, output) {
|
259
|
+
output = output || [];
|
260
|
+
global$4.each(values, function (item) {
|
261
|
+
var menuItem = { text: item.text || item.title };
|
262
|
+
if (item.menu) {
|
263
|
+
menuItem.menu = appendItems(item.menu);
|
264
|
+
} else {
|
265
|
+
menuItem.value = item.value;
|
266
|
+
if (itemCallback) {
|
267
|
+
itemCallback(menuItem);
|
586
268
|
}
|
269
|
+
}
|
270
|
+
output.push(menuItem);
|
271
|
+
});
|
272
|
+
return output;
|
273
|
+
};
|
274
|
+
return appendItems(inputList, startItems || []);
|
275
|
+
};
|
276
|
+
var delayedConfirm = function (editor, message, callback) {
|
277
|
+
var rng = editor.selection.getRng();
|
278
|
+
global$5.setEditorTimeout(editor, function () {
|
279
|
+
editor.windowManager.confirm(message, function (state) {
|
280
|
+
editor.selection.setRng(rng);
|
281
|
+
callback(state);
|
282
|
+
});
|
283
|
+
});
|
284
|
+
};
|
285
|
+
var showDialog = function (editor, linkList) {
|
286
|
+
var data = {};
|
287
|
+
var selection = editor.selection;
|
288
|
+
var dom = editor.dom;
|
289
|
+
var anchorElm, initialText;
|
290
|
+
var win, onlyText, textListCtrl, linkListCtrl, relListCtrl, targetListCtrl, classListCtrl, linkTitleCtrl, value;
|
291
|
+
var linkListChangeHandler = function (e) {
|
292
|
+
var textCtrl = win.find('#text');
|
293
|
+
if (!textCtrl.value() || e.lastControl && textCtrl.value() === e.lastControl.text()) {
|
294
|
+
textCtrl.value(e.control.text());
|
295
|
+
}
|
296
|
+
win.find('#href').value(e.control.value());
|
297
|
+
};
|
298
|
+
var buildAnchorListControl = function (url) {
|
299
|
+
var anchorList = [];
|
300
|
+
global$4.each(editor.dom.select('a:not([href])'), function (anchor) {
|
301
|
+
var id = anchor.name || anchor.id;
|
302
|
+
if (id) {
|
303
|
+
anchorList.push({
|
304
|
+
text: id,
|
305
|
+
value: '#' + id,
|
306
|
+
selected: url.indexOf('#' + id) !== -1
|
307
|
+
});
|
308
|
+
}
|
309
|
+
});
|
310
|
+
if (anchorList.length) {
|
311
|
+
anchorList.unshift({
|
312
|
+
text: 'None',
|
313
|
+
value: ''
|
587
314
|
});
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
|
315
|
+
return {
|
316
|
+
name: 'anchor',
|
317
|
+
type: 'listbox',
|
318
|
+
label: 'Anchors',
|
319
|
+
values: anchorList,
|
320
|
+
onselect: linkListChangeHandler
|
321
|
+
};
|
594
322
|
}
|
595
323
|
};
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
Tools.each(values, function (item) {
|
602
|
-
var menuItem = { text: item.text || item.title };
|
603
|
-
|
604
|
-
if (item.menu) {
|
605
|
-
menuItem.menu = appendItems(item.menu);
|
606
|
-
} else {
|
607
|
-
menuItem.value = item.value;
|
608
|
-
|
609
|
-
if (itemCallback) {
|
610
|
-
itemCallback(menuItem);
|
611
|
-
}
|
612
|
-
}
|
613
|
-
|
614
|
-
output.push(menuItem);
|
615
|
-
});
|
616
|
-
|
617
|
-
return output;
|
618
|
-
};
|
619
|
-
|
620
|
-
return appendItems(inputList, startItems || []);
|
324
|
+
var updateText = function () {
|
325
|
+
if (!initialText && onlyText && !data.text) {
|
326
|
+
this.parent().parent().find('#text')[0].value(this.value());
|
327
|
+
}
|
621
328
|
};
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
329
|
+
var urlChange = function (e) {
|
330
|
+
var meta = e.meta || {};
|
331
|
+
if (linkListCtrl) {
|
332
|
+
linkListCtrl.value(editor.convertURL(this.value(), 'href'));
|
333
|
+
}
|
334
|
+
global$4.each(e.meta, function (value, key) {
|
335
|
+
var inp = win.find('#' + key);
|
336
|
+
if (key === 'text') {
|
337
|
+
if (initialText.length === 0) {
|
338
|
+
inp.value(value);
|
339
|
+
data.text = value;
|
340
|
+
}
|
341
|
+
} else {
|
342
|
+
inp.value(value);
|
343
|
+
}
|
632
344
|
});
|
345
|
+
if (meta.attach) {
|
346
|
+
attachState = {
|
347
|
+
href: this.value(),
|
348
|
+
attach: meta.attach
|
349
|
+
};
|
350
|
+
}
|
351
|
+
if (!meta.text) {
|
352
|
+
updateText.call(this);
|
353
|
+
}
|
633
354
|
};
|
634
|
-
|
635
|
-
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
355
|
+
var onBeforeCall = function (e) {
|
356
|
+
e.meta = win.toJSON();
|
357
|
+
};
|
358
|
+
onlyText = $_d522tkfzjm0ofzda.isOnlyTextSelected(selection.getContent());
|
359
|
+
anchorElm = $_d522tkfzjm0ofzda.getAnchorElement(editor);
|
360
|
+
data.text = initialText = $_d522tkfzjm0ofzda.getAnchorText(editor.selection, anchorElm);
|
361
|
+
data.href = anchorElm ? dom.getAttrib(anchorElm, 'href') : '';
|
362
|
+
if (anchorElm) {
|
363
|
+
data.target = dom.getAttrib(anchorElm, 'target');
|
364
|
+
} else if ($_4b6xsbfujm0ofzch.hasDefaultLinkTarget(editor.settings)) {
|
365
|
+
data.target = $_4b6xsbfujm0ofzch.getDefaultLinkTarget(editor.settings);
|
366
|
+
}
|
367
|
+
if (value = dom.getAttrib(anchorElm, 'rel')) {
|
368
|
+
data.rel = value;
|
369
|
+
}
|
370
|
+
if (value = dom.getAttrib(anchorElm, 'class')) {
|
371
|
+
data.class = value;
|
372
|
+
}
|
373
|
+
if (value = dom.getAttrib(anchorElm, 'title')) {
|
374
|
+
data.title = value;
|
375
|
+
}
|
376
|
+
if (onlyText) {
|
377
|
+
textListCtrl = {
|
378
|
+
name: 'text',
|
379
|
+
type: 'textbox',
|
380
|
+
size: 40,
|
381
|
+
label: 'Text to display',
|
382
|
+
onchange: function () {
|
383
|
+
data.text = this.value();
|
644
384
|
}
|
645
|
-
|
646
|
-
win.find('#href').value(e.control.value());
|
647
385
|
};
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
|
664
|
-
if (anchorList.length) {
|
665
|
-
anchorList.unshift({ text: 'None', value: '' });
|
666
|
-
|
667
|
-
return {
|
668
|
-
name: 'anchor',
|
669
|
-
type: 'listbox',
|
670
|
-
label: 'Anchors',
|
671
|
-
values: anchorList,
|
672
|
-
onselect: linkListChangeHandler
|
673
|
-
};
|
386
|
+
}
|
387
|
+
if (linkList) {
|
388
|
+
linkListCtrl = {
|
389
|
+
type: 'listbox',
|
390
|
+
label: 'Link list',
|
391
|
+
values: buildListItems(linkList, function (item) {
|
392
|
+
item.value = editor.convertURL(item.value || item.url, 'href');
|
393
|
+
}, [{
|
394
|
+
text: 'None',
|
395
|
+
value: ''
|
396
|
+
}]),
|
397
|
+
onselect: linkListChangeHandler,
|
398
|
+
value: editor.convertURL(data.href, 'href'),
|
399
|
+
onPostRender: function () {
|
400
|
+
linkListCtrl = this;
|
674
401
|
}
|
675
402
|
};
|
676
|
-
|
677
|
-
|
678
|
-
|
679
|
-
|
680
|
-
|
403
|
+
}
|
404
|
+
if ($_4b6xsbfujm0ofzch.shouldShowTargetList(editor.settings)) {
|
405
|
+
if ($_4b6xsbfujm0ofzch.getTargetList(editor.settings) === undefined) {
|
406
|
+
$_4b6xsbfujm0ofzch.setTargetList(editor, [
|
407
|
+
{
|
408
|
+
text: 'None',
|
409
|
+
value: ''
|
410
|
+
},
|
411
|
+
{
|
412
|
+
text: 'New window',
|
413
|
+
value: '_blank'
|
414
|
+
}
|
415
|
+
]);
|
416
|
+
}
|
417
|
+
targetListCtrl = {
|
418
|
+
name: 'target',
|
419
|
+
type: 'listbox',
|
420
|
+
label: 'Target',
|
421
|
+
values: buildListItems($_4b6xsbfujm0ofzch.getTargetList(editor.settings))
|
681
422
|
};
|
682
|
-
|
683
|
-
|
684
|
-
|
685
|
-
|
686
|
-
|
687
|
-
|
688
|
-
|
689
|
-
|
690
|
-
|
691
|
-
var inp = win.find('#' + key);
|
692
|
-
|
693
|
-
if (key === 'text') {
|
694
|
-
if (initialText.length === 0) {
|
695
|
-
inp.value(value);
|
696
|
-
data.text = value;
|
697
|
-
}
|
698
|
-
} else {
|
699
|
-
inp.value(value);
|
423
|
+
}
|
424
|
+
if ($_4b6xsbfujm0ofzch.hasRelList(editor.settings)) {
|
425
|
+
relListCtrl = {
|
426
|
+
name: 'rel',
|
427
|
+
type: 'listbox',
|
428
|
+
label: 'Rel',
|
429
|
+
values: buildListItems($_4b6xsbfujm0ofzch.getRelList(editor.settings), function (item) {
|
430
|
+
if ($_4b6xsbfujm0ofzch.allowUnsafeLinkTarget(editor.settings) === false) {
|
431
|
+
item.value = $_d522tkfzjm0ofzda.toggleTargetRules(item.value, data.target === '_blank');
|
700
432
|
}
|
701
|
-
})
|
702
|
-
|
703
|
-
if (meta.attach) {
|
704
|
-
attachState = {
|
705
|
-
href: this.value(),
|
706
|
-
attach: meta.attach
|
707
|
-
};
|
708
|
-
}
|
709
|
-
|
710
|
-
if (!meta.text) {
|
711
|
-
updateText.call(this);
|
712
|
-
}
|
433
|
+
})
|
713
434
|
};
|
714
|
-
|
715
|
-
|
716
|
-
|
435
|
+
}
|
436
|
+
if ($_4b6xsbfujm0ofzch.hasLinkClassList(editor.settings)) {
|
437
|
+
classListCtrl = {
|
438
|
+
name: 'class',
|
439
|
+
type: 'listbox',
|
440
|
+
label: 'Class',
|
441
|
+
values: buildListItems($_4b6xsbfujm0ofzch.getLinkClassList(editor.settings), function (item) {
|
442
|
+
if (item.value) {
|
443
|
+
item.textStyle = function () {
|
444
|
+
return editor.formatter.getCssText({
|
445
|
+
inline: 'a',
|
446
|
+
classes: [item.value]
|
447
|
+
});
|
448
|
+
};
|
449
|
+
}
|
450
|
+
})
|
717
451
|
};
|
718
|
-
|
719
|
-
|
720
|
-
|
721
|
-
|
722
|
-
|
723
|
-
|
724
|
-
|
725
|
-
|
726
|
-
|
727
|
-
|
728
|
-
|
729
|
-
|
730
|
-
|
731
|
-
|
732
|
-
|
733
|
-
|
734
|
-
|
735
|
-
if ((value = dom.getAttrib(anchorElm, 'class'))) {
|
736
|
-
data['class'] = value;
|
737
|
-
}
|
738
|
-
|
739
|
-
if ((value = dom.getAttrib(anchorElm, 'title'))) {
|
740
|
-
data.title = value;
|
741
|
-
}
|
742
|
-
|
743
|
-
if (onlyText) {
|
744
|
-
textListCtrl = {
|
745
|
-
name: 'text',
|
746
|
-
type: 'textbox',
|
452
|
+
}
|
453
|
+
if ($_4b6xsbfujm0ofzch.shouldShowLinkTitle(editor.settings)) {
|
454
|
+
linkTitleCtrl = {
|
455
|
+
name: 'title',
|
456
|
+
type: 'textbox',
|
457
|
+
label: 'Title',
|
458
|
+
value: data.title
|
459
|
+
};
|
460
|
+
}
|
461
|
+
win = editor.windowManager.open({
|
462
|
+
title: 'Insert link',
|
463
|
+
data: data,
|
464
|
+
body: [
|
465
|
+
{
|
466
|
+
name: 'href',
|
467
|
+
type: 'filepicker',
|
468
|
+
filetype: 'file',
|
747
469
|
size: 40,
|
748
|
-
|
749
|
-
|
750
|
-
|
751
|
-
|
752
|
-
|
753
|
-
|
754
|
-
|
755
|
-
|
756
|
-
|
757
|
-
|
758
|
-
|
759
|
-
|
760
|
-
|
761
|
-
|
762
|
-
|
763
|
-
|
764
|
-
|
765
|
-
|
766
|
-
|
767
|
-
|
768
|
-
|
769
|
-
|
770
|
-
|
771
|
-
|
772
|
-
};
|
773
|
-
}
|
774
|
-
|
775
|
-
if (Settings.shouldShowTargetList(editor.settings)) {
|
776
|
-
if (Settings.getTargetList(editor.settings) === undefined) {
|
777
|
-
Settings.setTargetList(editor, [
|
778
|
-
{ text: 'None', value: '' },
|
779
|
-
{ text: 'New window', value: '_blank' }
|
780
|
-
]);
|
470
|
+
autofocus: true,
|
471
|
+
label: 'Url',
|
472
|
+
onchange: urlChange,
|
473
|
+
onkeyup: updateText,
|
474
|
+
onpaste: updateText,
|
475
|
+
onbeforecall: onBeforeCall
|
476
|
+
},
|
477
|
+
textListCtrl,
|
478
|
+
linkTitleCtrl,
|
479
|
+
buildAnchorListControl(data.href),
|
480
|
+
linkListCtrl,
|
481
|
+
relListCtrl,
|
482
|
+
targetListCtrl,
|
483
|
+
classListCtrl
|
484
|
+
],
|
485
|
+
onSubmit: function (e) {
|
486
|
+
var assumeExternalTargets = $_4b6xsbfujm0ofzch.assumeExternalTargets(editor.settings);
|
487
|
+
var insertLink = $_d522tkfzjm0ofzda.link(editor, attachState);
|
488
|
+
var removeLink = $_d522tkfzjm0ofzda.unlink(editor);
|
489
|
+
var resultData = global$4.extend({}, data, e.data);
|
490
|
+
var href = resultData.href;
|
491
|
+
if (!href) {
|
492
|
+
removeLink();
|
493
|
+
return;
|
781
494
|
}
|
782
|
-
|
783
|
-
|
784
|
-
|
785
|
-
|
786
|
-
|
787
|
-
|
788
|
-
|
789
|
-
}
|
790
|
-
|
791
|
-
if (Settings.hasRelList(editor.settings)) {
|
792
|
-
relListCtrl = {
|
793
|
-
name: 'rel',
|
794
|
-
type: 'listbox',
|
795
|
-
label: 'Rel',
|
796
|
-
values: buildListItems(
|
797
|
-
Settings.getRelList(editor.settings),
|
798
|
-
function (item) {
|
799
|
-
if (Settings.allowUnsafeLinkTarget(editor.settings) === false) {
|
800
|
-
item.value = Utils.toggleTargetRules(item.value, data.target === '_blank');
|
801
|
-
}
|
495
|
+
if (!onlyText || resultData.text === initialText) {
|
496
|
+
delete resultData.text;
|
497
|
+
}
|
498
|
+
if (href.indexOf('@') > 0 && href.indexOf('//') === -1 && href.indexOf('mailto:') === -1) {
|
499
|
+
delayedConfirm(editor, 'The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?', function (state) {
|
500
|
+
if (state) {
|
501
|
+
resultData.href = 'mailto:' + href;
|
802
502
|
}
|
803
|
-
|
804
|
-
|
805
|
-
|
806
|
-
|
807
|
-
|
808
|
-
|
809
|
-
|
810
|
-
|
811
|
-
label: 'Class',
|
812
|
-
values: buildListItems(
|
813
|
-
Settings.getLinkClassList(editor.settings),
|
814
|
-
function (item) {
|
815
|
-
if (item.value) {
|
816
|
-
item.textStyle = function () {
|
817
|
-
return editor.formatter.getCssText({ inline: 'a', classes: [item.value] });
|
818
|
-
};
|
819
|
-
}
|
503
|
+
insertLink(resultData);
|
504
|
+
});
|
505
|
+
return;
|
506
|
+
}
|
507
|
+
if (assumeExternalTargets === true && !/^\w+:/i.test(href) || assumeExternalTargets === false && /^\s*www[\.|\d\.]/i.test(href)) {
|
508
|
+
delayedConfirm(editor, 'The URL you entered seems to be an external link. Do you want to add the required http:// prefix?', function (state) {
|
509
|
+
if (state) {
|
510
|
+
resultData.href = 'http://' + href;
|
820
511
|
}
|
821
|
-
|
822
|
-
|
823
|
-
|
824
|
-
|
825
|
-
if (Settings.shouldShowLinkTitle(editor.settings)) {
|
826
|
-
linkTitleCtrl = {
|
827
|
-
name: 'title',
|
828
|
-
type: 'textbox',
|
829
|
-
label: 'Title',
|
830
|
-
value: data.title
|
831
|
-
};
|
832
|
-
}
|
833
|
-
|
834
|
-
win = editor.windowManager.open({
|
835
|
-
title: 'Insert link',
|
836
|
-
data: data,
|
837
|
-
body: [
|
838
|
-
{
|
839
|
-
name: 'href',
|
840
|
-
type: 'filepicker',
|
841
|
-
filetype: 'file',
|
842
|
-
size: 40,
|
843
|
-
autofocus: true,
|
844
|
-
label: 'Url',
|
845
|
-
onchange: urlChange,
|
846
|
-
onkeyup: updateText,
|
847
|
-
onbeforecall: onBeforeCall
|
848
|
-
},
|
849
|
-
textListCtrl,
|
850
|
-
linkTitleCtrl,
|
851
|
-
buildAnchorListControl(data.href),
|
852
|
-
linkListCtrl,
|
853
|
-
relListCtrl,
|
854
|
-
targetListCtrl,
|
855
|
-
classListCtrl
|
856
|
-
],
|
857
|
-
onSubmit: function (e) {
|
858
|
-
var assumeExternalTargets = Settings.assumeExternalTargets(editor.settings);
|
859
|
-
var insertLink = Utils.link(editor, attachState);
|
860
|
-
var removeLink = Utils.unlink(editor);
|
861
|
-
|
862
|
-
var resultData = Tools.extend({}, data, e.data);
|
863
|
-
/*eslint dot-notation: 0*/
|
864
|
-
var href = resultData.href;
|
865
|
-
|
866
|
-
if (!href) {
|
867
|
-
removeLink();
|
868
|
-
return;
|
869
|
-
}
|
870
|
-
|
871
|
-
if (!onlyText || resultData.text === initialText) {
|
872
|
-
delete resultData.text;
|
873
|
-
}
|
874
|
-
|
875
|
-
// Is email and not //user@domain.com
|
876
|
-
if (href.indexOf('@') > 0 && href.indexOf('//') === -1 && href.indexOf('mailto:') === -1) {
|
877
|
-
delayedConfirm(
|
878
|
-
editor,
|
879
|
-
'The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?',
|
880
|
-
function (state) {
|
881
|
-
if (state) {
|
882
|
-
resultData.href = 'mailto:' + href;
|
883
|
-
}
|
884
|
-
insertLink(resultData);
|
885
|
-
}
|
886
|
-
);
|
887
|
-
return;
|
888
|
-
}
|
889
|
-
|
890
|
-
// Is not protocol prefixed
|
891
|
-
if ((assumeExternalTargets === true && !/^\w+:/i.test(href)) ||
|
892
|
-
(assumeExternalTargets === false && /^\s*www[\.|\d\.]/i.test(href))) {
|
893
|
-
delayedConfirm(
|
894
|
-
editor,
|
895
|
-
'The URL you entered seems to be an external link. Do you want to add the required http:// prefix?',
|
896
|
-
function (state) {
|
897
|
-
if (state) {
|
898
|
-
resultData.href = 'http://' + href;
|
899
|
-
}
|
900
|
-
insertLink(resultData);
|
901
|
-
}
|
902
|
-
);
|
903
|
-
return;
|
904
|
-
}
|
905
|
-
|
906
|
-
insertLink(resultData);
|
512
|
+
insertLink(resultData);
|
513
|
+
});
|
514
|
+
return;
|
907
515
|
}
|
908
|
-
|
909
|
-
|
910
|
-
|
911
|
-
|
912
|
-
|
913
|
-
|
914
|
-
|
915
|
-
|
916
|
-
open: open
|
917
|
-
};
|
918
|
-
}
|
919
|
-
);
|
920
|
-
/**
|
921
|
-
* Actions.js
|
922
|
-
*
|
923
|
-
* Released under LGPL License.
|
924
|
-
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
925
|
-
*
|
926
|
-
* License: http://www.tinymce.com/license
|
927
|
-
* Contributing: http://www.tinymce.com/contributing
|
928
|
-
*/
|
929
|
-
|
930
|
-
define(
|
931
|
-
'tinymce.plugins.link.core.Actions',
|
932
|
-
[
|
933
|
-
'tinymce.core.util.VK',
|
934
|
-
'tinymce.plugins.link.api.Settings',
|
935
|
-
'tinymce.plugins.link.core.OpenUrl',
|
936
|
-
'tinymce.plugins.link.core.Utils',
|
937
|
-
'tinymce.plugins.link.ui.Dialog'
|
938
|
-
],
|
939
|
-
function (VK, Settings, OpenUrl, Utils, Dialog) {
|
940
|
-
var getLink = function (editor, elm) {
|
941
|
-
return editor.dom.getParent(elm, 'a[href]');
|
942
|
-
};
|
943
|
-
|
944
|
-
var getSelectedLink = function (editor) {
|
945
|
-
return getLink(editor, editor.selection.getStart());
|
946
|
-
};
|
947
|
-
|
948
|
-
var getHref = function (elm) {
|
949
|
-
// Returns the real href value not the resolved a.href value
|
950
|
-
var href = elm.getAttribute('data-mce-href');
|
951
|
-
return href ? href : elm.getAttribute('href');
|
952
|
-
};
|
953
|
-
|
954
|
-
var isContextMenuVisible = function (editor) {
|
955
|
-
var contextmenu = editor.plugins.contextmenu;
|
956
|
-
return contextmenu ? contextmenu.isContextMenuVisible() : false;
|
957
|
-
};
|
958
|
-
|
959
|
-
var hasOnlyAltModifier = function (e) {
|
960
|
-
return e.altKey === true && e.shiftKey === false && e.ctrlKey === false && e.metaKey === false;
|
961
|
-
};
|
516
|
+
insertLink(resultData);
|
517
|
+
}
|
518
|
+
});
|
519
|
+
};
|
520
|
+
var open$1 = function (editor) {
|
521
|
+
createLinkList(editor, showDialog);
|
522
|
+
};
|
523
|
+
var $_8kb7qsg1jm0ofzdg = { open: open$1 };
|
962
524
|
|
963
|
-
|
964
|
-
|
965
|
-
|
966
|
-
|
967
|
-
|
968
|
-
|
969
|
-
|
970
|
-
|
971
|
-
|
972
|
-
|
525
|
+
var getLink = function (editor, elm) {
|
526
|
+
return editor.dom.getParent(elm, 'a[href]');
|
527
|
+
};
|
528
|
+
var getSelectedLink = function (editor) {
|
529
|
+
return getLink(editor, editor.selection.getStart());
|
530
|
+
};
|
531
|
+
var getHref = function (elm) {
|
532
|
+
var href = elm.getAttribute('data-mce-href');
|
533
|
+
return href ? href : elm.getAttribute('href');
|
534
|
+
};
|
535
|
+
var isContextMenuVisible = function (editor) {
|
536
|
+
var contextmenu = editor.plugins.contextmenu;
|
537
|
+
return contextmenu ? contextmenu.isContextMenuVisible() : false;
|
538
|
+
};
|
539
|
+
var hasOnlyAltModifier = function (e) {
|
540
|
+
return e.altKey === true && e.shiftKey === false && e.ctrlKey === false && e.metaKey === false;
|
541
|
+
};
|
542
|
+
var gotoLink = function (editor, a) {
|
543
|
+
if (a) {
|
544
|
+
var href = getHref(a);
|
545
|
+
if (/^#/.test(href)) {
|
546
|
+
var targetEl = editor.$(href);
|
547
|
+
if (targetEl.length) {
|
548
|
+
editor.selection.scrollIntoView(targetEl[0], true);
|
973
549
|
}
|
550
|
+
} else {
|
551
|
+
$_evd3tpfvjm0ofzck.open(a.href);
|
974
552
|
}
|
553
|
+
}
|
554
|
+
};
|
555
|
+
var openDialog = function (editor) {
|
556
|
+
return function () {
|
557
|
+
$_8kb7qsg1jm0ofzdg.open(editor);
|
975
558
|
};
|
976
|
-
|
977
|
-
|
978
|
-
|
979
|
-
|
980
|
-
};
|
981
|
-
};
|
982
|
-
|
983
|
-
var gotoSelectedLink = function (editor) {
|
984
|
-
return function () {
|
985
|
-
gotoLink(editor, getSelectedLink(editor));
|
986
|
-
};
|
559
|
+
};
|
560
|
+
var gotoSelectedLink = function (editor) {
|
561
|
+
return function () {
|
562
|
+
gotoLink(editor, getSelectedLink(editor));
|
987
563
|
};
|
988
|
-
|
989
|
-
|
990
|
-
|
991
|
-
|
992
|
-
|
993
|
-
|
994
|
-
|
995
|
-
|
996
|
-
|
997
|
-
|
998
|
-
return true;
|
999
|
-
}
|
564
|
+
};
|
565
|
+
var leftClickedOnAHref = function (editor) {
|
566
|
+
return function (elm) {
|
567
|
+
var sel, rng, node;
|
568
|
+
if ($_4b6xsbfujm0ofzch.hasContextToolbar(editor.settings) && !isContextMenuVisible(editor) && $_d522tkfzjm0ofzda.isLink(elm)) {
|
569
|
+
sel = editor.selection;
|
570
|
+
rng = sel.getRng();
|
571
|
+
node = rng.startContainer;
|
572
|
+
if (node.nodeType === 3 && sel.isCollapsed() && rng.startOffset > 0 && rng.startOffset < node.data.length) {
|
573
|
+
return true;
|
1000
574
|
}
|
1001
|
-
|
1002
|
-
|
575
|
+
}
|
576
|
+
return false;
|
1003
577
|
};
|
1004
|
-
|
1005
|
-
|
1006
|
-
|
1007
|
-
|
1008
|
-
|
1009
|
-
|
1010
|
-
|
1011
|
-
|
1012
|
-
|
1013
|
-
|
1014
|
-
|
1015
|
-
|
1016
|
-
|
1017
|
-
|
1018
|
-
|
1019
|
-
|
578
|
+
};
|
579
|
+
var setupGotoLinks = function (editor) {
|
580
|
+
editor.on('click', function (e) {
|
581
|
+
var link = getLink(editor, e.target);
|
582
|
+
if (link && global$1.metaKeyPressed(e)) {
|
583
|
+
e.preventDefault();
|
584
|
+
gotoLink(editor, link);
|
585
|
+
}
|
586
|
+
});
|
587
|
+
editor.on('keydown', function (e) {
|
588
|
+
var link = getSelectedLink(editor);
|
589
|
+
if (link && e.keyCode === 13 && hasOnlyAltModifier(e)) {
|
590
|
+
e.preventDefault();
|
591
|
+
gotoLink(editor, link);
|
592
|
+
}
|
593
|
+
});
|
594
|
+
};
|
595
|
+
var toggleActiveState = function (editor) {
|
596
|
+
return function () {
|
597
|
+
var self = this;
|
598
|
+
editor.on('nodechange', function (e) {
|
599
|
+
self.active(!editor.readonly && !!$_d522tkfzjm0ofzda.getAnchorElement(editor, e.element));
|
1020
600
|
});
|
1021
601
|
};
|
1022
|
-
|
1023
|
-
|
1024
|
-
|
1025
|
-
|
1026
|
-
|
1027
|
-
|
1028
|
-
|
1029
|
-
|
1030
|
-
};
|
1031
|
-
|
1032
|
-
var toggleViewLinkState = function (editor) {
|
1033
|
-
return function () {
|
1034
|
-
var self = this;
|
1035
|
-
|
1036
|
-
var toggleVisibility = function (e) {
|
1037
|
-
if (Utils.hasLinks(e.parents)) {
|
1038
|
-
self.show();
|
1039
|
-
} else {
|
1040
|
-
self.hide();
|
1041
|
-
}
|
1042
|
-
};
|
1043
|
-
|
1044
|
-
if (!Utils.hasLinks(editor.dom.getParents(editor.selection.getStart()))) {
|
602
|
+
};
|
603
|
+
var toggleViewLinkState = function (editor) {
|
604
|
+
return function () {
|
605
|
+
var self = this;
|
606
|
+
var toggleVisibility = function (e) {
|
607
|
+
if ($_d522tkfzjm0ofzda.hasLinks(e.parents)) {
|
608
|
+
self.show();
|
609
|
+
} else {
|
1045
610
|
self.hide();
|
1046
611
|
}
|
1047
|
-
|
1048
|
-
editor.on('nodechange', toggleVisibility);
|
1049
|
-
|
1050
|
-
self.on('remove', function () {
|
1051
|
-
editor.off('nodechange', toggleVisibility);
|
1052
|
-
});
|
1053
612
|
};
|
1054
|
-
|
1055
|
-
|
1056
|
-
return {
|
1057
|
-
openDialog: openDialog,
|
1058
|
-
gotoSelectedLink: gotoSelectedLink,
|
1059
|
-
leftClickedOnAHref: leftClickedOnAHref,
|
1060
|
-
setupGotoLinks: setupGotoLinks,
|
1061
|
-
toggleActiveState: toggleActiveState,
|
1062
|
-
toggleViewLinkState: toggleViewLinkState
|
1063
|
-
};
|
1064
|
-
}
|
1065
|
-
);
|
1066
|
-
/**
|
1067
|
-
* Commands.js
|
1068
|
-
*
|
1069
|
-
* Released under LGPL License.
|
1070
|
-
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
1071
|
-
*
|
1072
|
-
* License: http://www.tinymce.com/license
|
1073
|
-
* Contributing: http://www.tinymce.com/contributing
|
1074
|
-
*/
|
1075
|
-
|
1076
|
-
define(
|
1077
|
-
'tinymce.plugins.link.api.Commands',
|
1078
|
-
[
|
1079
|
-
'tinymce.plugins.link.core.Actions'
|
1080
|
-
],
|
1081
|
-
function (Actions) {
|
1082
|
-
var register = function (editor) {
|
1083
|
-
editor.addCommand('mceLink', Actions.openDialog(editor));
|
1084
|
-
};
|
1085
|
-
|
1086
|
-
return {
|
1087
|
-
register: register
|
1088
|
-
};
|
1089
|
-
}
|
1090
|
-
);
|
1091
|
-
|
1092
|
-
/**
|
1093
|
-
* Keyboard.js
|
1094
|
-
*
|
1095
|
-
* Released under LGPL License.
|
1096
|
-
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
1097
|
-
*
|
1098
|
-
* License: http://www.tinymce.com/license
|
1099
|
-
* Contributing: http://www.tinymce.com/contributing
|
1100
|
-
*/
|
1101
|
-
|
1102
|
-
define(
|
1103
|
-
'tinymce.plugins.link.core.Keyboard',
|
1104
|
-
[
|
1105
|
-
'tinymce.plugins.link.core.Actions'
|
1106
|
-
],
|
1107
|
-
function (Actions) {
|
1108
|
-
var setup = function (editor) {
|
1109
|
-
editor.addShortcut('Meta+K', '', Actions.openDialog(editor));
|
1110
|
-
};
|
1111
|
-
|
1112
|
-
return {
|
1113
|
-
setup: setup
|
1114
|
-
};
|
1115
|
-
}
|
1116
|
-
);
|
1117
|
-
|
1118
|
-
/**
|
1119
|
-
* Controls.js
|
1120
|
-
*
|
1121
|
-
* Released under LGPL License.
|
1122
|
-
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
1123
|
-
*
|
1124
|
-
* License: http://www.tinymce.com/license
|
1125
|
-
* Contributing: http://www.tinymce.com/contributing
|
1126
|
-
*/
|
1127
|
-
|
1128
|
-
define(
|
1129
|
-
'tinymce.plugins.link.ui.Controls',
|
1130
|
-
[
|
1131
|
-
'tinymce.plugins.link.core.Actions',
|
1132
|
-
'tinymce.plugins.link.core.Utils'
|
1133
|
-
],
|
1134
|
-
function (Actions, Utils) {
|
1135
|
-
|
1136
|
-
var setupButtons = function (editor) {
|
1137
|
-
editor.addButton('link', {
|
1138
|
-
active: false,
|
1139
|
-
icon: 'link',
|
1140
|
-
tooltip: 'Insert/edit link',
|
1141
|
-
onclick: Actions.openDialog(editor),
|
1142
|
-
onpostrender: Actions.toggleActiveState(editor)
|
1143
|
-
});
|
1144
|
-
|
1145
|
-
editor.addButton('unlink', {
|
1146
|
-
active: false,
|
1147
|
-
icon: 'unlink',
|
1148
|
-
tooltip: 'Remove link',
|
1149
|
-
onclick: Utils.unlink(editor),
|
1150
|
-
onpostrender: Actions.toggleActiveState(editor)
|
1151
|
-
});
|
1152
|
-
|
1153
|
-
if (editor.addContextToolbar) {
|
1154
|
-
editor.addButton('openlink', {
|
1155
|
-
icon: 'newtab',
|
1156
|
-
tooltip: 'Open link',
|
1157
|
-
onclick: Actions.gotoSelectedLink(editor)
|
1158
|
-
});
|
613
|
+
if (!$_d522tkfzjm0ofzda.hasLinks(editor.dom.getParents(editor.selection.getStart()))) {
|
614
|
+
self.hide();
|
1159
615
|
}
|
616
|
+
editor.on('nodechange', toggleVisibility);
|
617
|
+
self.on('remove', function () {
|
618
|
+
editor.off('nodechange', toggleVisibility);
|
619
|
+
});
|
1160
620
|
};
|
621
|
+
};
|
622
|
+
var $_c3czoyfsjm0ofzcd = {
|
623
|
+
openDialog: openDialog,
|
624
|
+
gotoSelectedLink: gotoSelectedLink,
|
625
|
+
leftClickedOnAHref: leftClickedOnAHref,
|
626
|
+
setupGotoLinks: setupGotoLinks,
|
627
|
+
toggleActiveState: toggleActiveState,
|
628
|
+
toggleViewLinkState: toggleViewLinkState
|
629
|
+
};
|
1161
630
|
|
1162
|
-
|
1163
|
-
|
1164
|
-
|
1165
|
-
|
1166
|
-
onclick: Actions.gotoSelectedLink(editor),
|
1167
|
-
onPostRender: Actions.toggleViewLinkState(editor),
|
1168
|
-
prependToContext: true
|
1169
|
-
});
|
631
|
+
var register = function (editor) {
|
632
|
+
editor.addCommand('mceLink', $_c3czoyfsjm0ofzcd.openDialog(editor));
|
633
|
+
};
|
634
|
+
var $_17rb7bfrjm0ofzcc = { register: register };
|
1170
635
|
|
1171
|
-
|
1172
|
-
|
1173
|
-
|
1174
|
-
|
1175
|
-
|
1176
|
-
|
1177
|
-
|
1178
|
-
|
636
|
+
var setup = function (editor) {
|
637
|
+
editor.addShortcut('Meta+K', '', $_c3czoyfsjm0ofzcd.openDialog(editor));
|
638
|
+
};
|
639
|
+
var $_bygts2g4jm0ofzdn = { setup: setup };
|
640
|
+
|
641
|
+
var setupButtons = function (editor) {
|
642
|
+
editor.addButton('link', {
|
643
|
+
active: false,
|
644
|
+
icon: 'link',
|
645
|
+
tooltip: 'Insert/edit link',
|
646
|
+
onclick: $_c3czoyfsjm0ofzcd.openDialog(editor),
|
647
|
+
onpostrender: $_c3czoyfsjm0ofzcd.toggleActiveState(editor)
|
648
|
+
});
|
649
|
+
editor.addButton('unlink', {
|
650
|
+
active: false,
|
651
|
+
icon: 'unlink',
|
652
|
+
tooltip: 'Remove link',
|
653
|
+
onclick: $_d522tkfzjm0ofzda.unlink(editor),
|
654
|
+
onpostrender: $_c3czoyfsjm0ofzcd.toggleActiveState(editor)
|
655
|
+
});
|
656
|
+
if (editor.addContextToolbar) {
|
657
|
+
editor.addButton('openlink', {
|
658
|
+
icon: 'newtab',
|
659
|
+
tooltip: 'Open link',
|
660
|
+
onclick: $_c3czoyfsjm0ofzcd.gotoSelectedLink(editor)
|
1179
661
|
});
|
1180
|
-
}
|
1181
|
-
|
1182
|
-
|
1183
|
-
|
1184
|
-
|
1185
|
-
|
1186
|
-
|
1187
|
-
|
1188
|
-
|
1189
|
-
};
|
662
|
+
}
|
663
|
+
};
|
664
|
+
var setupMenuItems = function (editor) {
|
665
|
+
editor.addMenuItem('openlink', {
|
666
|
+
text: 'Open link',
|
667
|
+
icon: 'newtab',
|
668
|
+
onclick: $_c3czoyfsjm0ofzcd.gotoSelectedLink(editor),
|
669
|
+
onPostRender: $_c3czoyfsjm0ofzcd.toggleViewLinkState(editor),
|
670
|
+
prependToContext: true
|
671
|
+
});
|
672
|
+
editor.addMenuItem('link', {
|
673
|
+
icon: 'link',
|
674
|
+
text: 'Link',
|
675
|
+
shortcut: 'Meta+K',
|
676
|
+
onclick: $_c3czoyfsjm0ofzcd.openDialog(editor),
|
677
|
+
stateSelector: 'a[href]',
|
678
|
+
context: 'insert',
|
679
|
+
prependToContext: true
|
680
|
+
});
|
681
|
+
editor.addMenuItem('unlink', {
|
682
|
+
icon: 'unlink',
|
683
|
+
text: 'Remove link',
|
684
|
+
onclick: $_d522tkfzjm0ofzda.unlink(editor),
|
685
|
+
stateSelector: 'a[href]'
|
686
|
+
});
|
687
|
+
};
|
688
|
+
var setupContextToolbars = function (editor) {
|
689
|
+
if (editor.addContextToolbar) {
|
690
|
+
editor.addContextToolbar($_c3czoyfsjm0ofzcd.leftClickedOnAHref(editor), 'openlink | link unlink');
|
691
|
+
}
|
692
|
+
};
|
693
|
+
var $_5nmf4sg5jm0ofzdp = {
|
694
|
+
setupButtons: setupButtons,
|
695
|
+
setupMenuItems: setupMenuItems,
|
696
|
+
setupContextToolbars: setupContextToolbars
|
697
|
+
};
|
1190
698
|
|
1191
|
-
|
1192
|
-
|
1193
|
-
|
1194
|
-
|
1195
|
-
|
699
|
+
global.add('link', function (editor) {
|
700
|
+
$_5nmf4sg5jm0ofzdp.setupButtons(editor);
|
701
|
+
$_5nmf4sg5jm0ofzdp.setupMenuItems(editor);
|
702
|
+
$_5nmf4sg5jm0ofzdp.setupContextToolbars(editor);
|
703
|
+
$_c3czoyfsjm0ofzcd.setupGotoLinks(editor);
|
704
|
+
$_17rb7bfrjm0ofzcc.register(editor);
|
705
|
+
$_bygts2g4jm0ofzdn.setup(editor);
|
706
|
+
});
|
707
|
+
function Plugin () {
|
1196
708
|
}
|
1197
|
-
);
|
1198
|
-
/**
|
1199
|
-
* Plugin.js
|
1200
|
-
*
|
1201
|
-
* Released under LGPL License.
|
1202
|
-
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
|
1203
|
-
*
|
1204
|
-
* License: http://www.tinymce.com/license
|
1205
|
-
* Contributing: http://www.tinymce.com/contributing
|
1206
|
-
*/
|
1207
709
|
|
1208
|
-
|
1209
|
-
'tinymce.plugins.link.Plugin',
|
1210
|
-
[
|
1211
|
-
'tinymce.core.PluginManager',
|
1212
|
-
'tinymce.plugins.link.api.Commands',
|
1213
|
-
'tinymce.plugins.link.core.Actions',
|
1214
|
-
'tinymce.plugins.link.core.Keyboard',
|
1215
|
-
'tinymce.plugins.link.ui.Controls'
|
1216
|
-
],
|
1217
|
-
function (PluginManager, Commands, Actions, Keyboard, Controls) {
|
1218
|
-
PluginManager.add('link', function (editor) {
|
1219
|
-
Controls.setupButtons(editor);
|
1220
|
-
Controls.setupMenuItems(editor);
|
1221
|
-
Controls.setupContextToolbars(editor);
|
1222
|
-
Actions.setupGotoLinks(editor);
|
1223
|
-
Commands.register(editor);
|
1224
|
-
Keyboard.setup(editor);
|
1225
|
-
});
|
710
|
+
return Plugin;
|
1226
711
|
|
1227
|
-
|
1228
|
-
}
|
1229
|
-
);
|
1230
|
-
dem('tinymce.plugins.link.Plugin')();
|
712
|
+
}());
|
1231
713
|
})();
|