tinymce-rails 4.9.11.1 → 5.0.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 +5 -6
- data/app/assets/source/tinymce/tinymce.js +14735 -15357
- data/lib/tinymce/rails/asset_installer/compile.rb +2 -2
- data/lib/tinymce/rails/asset_installer.rb +1 -1
- data/lib/tinymce/rails/asset_manifest.rb +4 -9
- data/lib/tinymce/rails/configuration.rb +2 -2
- data/lib/tinymce/rails/configuration_file.rb +3 -4
- data/lib/tinymce/rails/engine.rb +1 -5
- data/lib/tinymce/rails/helper.rb +1 -1
- data/lib/tinymce/rails/version.rb +2 -2
- data/vendor/assets/javascripts/tinymce/jquery.tinymce.js +92 -1
- data/vendor/assets/javascripts/tinymce/plugins/advlist/plugin.js +9 -1
- data/vendor/assets/javascripts/tinymce/plugins/anchor/plugin.js +9 -1
- data/vendor/assets/javascripts/tinymce/plugins/autolink/plugin.js +9 -1
- data/vendor/assets/javascripts/tinymce/plugins/autoresize/plugin.js +9 -1
- data/vendor/assets/javascripts/tinymce/plugins/autosave/plugin.js +9 -1
- data/vendor/assets/javascripts/tinymce/plugins/bbcode/plugin.js +9 -1
- data/vendor/assets/javascripts/tinymce/plugins/charmap/plugin.js +9 -1
- data/vendor/assets/javascripts/tinymce/plugins/code/plugin.js +9 -1
- data/vendor/assets/javascripts/tinymce/plugins/codesample/plugin.js +9 -1
- data/vendor/assets/javascripts/tinymce/plugins/colorpicker/plugin.js +9 -1
- data/vendor/assets/javascripts/tinymce/plugins/contextmenu/plugin.js +9 -1
- data/vendor/assets/javascripts/tinymce/plugins/directionality/plugin.js +9 -1
- data/vendor/assets/javascripts/tinymce/plugins/emoticons/js/emojis.js +2 -0
- data/vendor/assets/javascripts/tinymce/plugins/emoticons/plugin.js +9 -1
- data/vendor/assets/javascripts/tinymce/plugins/fullpage/plugin.js +9 -1
- data/vendor/assets/javascripts/tinymce/plugins/fullscreen/plugin.js +9 -1
- data/vendor/assets/javascripts/tinymce/plugins/help/plugin.js +9 -1
- data/vendor/assets/javascripts/tinymce/plugins/hr/plugin.js +9 -1
- data/vendor/assets/javascripts/tinymce/plugins/image/plugin.js +9 -1
- data/vendor/assets/javascripts/tinymce/plugins/imagetools/plugin.js +9 -1
- data/vendor/assets/javascripts/tinymce/plugins/importcss/plugin.js +9 -1
- data/vendor/assets/javascripts/tinymce/plugins/insertdatetime/plugin.js +9 -1
- data/vendor/assets/javascripts/tinymce/plugins/legacyoutput/plugin.js +9 -1
- data/vendor/assets/javascripts/tinymce/plugins/link/plugin.js +9 -1
- data/vendor/assets/javascripts/tinymce/plugins/lists/plugin.js +9 -1
- data/vendor/assets/javascripts/tinymce/plugins/media/plugin.js +9 -1
- data/vendor/assets/javascripts/tinymce/plugins/nonbreaking/plugin.js +9 -1
- data/vendor/assets/javascripts/tinymce/plugins/noneditable/plugin.js +9 -1
- data/vendor/assets/javascripts/tinymce/plugins/pagebreak/plugin.js +9 -1
- data/vendor/assets/javascripts/tinymce/plugins/paste/plugin.js +9 -1
- data/vendor/assets/javascripts/tinymce/plugins/preview/plugin.js +9 -1
- data/vendor/assets/javascripts/tinymce/plugins/print/plugin.js +9 -1
- data/vendor/assets/javascripts/tinymce/plugins/quickbars/plugin.js +9 -0
- data/vendor/assets/javascripts/tinymce/plugins/save/plugin.js +9 -1
- data/vendor/assets/javascripts/tinymce/plugins/searchreplace/plugin.js +9 -1
- data/vendor/assets/javascripts/tinymce/plugins/spellchecker/plugin.js +9 -1
- data/vendor/assets/javascripts/tinymce/plugins/tabfocus/plugin.js +9 -1
- data/vendor/assets/javascripts/tinymce/plugins/table/plugin.js +9 -1
- data/vendor/assets/javascripts/tinymce/plugins/template/plugin.js +9 -1
- data/vendor/assets/javascripts/tinymce/plugins/textcolor/plugin.js +9 -1
- data/vendor/assets/javascripts/tinymce/plugins/textpattern/plugin.js +9 -1
- data/vendor/assets/javascripts/tinymce/plugins/toc/plugin.js +9 -1
- data/vendor/assets/javascripts/tinymce/plugins/visualblocks/plugin.js +9 -1
- data/vendor/assets/javascripts/tinymce/plugins/visualchars/plugin.js +9 -1
- data/vendor/assets/javascripts/tinymce/plugins/wordcount/plugin.js +9 -1
- data/vendor/assets/javascripts/tinymce/skins/content/default/content.css +44 -0
- data/vendor/assets/javascripts/tinymce/skins/content/default/content.min.css +8 -0
- data/vendor/assets/javascripts/tinymce/skins/content/document/content.css +48 -0
- data/vendor/assets/javascripts/tinymce/skins/content/document/content.min.css +8 -0
- data/vendor/assets/javascripts/tinymce/skins/content/writer/content.css +45 -0
- data/vendor/assets/javascripts/tinymce/skins/content/writer/content.min.css +8 -0
- data/vendor/assets/javascripts/tinymce/skins/ui/oxide/content.inline.min.css +8 -0
- data/vendor/assets/javascripts/tinymce/skins/ui/oxide/content.min.css +8 -0
- data/vendor/assets/javascripts/tinymce/skins/ui/oxide/skin.min.css +8 -0
- data/vendor/assets/javascripts/tinymce/skins/ui/oxide/skin.mobile.min.css +2 -0
- data/vendor/assets/javascripts/tinymce/skins/ui/oxide-dark/content.inline.min.css +8 -0
- data/vendor/assets/javascripts/tinymce/skins/ui/oxide-dark/content.min.css +8 -0
- data/vendor/assets/javascripts/tinymce/skins/ui/oxide-dark/skin.min.css +8 -0
- data/vendor/assets/javascripts/tinymce/themes/mobile/theme.js +9 -1
- data/vendor/assets/javascripts/tinymce/themes/silver/theme.js +9 -0
- data/vendor/assets/javascripts/tinymce/tinymce.js +9 -2
- metadata +24 -46
- data/vendor/assets/config/tinymce-rails.manifest.js +0 -8
- data/vendor/assets/javascripts/tinymce/plugins/codesample/css/prism.css +0 -138
- data/vendor/assets/javascripts/tinymce/plugins/emoticons/img/smiley-cool.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/emoticons/img/smiley-cry.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/emoticons/img/smiley-embarassed.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/emoticons/img/smiley-foot-in-mouth.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/emoticons/img/smiley-frown.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/emoticons/img/smiley-innocent.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/emoticons/img/smiley-kiss.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/emoticons/img/smiley-laughing.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/emoticons/img/smiley-money-mouth.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/emoticons/img/smiley-sealed.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/emoticons/img/smiley-smile.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/emoticons/img/smiley-surprised.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/emoticons/img/smiley-tongue-out.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/emoticons/img/smiley-undecided.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/emoticons/img/smiley-wink.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/emoticons/img/smiley-yell.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/help/img/logo.png +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/visualblocks/css/visualblocks.css +0 -154
- data/vendor/assets/javascripts/tinymce/skins/lightgray/content.inline.min.css +0 -1
- data/vendor/assets/javascripts/tinymce/skins/lightgray/content.min.css +0 -1
- data/vendor/assets/javascripts/tinymce/skins/lightgray/fonts/tinymce-small.eot +0 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/fonts/tinymce-small.svg +0 -63
- data/vendor/assets/javascripts/tinymce/skins/lightgray/fonts/tinymce-small.ttf +0 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/fonts/tinymce-small.woff +0 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/fonts/tinymce.eot +0 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/fonts/tinymce.svg +0 -132
- data/vendor/assets/javascripts/tinymce/skins/lightgray/fonts/tinymce.ttf +0 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/fonts/tinymce.woff +0 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/img/anchor.gif +0 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/img/loader.gif +0 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/img/object.gif +0 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/img/trans.gif +0 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/skin.min.css +0 -1
- data/vendor/assets/javascripts/tinymce/skins/lightgray/skin.mobile.min.css +0 -2
- data/vendor/assets/javascripts/tinymce/themes/inlite/theme.js +0 -1
- data/vendor/assets/javascripts/tinymce/themes/modern/theme.js +0 -1
- /data/vendor/assets/javascripts/tinymce/skins/{lightgray → ui/oxide}/content.mobile.min.css +0 -0
- /data/vendor/assets/javascripts/tinymce/skins/{lightgray → ui/oxide}/fonts/tinymce-mobile.woff +0 -0
@@ -24,14 +24,14 @@ module TinyMCE
|
|
24
24
|
def symlink_asset(src, dest)
|
25
25
|
with_asset(src, dest) do |src, dest|
|
26
26
|
create_symlink(src, dest)
|
27
|
-
create_symlink("#{src}.gz", "#{dest}.gz") if File.
|
27
|
+
create_symlink("#{src}.gz", "#{dest}.gz") if File.exists?("#{src}.gz")
|
28
28
|
end
|
29
29
|
end
|
30
30
|
|
31
31
|
def create_symlink(src, dest)
|
32
32
|
target = File.basename(src)
|
33
33
|
|
34
|
-
unless File.
|
34
|
+
unless File.exists?(dest) && File.symlink?(dest) && File.readlink(dest) == target
|
35
35
|
logger.info "Creating symlink #{dest}"
|
36
36
|
FileUtils.ln_s(target, dest, :force => true)
|
37
37
|
else
|
@@ -6,7 +6,6 @@ module TinyMCE
|
|
6
6
|
def self.load(manifest_path)
|
7
7
|
JsonManifest.try(manifest_path, ".sprockets-manifest*.json") ||
|
8
8
|
JsonManifest.try(manifest_path, "manifest*.json") ||
|
9
|
-
JsonManifest.try(manifest_path) ||
|
10
9
|
YamlManifest.try(manifest_path) ||
|
11
10
|
NullManifest.new
|
12
11
|
end
|
@@ -38,7 +37,7 @@ module TinyMCE
|
|
38
37
|
class YamlManifest < AssetManifest
|
39
38
|
def self.try(manifest_path)
|
40
39
|
yaml_file = File.join(manifest_path, "manifest.yml")
|
41
|
-
new(yaml_file) if File.
|
40
|
+
new(yaml_file) if File.exists?(yaml_file)
|
42
41
|
end
|
43
42
|
|
44
43
|
def initialize(file)
|
@@ -76,13 +75,9 @@ module TinyMCE
|
|
76
75
|
end
|
77
76
|
|
78
77
|
class JsonManifest < AssetManifest
|
79
|
-
def self.try(manifest_path, pattern
|
80
|
-
|
81
|
-
|
82
|
-
new(paths.first) if paths.any?
|
83
|
-
elsif File.file?(manifest_path)
|
84
|
-
new(manifest_path)
|
85
|
-
end
|
78
|
+
def self.try(manifest_path, pattern)
|
79
|
+
paths = Dir[File.join(manifest_path, pattern)]
|
80
|
+
new(paths.first) if paths.any?
|
86
81
|
end
|
87
82
|
|
88
83
|
def initialize(file)
|
@@ -14,7 +14,7 @@ module TinyMCE::Rails
|
|
14
14
|
}
|
15
15
|
end
|
16
16
|
|
17
|
-
FUNCTION_REGEX = /^function\s*\(
|
17
|
+
FUNCTION_REGEX = /^function\s*\(/
|
18
18
|
RELATIVE_PATH_REGEX = /^(\/|\.{1,2})\S*/
|
19
19
|
|
20
20
|
COMMA = ",".freeze
|
@@ -47,7 +47,7 @@ module TinyMCE::Rails
|
|
47
47
|
# Check for files provided in the content_css option to replace them with their actual path.
|
48
48
|
# If no corresponding stylesheet is found for a file, it will remain unchanged.
|
49
49
|
"content_css" => ->(value) {
|
50
|
-
helpers = ActionView::Base.new
|
50
|
+
helpers = ActionView::Base.new
|
51
51
|
separator = OPTION_SEPARATORS["content_css"]
|
52
52
|
|
53
53
|
value.split(separator).map { |file|
|
@@ -25,13 +25,13 @@ module TinyMCE::Rails
|
|
25
25
|
end
|
26
26
|
|
27
27
|
def last_updated
|
28
|
-
File.
|
28
|
+
File.exists?(path) && File.mtime(path)
|
29
29
|
end
|
30
30
|
|
31
31
|
def load_configuration
|
32
32
|
@last_loaded = last_updated
|
33
33
|
|
34
|
-
return Configuration.new_with_defaults if !File.
|
34
|
+
return Configuration.new_with_defaults if !File.exists?(path)
|
35
35
|
|
36
36
|
options = load_yaml(path)
|
37
37
|
|
@@ -43,8 +43,7 @@ module TinyMCE::Rails
|
|
43
43
|
end
|
44
44
|
|
45
45
|
def load_yaml(path)
|
46
|
-
|
47
|
-
YAML.respond_to?(:unsafe_load) ? YAML.unsafe_load(result) : YAML.load(result)
|
46
|
+
YAML::load(ERB.new(IO.read(path)).result)
|
48
47
|
end
|
49
48
|
end
|
50
49
|
end
|
data/lib/tinymce/rails/engine.rb
CHANGED
@@ -14,11 +14,7 @@ module TinyMCE::Rails
|
|
14
14
|
config.tinymce.install = :compile
|
15
15
|
|
16
16
|
initializer "precompile", :group => :all do |app|
|
17
|
-
if config.tinymce.install == :compile
|
18
|
-
app.config.assets.precompile << "tinymce-rails.manifest.js" # Sprockets 4 manifest
|
19
|
-
app.config.assets.precompile << "tinymce/*" # Sprockets 3
|
20
|
-
end
|
21
|
-
|
17
|
+
app.config.assets.precompile << "tinymce/*" if config.tinymce.install == :compile
|
22
18
|
app.config.assets.precompile << "tinymce.js"
|
23
19
|
end
|
24
20
|
|
data/lib/tinymce/rails/helper.rb
CHANGED
@@ -16,7 +16,7 @@ module TinyMCE::Rails
|
|
16
16
|
# @example
|
17
17
|
# <%= tinymce(selector: "editorClass", theme: "inlite") %>
|
18
18
|
def tinymce(config=:default, options={})
|
19
|
-
javascript_tag
|
19
|
+
javascript_tag do
|
20
20
|
unless @_tinymce_configurations_added
|
21
21
|
concat tinymce_configurations_javascript
|
22
22
|
concat "\n"
|
@@ -1 +1,92 @@
|
|
1
|
-
|
1
|
+
/**
|
2
|
+
* Copyright (c) Tiny Technologies, Inc. All rights reserved.
|
3
|
+
* Licensed under the LGPL or a commercial license.
|
4
|
+
* For LGPL see License.txt in the project root for license information.
|
5
|
+
* For commercial licenses see https://www.tiny.cloud/
|
6
|
+
*/
|
7
|
+
/**
|
8
|
+
* Jquery integration plugin.
|
9
|
+
*
|
10
|
+
* @class tinymce.core.JqueryIntegration
|
11
|
+
* @private
|
12
|
+
*/
|
13
|
+
!function(){var f,c,u,p,d,s=[];d="undefined"!=typeof global?global:window,p=d.jQuery;var v=function(){
|
14
|
+
// Reference to tinymce needs to be lazily evaluated since tinymce
|
15
|
+
// might be loaded through the compressor or other means
|
16
|
+
return d.tinymce};p.fn.tinymce=function(o){var e,t,i,l=this,r="";
|
17
|
+
// No match then just ignore the call
|
18
|
+
if(!l.length)return l;
|
19
|
+
// Get editor instance
|
20
|
+
if(!o)return v()?v().get(l[0].id):null;l.css("visibility","hidden");// Hide textarea to avoid flicker
|
21
|
+
var n=function(){var a=[],c=0;
|
22
|
+
// Apply patches to the jQuery object, only once
|
23
|
+
u||(m(),u=!0),
|
24
|
+
// Create an editor instance for each matched node
|
25
|
+
l.each(function(e,t){var n,i=t.id,r=o.oninit;
|
26
|
+
// Generate unique id for target element if needed
|
27
|
+
i||(t.id=i=v().DOM.uniqueId()),
|
28
|
+
// Only init the editor once
|
29
|
+
v().get(i)||(
|
30
|
+
// Create editor instance and render it
|
31
|
+
n=v().createEditor(i,o),a.push(n),n.on("init",function(){var e,t=r;l.css("visibility",""),
|
32
|
+
// Run this if the oninit setting is defined
|
33
|
+
// this logic will fire the oninit callback ones each
|
34
|
+
// matched editor instance is initialized
|
35
|
+
r&&++c==a.length&&("string"==typeof t&&(e=-1===t.indexOf(".")?null:v().resolve(t.replace(/\.\w+$/,"")),t=v().resolve(t)),
|
36
|
+
// Call the oninit function with the object
|
37
|
+
t.apply(e||v(),a))}))}),
|
38
|
+
// Render the editor instances in a separate loop since we
|
39
|
+
// need to have the full editors array used in the onInit calls
|
40
|
+
p.each(a,function(e,t){t.render()})};
|
41
|
+
// Load TinyMCE on demand, if we need to
|
42
|
+
if(d.tinymce||c||!(e=o.script_url))
|
43
|
+
// Delay the init call until tinymce is loaded
|
44
|
+
1===c?s.push(n):n();else{c=1,t=e.substring(0,e.lastIndexOf("/")),
|
45
|
+
// Check if it's a dev/src version they want to load then
|
46
|
+
// make sure that all plugins, themes etc are loaded in source mode as well
|
47
|
+
-1!=e.indexOf(".min")&&(r=".min"),
|
48
|
+
// Setup tinyMCEPreInit object this will later be used by the TinyMCE
|
49
|
+
// core script to locate other resources like CSS files, dialogs etc
|
50
|
+
// You can also predefined a tinyMCEPreInit object and then it will use that instead
|
51
|
+
d.tinymce=d.tinyMCEPreInit||{base:t,suffix:r},
|
52
|
+
// url contains gzip then we assume it's a compressor
|
53
|
+
-1!=e.indexOf("gzip")&&(i=o.language||"en",e=e+(/\?/.test(e)?"&":"?")+"js=true&core=true&suffix="+escape(r)+"&themes="+escape(o.theme||"modern")+"&plugins="+escape(o.plugins||"")+"&languages="+(i||""),
|
54
|
+
// Check if compressor script is already loaded otherwise setup a basic one
|
55
|
+
d.tinyMCE_GZ||(d.tinyMCE_GZ={start:function(){var n=function(e){v().ScriptLoader.markDone(v().baseURI.toAbsolute(e))};
|
56
|
+
// Add core languages
|
57
|
+
n("langs/"+i+".js"),
|
58
|
+
// Add themes with languages
|
59
|
+
n("themes/"+o.theme+"/theme"+r+".js"),n("themes/"+o.theme+"/langs/"+i+".js"),
|
60
|
+
// Add plugins with languages
|
61
|
+
p.each(o.plugins.split(","),function(e,t){t&&(n("plugins/"+t+"/plugin"+r+".js"),n("plugins/"+t+"/langs/"+i+".js"))})},end:function(){}}));var a=document.createElement("script");a.type="text/javascript",a.onload=a.onreadystatechange=function(e){e=e||window.event,2===c||"load"!=e.type&&!/complete|loaded/.test(a.readyState)||(v().dom.Event.domLoaded=1,c=2,
|
62
|
+
// Execute callback after mainscript has been loaded and before the initialization occurs
|
63
|
+
o.script_loaded&&o.script_loaded(),n(),p.each(s,function(e,t){t()}))},a.src=e,document.body.appendChild(a)}return l},
|
64
|
+
// Add :tinymce pseudo selector this will select elements that has been converted into editor instances
|
65
|
+
// it's now possible to use things like $('*:tinymce') to get all TinyMCE bound elements.
|
66
|
+
p.extend(p.expr[":"],{tinymce:function(e){var t;return!!(e.id&&"tinymce"in d&&(t=v().get(e.id))&&t.editorManager===v())}});
|
67
|
+
// This function patches internal jQuery functions so that if
|
68
|
+
// you for example remove an div element containing an editor it's
|
69
|
+
// automatically destroyed by the TinyMCE API
|
70
|
+
var m=function(){
|
71
|
+
// Removes any child editor instances by looking for editor wrapper elements
|
72
|
+
var r=function(e){
|
73
|
+
// If the function is remove
|
74
|
+
"remove"===e&&this.each(function(e,t){var n=l(t);n&&n.remove()}),this.find("span.mceEditor,div.mceEditor").each(function(e,t){var n=v().get(t.id.replace(/_parent$/,""));n&&n.remove()})},o=function(i){var e,t=this;
|
75
|
+
// Handle set value
|
76
|
+
/*jshint eqnull:true */if(null!=i)r.call(t),
|
77
|
+
// Saves the contents before get/set value of textarea/div
|
78
|
+
t.each(function(e,t){var n;(n=v().get(t.id))&&n.setContent(i)});else if(0<t.length&&(e=v().get(t[0].id)))return e.getContent()},l=function(e){var t=null;return e&&e.id&&d.tinymce&&(t=v().get(e.id)),t},u=function(e){return!!(e&&e.length&&d.tinymce&&e.is(":tinymce"))},s={};
|
79
|
+
// Loads or saves contents from/to textarea if the value
|
80
|
+
// argument is defined it will set the TinyMCE internal contents
|
81
|
+
// Patch some setter/getter functions these will
|
82
|
+
// now be able to set/get the contents of editor instances for
|
83
|
+
// example $('#editorid').html('Content'); will update the TinyMCE iframe instance
|
84
|
+
p.each(["text","html","val"],function(e,t){var a=s[t]=p.fn[t],c="text"===t;p.fn[t]=function(e){var t=this;if(!u(t))return a.apply(t,arguments);if(e!==f)return o.call(t.filter(":tinymce"),e),a.apply(t.not(":tinymce"),arguments),t;// return original set for chaining
|
85
|
+
var i="",r=arguments;return(c?t:t.eq(0)).each(function(e,t){var n=l(t);i+=n?c?n.getContent().replace(/<(?:"[^"]*"|'[^']*'|[^'">])*>/g,""):n.getContent({save:!0}):a.apply(p(t),r)}),i}}),
|
86
|
+
// Makes it possible to use $('#id').append("content"); to append contents to the TinyMCE editor iframe
|
87
|
+
p.each(["append","prepend"],function(e,t){var n=s[t]=p.fn[t],r="prepend"===t;p.fn[t]=function(i){var e=this;return u(e)?i!==f?("string"==typeof i&&e.filter(":tinymce").each(function(e,t){var n=l(t);n&&n.setContent(r?i+n.getContent():n.getContent()+i)}),n.apply(e.not(":tinymce"),arguments),e):void 0:n.apply(e,arguments)}}),
|
88
|
+
// Makes sure that the editor instance gets properly destroyed when the parent element is removed
|
89
|
+
p.each(["remove","replaceWith","replaceAll","empty"],function(e,t){var n=s[t]=p.fn[t];p.fn[t]=function(){return r.call(this,t),n.apply(this,arguments)}}),s.attr=p.fn.attr,
|
90
|
+
// Makes sure that $('#tinymce_id').attr('value') gets the editors current HTML contents
|
91
|
+
p.fn.attr=function(e,t){var n=this,i=arguments;if(!e||"value"!==e||!u(n))return s.attr.apply(n,i);if(t!==f)return o.call(n.filter(":tinymce"),t),s.attr.apply(n.not(":tinymce"),i),n;// return original set for chaining
|
92
|
+
var r=n[0],a=l(r);return a?a.getContent({save:!0}):s.attr.apply(p(r),i)}}}();
|
@@ -1 +1,9 @@
|
|
1
|
-
|
1
|
+
/**
|
2
|
+
* Copyright (c) Tiny Technologies, Inc. All rights reserved.
|
3
|
+
* Licensed under the LGPL or a commercial license.
|
4
|
+
* For LGPL see License.txt in the project root for license information.
|
5
|
+
* For commercial licenses see https://www.tiny.cloud/
|
6
|
+
*
|
7
|
+
* Version: 5.0.0-1 (2019-02-04)
|
8
|
+
*/
|
9
|
+
!function(){"use strict";var n,t,e,r,o=tinymce.util.Tools.resolve("tinymce.PluginManager"),v=tinymce.util.Tools.resolve("tinymce.util.Tools"),O=function(n,t,e){var r="UL"===t?"InsertUnorderedList":"InsertOrderedList";n.execCommand(r,!1,!1===e?null:{"list-style-type":e})},u=function(e){e.addCommand("ApplyUnorderedListStyle",function(n,t){O(e,"UL",t["list-style-type"])}),e.addCommand("ApplyOrderedListStyle",function(n,t){O(e,"OL",t["list-style-type"])})},i=function(n){var t=n.getParam("advlist_number_styles","default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman");return t?t.split(/[ ,]/):[]},l=function(n){var t=n.getParam("advlist_bullet_styles","default,circle,square");return t?t.split(/[ ,]/):[]},c=function(n){return function(){return n}},f=c(!1),s=c(!0),a=f,d=s,g=function(){return p},p=(r={fold:function(n,t){return n()},is:a,isSome:a,isNone:d,getOr:e=function(n){return n},getOrThunk:t=function(n){return n()},getOrDie:function(n){throw new Error(n||"error: getOrDie called on none.")},getOrNull:function(){return null},getOrUndefined:function(){return undefined},or:e,orThunk:t,map:g,ap:g,each:function(){},bind:g,flatten:g,exists:a,forall:d,filter:g,equals:n=function(n){return n.isNone()},equals_:n,toArray:function(){return[]},toString:c("none()")},Object.freeze&&Object.freeze(r),r),m=function(e){var n=function(){return e},t=function(){return o},r=function(n){return n(e)},o={fold:function(n,t){return t(e)},is:function(n){return e===n},isSome:d,isNone:a,getOr:n,getOrThunk:n,getOrDie:n,getOrNull:n,getOrUndefined:n,or:t,orThunk:t,map:function(n){return m(n(e))},ap:function(n){return n.fold(g,function(n){return m(n(e))})},each:function(n){n(e)},bind:r,flatten:n,exists:r,forall:r,filter:function(n){return n(e)?o:p},equals:function(n){return n.is(e)},equals_:function(n,t){return n.fold(a,function(n){return t(e,n)})},toArray:function(){return[e]},toString:function(){return"some("+e+")"}};return o},y=function(n){return null===n||n===undefined?p:m(n)},h=function(n){return n&&/^(TH|TD)$/.test(n.nodeName)},L=function(r){return function(n){return n&&/^(OL|UL|DL)$/.test(n.nodeName)&&(e=n,(t=r).$.contains(t.getBody(),e));var t,e}},b=function(n){var t=n.dom.getParent(n.selection.getNode(),"ol,ul"),e=n.dom.getStyle(t,"listStyleType");return y(e)},S=function(n,t,e){var r=function(n,t){for(var e=0;e<n.length;e++)if(t(n[e]))return e;return-1}(t.parents,h),o=-1!==r?t.parents.slice(0,r):t.parents,u=v.grep(o,L(n));return 0<u.length&&u[0].nodeName===e},T=function(n,t,e,r,o,u){var i,l,c,f,s,a,d,g,p,m,y;0<u.length?(d=t,g=e,p=r,m=o,y=u,(a=n).ui.registry.addSplitButton(d,{tooltip:g,icon:"OL"===m?"ordered-list":"unordered-list",presets:"toolbar",columns:3,fetch:function(n){n(v.map(y,function(n){var t="OL"===m?"num":"bull",e="disc"===n||"decimal"===n?"default":n,r="default"===n?"":n,o=n.replace(/\-/g," ").replace(/\b\w/g,function(n){return n.toUpperCase()});return{type:"choiceitem",value:r,icon:"list-"+t+"-"+e,text:o,ariaLabel:o}}))},onAction:function(){return a.execCommand(p)},onItemAction:function(n,t){O(a,m,t)},select:function(t){return b(a).map(function(n){return t===n}).getOr(!1)},onSetup:function(t){var n=function(n){t.setActive(S(a,n,m))};return a.on("nodeChange",n),function(){return a.off("nodeChange",n)}}})):(l=t,c=e,f=r,s=o,(i=n).ui.registry.addToggleButton(l,{active:!1,tooltip:c,icon:"OL"===s?"ordered-list":"unordered-list",onSetup:function(t){var n=function(n){t.setActive(S(i,n,s))};return i.on("nodeChange",n),function(){return i.off("nodeChange",n)}},onAction:function(){return i.execCommand(f)}}))},A=function(n){T(n,"numlist","Numbered list","InsertOrderedList","OL",i(n)),T(n,"bullist","Bullet list","InsertUnorderedList","UL",l(n))};o.add("advlist",function(n){var t,e,r;e="lists",r=(t=n).settings.plugins?t.settings.plugins:"",-1!==v.inArray(r.split(/[ ,]/),e)&&(A(n),u(n))}),function C(){}}();
|
@@ -1 +1,9 @@
|
|
1
|
-
|
1
|
+
/**
|
2
|
+
* Copyright (c) Tiny Technologies, Inc. All rights reserved.
|
3
|
+
* Licensed under the LGPL or a commercial license.
|
4
|
+
* For LGPL see License.txt in the project root for license information.
|
5
|
+
* For commercial licenses see https://www.tiny.cloud/
|
6
|
+
*
|
7
|
+
* Version: 5.0.0-1 (2019-02-04)
|
8
|
+
*/
|
9
|
+
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),a=function(e){return/^[A-Za-z][A-Za-z0-9\-:._]*$/.test(e)},t=function(e){var t=e.selection.getNode();return"A"===t.tagName&&""===e.dom.getAttrib(t,"href")?t.getAttribute("id")||t.getAttribute("name"):""},r=function(e,t){var n=e.selection.getNode();"A"===n.tagName&&""===e.dom.getAttrib(n,"href")?(n.removeAttribute("name"),n.id=t,e.undoManager.add()):(e.focus(),e.selection.collapse(!0),e.execCommand("mceInsertContent",!1,e.dom.createHTML("a",{id:t})))},n=function(o){var e=t(o);o.windowManager.open({title:"Anchor",size:"normal",body:{type:"panel",items:[{name:"id",type:"input",label:"ID",placeholder:"example"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:{id:e},onSubmit:function(e){var t,n;t=o,n=e.getData().id,(a(n)?(r(t,n),0):(t.windowManager.alert("Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores."),1))||e.close()}})},o=function(e){e.addCommand("mceAnchor",function(){n(e)})},i=function(o){return function(e){for(var t=0;t<e.length;t++)(n=e[t]).attr("href")||!n.attr("id")&&!n.attr("name")||n.firstChild||e[t].attr("contenteditable",o);var n}},c=function(e){e.on("PreInit",function(){e.parser.addNodeFilter("a",i("false")),e.serializer.addNodeFilter("a",i(null))})},d=function(t){t.ui.registry.addToggleButton("anchor",{icon:"bookmark",tooltip:"Anchor",onAction:function(){return t.execCommand("mceAnchor")},onSetup:function(e){return t.selection.selectorChangedWithUnbind("a:not([href])",e.setActive).unbind}}),t.ui.registry.addMenuItem("anchor",{icon:"bookmark",text:"Anchor...",onAction:function(){return t.execCommand("mceAnchor")}})};e.add("anchor",function(e){c(e),o(e),d(e)}),function u(){}}();
|
@@ -1 +1,9 @@
|
|
1
|
-
|
1
|
+
/**
|
2
|
+
* Copyright (c) Tiny Technologies, Inc. All rights reserved.
|
3
|
+
* Licensed under the LGPL or a commercial license.
|
4
|
+
* For LGPL see License.txt in the project root for license information.
|
5
|
+
* For commercial licenses see https://www.tiny.cloud/
|
6
|
+
*
|
7
|
+
* Version: 5.0.0-1 (2019-02-04)
|
8
|
+
*/
|
9
|
+
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),i=tinymce.util.Tools.resolve("tinymce.Env"),m=function(e){return e.getParam("autolink_pattern",/^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|(?:mailto:)?[A-Z0-9._%+\-]+@)(.+)$/i)},y=function(e){return e.getParam("default_link_target","")},o=function(e,t){if(t<0&&(t=0),3===e.nodeType){var n=e.data.length;n<t&&(t=n)}return t},k=function(e,t,n){1!==t.nodeType||t.hasChildNodes()?e.setStart(t,o(t,n)):e.setStartBefore(t)},p=function(e,t,n){1!==t.nodeType||t.hasChildNodes()?e.setEnd(t,o(t,n)):e.setEndAfter(t)},r=function(e,t,n){var i,o,r,a,f,s,d,l,c,u,g=m(e),h=y(e);if("A"!==e.selection.getNode().tagName){if((i=e.selection.getRng(!0).cloneRange()).startOffset<5){if(!(l=i.endContainer.previousSibling)){if(!i.endContainer.firstChild||!i.endContainer.firstChild.nextSibling)return;l=i.endContainer.firstChild.nextSibling}if(c=l.length,k(i,l,c),p(i,l,c),i.endOffset<5)return;o=i.endOffset,a=l}else{if(3!==(a=i.endContainer).nodeType&&a.firstChild){for(;3!==a.nodeType&&a.firstChild;)a=a.firstChild;3===a.nodeType&&(k(i,a,0),p(i,a,a.nodeValue.length))}o=1===i.endOffset?2:i.endOffset-1-t}for(r=o;k(i,a,2<=o?o-2:0),p(i,a,1<=o?o-1:0),o-=1," "!==(u=i.toString())&&""!==u&&160!==u.charCodeAt(0)&&0<=o-2&&u!==n;);var C;(C=i.toString())===n||" "===C||160===C.charCodeAt(0)?(k(i,a,o),p(i,a,r),o+=1):(0===i.startOffset?k(i,a,0):k(i,a,o),p(i,a,r)),"."===(s=i.toString()).charAt(s.length-1)&&p(i,a,r-1),(d=(s=i.toString().trim()).match(g))&&("www."===d[1]?d[1]="http://www.":/@$/.test(d[1])&&!/^mailto:/.test(d[1])&&(d[1]="mailto:"+d[1]),f=e.selection.getBookmark(),e.selection.setRng(i),e.execCommand("createlink",!1,d[1]+d[2]),h&&e.dom.setAttrib(e.selection.getNode(),"target",h),e.selection.moveToBookmark(f),e.nodeChanged())}},t=function(t){var n;t.on("keydown",function(e){13!==e.keyCode||r(t,-1,"")}),i.ie?t.on("focus",function(){if(!n){n=!0;try{t.execCommand("AutoUrlDetect",!1,!0)}catch(e){}}}):(t.on("keypress",function(e){41!==e.keyCode||r(t,-1,"(")}),t.on("keyup",function(e){32!==e.keyCode||r(t,0,"")}))};e.add("autolink",function(e){t(e)}),function n(){}}();
|
@@ -1 +1,9 @@
|
|
1
|
-
|
1
|
+
/**
|
2
|
+
* Copyright (c) Tiny Technologies, Inc. All rights reserved.
|
3
|
+
* Licensed under the LGPL or a commercial license.
|
4
|
+
* For LGPL see License.txt in the project root for license information.
|
5
|
+
* For commercial licenses see https://www.tiny.cloud/
|
6
|
+
*
|
7
|
+
* Version: 5.0.0-1 (2019-02-04)
|
8
|
+
*/
|
9
|
+
!function(){"use strict";var i=function(e){var t=e,n=function(){return t};return{get:n,set:function(e){t=e},clone:function(){return i(n())}}},e=tinymce.util.Tools.resolve("tinymce.PluginManager"),m=tinymce.util.Tools.resolve("tinymce.Env"),r=tinymce.util.Tools.resolve("tinymce.util.Delay"),d=function(e){return e.getParam("min_height",e.getElement().offsetHeight,"number")},h=function(e){return e.getParam("max_height",0,"number")},o=function(e){return e.getParam("autoresize_overflow_padding",1,"number")},u=function(e){return e.getParam("autoresize_bottom_margin",50,"number")},a=function(e){return e.getParam("autoresize_on_init",!0,"boolean")},s=function(e,t,n,i,o){r.setEditorTimeout(e,function(){p(e,t),n--?s(e,t,n,i,o):o&&o()},i)},v=function(e,t){var n=e.getBody();n&&(n.style.overflowY=t?"":"hidden",t||(n.scrollTop=0))},y=function(e,t,n,i){var o=parseInt(e.getStyle(t,n,i),10);return isNaN(o)?0:o},p=function(e,t){var n,i,o,r=e.dom,u=e.getDoc();if(u)if((a=e).plugins.fullscreen&&a.plugins.fullscreen.isFullscreen())v(e,!0);else{var a,s=u.body;i=d(e);var c=y(r,s,"margin-top",!0),f=y(r,s,"margin-bottom",!0);(o=s.offsetHeight+c+f)<0&&(o=0);var g=e.getContainer().offsetHeight-e.getContentAreaContainer().offsetHeight;o+g>d(e)&&(i=o+g);var l=h(e);l&&l<i?(i=l,v(e,!0)):v(e,!1),i!==t.get()&&(n=i-t.get(),r.setStyle(e.getContainer(),"height",i+"px"),t.set(i),m.webkit&&n<0&&p(e,t))}},n={setup:function(n,t){n.on("init",function(){var e=o(n),t=u(n);n.dom.setStyles(n.getBody(),{paddingLeft:e,paddingRight:e,paddingBottom:t,"min-height":0})}),n.on("nodechange setcontent keyup FullscreenStateChanged",function(e){p(n,t)}),a(n)&&n.on("init",function(){s(n,t,20,100,function(){s(n,t,5,1e3)})})},resize:p},c=function(e,t){e.addCommand("mceAutoResize",function(){n.resize(e,t)})};e.add("autoresize",function(e){if(e.settings.hasOwnProperty("resize")||(e.settings.resize=!1),!e.inline){var t=i(0);c(e,t),n.setup(e,t)}}),function t(){}}();
|
@@ -1 +1,9 @@
|
|
1
|
-
|
1
|
+
/**
|
2
|
+
* Copyright (c) Tiny Technologies, Inc. All rights reserved.
|
3
|
+
* Licensed under the LGPL or a commercial license.
|
4
|
+
* For LGPL see License.txt in the project root for license information.
|
5
|
+
* For commercial licenses see https://www.tiny.cloud/
|
6
|
+
*
|
7
|
+
* Version: 5.0.0-1 (2019-02-04)
|
8
|
+
*/
|
9
|
+
!function(){"use strict";var o=function(t){var e=t,r=function(){return e};return{get:r,set:function(t){e=t},clone:function(){return o(r())}}},t=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=tinymce.util.Tools.resolve("tinymce.util.LocalStorage"),a=tinymce.util.Tools.resolve("tinymce.util.Tools"),i=function(t,e){var r=t||e,n=/^(\d+)([ms]?)$/.exec(""+r);return(n[2]?{s:1e3,m:6e4}[n[2]]:1)*parseInt(r,10)},u=function(t){var e=t.getParam("autosave_prefix","tinymce-autosave-{path}{query}{hash}-{id}-");return e=(e=(e=(e=e.replace(/\{path\}/g,document.location.pathname)).replace(/\{query\}/g,document.location.search)).replace(/\{hash\}/g,document.location.hash)).replace(/\{id\}/g,t.id)},s=function(t,e){var r=t.settings.forced_root_block;return""===(e=a.trim(void 0===e?t.getBody().innerHTML:e))||new RegExp("^<"+r+"[^>]*>((\xa0| |[ \t]|<br[^>]*>)+?|)</"+r+">|<br>$","i").test(e)},f=function(t){var e=parseInt(n.getItem(u(t)+"time"),10)||0;return!((new Date).getTime()-e>i(t.settings.autosave_retention,"20m")&&(c(t,!1),1))},c=function(t,e){var r=u(t);n.removeItem(r+"draft"),n.removeItem(r+"time"),!1!==e&&t.fire("RemoveDraft")},l=function(t){var e=u(t);!s(t)&&t.isDirty()&&(n.setItem(e+"draft",t.getContent({format:"raw",no_events:!0})),n.setItem(e+"time",(new Date).getTime().toString()),t.fire("StoreDraft"))},m=function(t){var e=u(t);f(t)&&(t.setContent(n.getItem(e+"draft"),{format:"raw"}),t.fire("RestoreDraft"))},v=function(t,e){var r=i(t.settings.autosave_interval,"30s");e.get()||(setInterval(function(){t.removed||l(t)},r),e.set(!0))},d=function(t){t.undoManager.transact(function(){m(t),c(t)}),t.focus()};function g(n){for(var o=[],t=1;t<arguments.length;t++)o[t-1]=arguments[t];return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=o.concat(t);return n.apply(null,r)}}var y=tinymce.util.Tools.resolve("tinymce.EditorManager");y._beforeUnloadHandler=function(){var e;return a.each(y.get(),function(t){t.plugins.autosave&&t.plugins.autosave.storeDraft(),!e&&t.isDirty()&&t.getParam("autosave_ask_before_unload",!0)&&(e=t.translate("You have unsaved changes are you sure you want to navigate away?"))}),e};var p=function(r,t){return function(t){t.setDisabled(!f(r));var e=function(){return t.setDisabled(!f(r))};return r.on("StoreDraft RestoreDraft RemoveDraft",e),function(){return r.off("StoreDraft RestoreDraft RemoveDraft",e)}}};t.add("autosave",function(t){var e,r,n=o(!1);return window.onbeforeunload=y._beforeUnloadHandler,v(e=t,n),e.ui.registry.addButton("restoredraft",{tooltip:"Restore last draft",icon:"restore-draft",onAction:function(){d(e)},onSetup:p(e)}),e.ui.registry.addMenuItem("restoredraft",{text:"Restore last draft",icon:"restore-draft",onAction:function(){d(e)},onSetup:p(e)}),t.on("init",function(){t.getParam("autosave_restore_when_empty",!1)&&t.dom.isEmpty(t.getBody())&&m(t)}),{hasDraft:g(f,r=t),storeDraft:g(l,r),restoreDraft:g(m,r),removeDraft:g(c,r),isEmpty:g(s,r)}}),function e(){}}();
|
@@ -1 +1,9 @@
|
|
1
|
-
|
1
|
+
/**
|
2
|
+
* Copyright (c) Tiny Technologies, Inc. All rights reserved.
|
3
|
+
* Licensed under the LGPL or a commercial license.
|
4
|
+
* For LGPL see License.txt in the project root for license information.
|
5
|
+
* For commercial licenses see https://www.tiny.cloud/
|
6
|
+
*
|
7
|
+
* Version: 5.0.0-1 (2019-02-04)
|
8
|
+
*/
|
9
|
+
!function(){"use strict";var o=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.util.Tools"),e=function(e){e=t.trim(e);var o=function(o,t){e=e.replace(o,t)};return o(/<a.*?href=\"(.*?)\".*?>(.*?)<\/a>/gi,"[url=$1]$2[/url]"),o(/<font.*?color=\"(.*?)\".*?class=\"codeStyle\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"),o(/<font.*?color=\"(.*?)\".*?class=\"quoteStyle\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"),o(/<font.*?class=\"codeStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"),o(/<font.*?class=\"quoteStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"),o(/<span style=\"color: ?(.*?);\">(.*?)<\/span>/gi,"[color=$1]$2[/color]"),o(/<font.*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[color=$1]$2[/color]"),o(/<span style=\"font-size:(.*?);\">(.*?)<\/span>/gi,"[size=$1]$2[/size]"),o(/<font>(.*?)<\/font>/gi,"$1"),o(/<img.*?src=\"(.*?)\".*?\/>/gi,"[img]$1[/img]"),o(/<span class=\"codeStyle\">(.*?)<\/span>/gi,"[code]$1[/code]"),o(/<span class=\"quoteStyle\">(.*?)<\/span>/gi,"[quote]$1[/quote]"),o(/<strong class=\"codeStyle\">(.*?)<\/strong>/gi,"[code][b]$1[/b][/code]"),o(/<strong class=\"quoteStyle\">(.*?)<\/strong>/gi,"[quote][b]$1[/b][/quote]"),o(/<em class=\"codeStyle\">(.*?)<\/em>/gi,"[code][i]$1[/i][/code]"),o(/<em class=\"quoteStyle\">(.*?)<\/em>/gi,"[quote][i]$1[/i][/quote]"),o(/<u class=\"codeStyle\">(.*?)<\/u>/gi,"[code][u]$1[/u][/code]"),o(/<u class=\"quoteStyle\">(.*?)<\/u>/gi,"[quote][u]$1[/u][/quote]"),o(/<\/(strong|b)>/gi,"[/b]"),o(/<(strong|b)>/gi,"[b]"),o(/<\/(em|i)>/gi,"[/i]"),o(/<(em|i)>/gi,"[i]"),o(/<\/u>/gi,"[/u]"),o(/<span style=\"text-decoration: ?underline;\">(.*?)<\/span>/gi,"[u]$1[/u]"),o(/<u>/gi,"[u]"),o(/<blockquote[^>]*>/gi,"[quote]"),o(/<\/blockquote>/gi,"[/quote]"),o(/<br \/>/gi,"\n"),o(/<br\/>/gi,"\n"),o(/<br>/gi,"\n"),o(/<p>/gi,""),o(/<\/p>/gi,"\n"),o(/ |\u00a0/gi," "),o(/"/gi,'"'),o(/</gi,"<"),o(/>/gi,">"),o(/&/gi,"&"),e},i=function(e){e=t.trim(e);var o=function(o,t){e=e.replace(o,t)};return o(/\n/gi,"<br />"),o(/\[b\]/gi,"<strong>"),o(/\[\/b\]/gi,"</strong>"),o(/\[i\]/gi,"<em>"),o(/\[\/i\]/gi,"</em>"),o(/\[u\]/gi,"<u>"),o(/\[\/u\]/gi,"</u>"),o(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,'<a href="$1">$2</a>'),o(/\[url\](.*?)\[\/url\]/gi,'<a href="$1">$1</a>'),o(/\[img\](.*?)\[\/img\]/gi,'<img src="$1" />'),o(/\[color=(.*?)\](.*?)\[\/color\]/gi,'<font color="$1">$2</font>'),o(/\[code\](.*?)\[\/code\]/gi,'<span class="codeStyle">$1</span> '),o(/\[quote.*?\](.*?)\[\/quote\]/gi,'<span class="quoteStyle">$1</span> '),e};o.add("bbcode",function(){return{init:function(o){o.on("beforeSetContent",function(o){o.content=i(o.content)}),o.on("postProcess",function(o){o.set&&(o.content=i(o.content)),o.get&&(o.content=e(o.content))})}}}),function n(){}}();
|
@@ -1 +1,9 @@
|
|
1
|
-
|
1
|
+
/**
|
2
|
+
* Copyright (c) Tiny Technologies, Inc. All rights reserved.
|
3
|
+
* Licensed under the LGPL or a commercial license.
|
4
|
+
* For LGPL see License.txt in the project root for license information.
|
5
|
+
* For commercial licenses see https://www.tiny.cloud/
|
6
|
+
*
|
7
|
+
* Version: 5.0.0-1 (2019-02-04)
|
8
|
+
*/
|
9
|
+
!function(){"use strict";var e,n,r,t,a,i=tinymce.util.Tools.resolve("tinymce.PluginManager"),o=function(e,n){return e.fire("insertCustomChar",{chr:n})},l=function(e,n){var r=o(e,n).chr;e.execCommand("mceInsertContent",!1,r)},c=tinymce.util.Tools.resolve("tinymce.util.Tools"),u=function(e){return e.settings.charmap},s=function(e){return e.settings.charmap_append},f=function(e){return function(){return e}},g=f(!1),m=f(!0),h=g,p=m,d=function(){return y},y=(t={fold:function(e,n){return e()},is:h,isSome:h,isNone:p,getOr:r=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:r,orThunk:n,map:d,ap:d,each:function(){},bind:d,flatten:d,exists:h,forall:p,filter:d,equals:e=function(e){return e.isNone()},equals_:e,toArray:function(){return[]},toString:f("none()")},Object.freeze&&Object.freeze(t),t),b=function(r){var e=function(){return r},n=function(){return a},t=function(e){return e(r)},a={fold:function(e,n){return n(r)},is:function(e){return r===e},isSome:p,isNone:h,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:n,orThunk:n,map:function(e){return b(e(r))},ap:function(e){return e.fold(d,function(e){return b(e(r))})},each:function(e){e(r)},bind:t,flatten:e,exists:t,forall:t,filter:function(e){return e(r)?a:y},equals:function(e){return e.is(r)},equals_:function(e,n){return e.fold(h,function(e){return n(r,e)})},toArray:function(){return[r]},toString:function(){return"some("+r+")"}};return a},v={some:b,none:d,from:function(e){return null===e||e===undefined?y:b(e)}},w=(a="function",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)===a}),k=function(e,n){for(var r=e.length,t=new Array(r),a=0;a<r;a++){var i=e[a];t[a]=n(i,a,e)}return t},C=Array.prototype.push,O=function(e,n){return function(e){for(var n=[],r=0,t=e.length;r<t;++r){if(!Array.prototype.isPrototypeOf(e[r]))throw new Error("Arr.flatten item "+r+" was not an array, input: "+e);C.apply(n,e[r])}return n}(k(e,n))},A=(Array.prototype.slice,w(Array.from)&&Array.from,c.isArray),x="User Defined",q=function(e){return A(e)?[].concat((n=e,c.grep(n,function(e){return A(e)&&2===e.length}))):"function"==typeof e?e():[];var n},S=function(e){var n=function(e,n){var r=u(e);r&&(n=[{name:x,characters:q(r)}]);var t=s(e);if(t){var a=c.grep(n,function(e){return e.name===x});return a.length?(a[0].characters=[].concat(a[0].characters).concat(q(t)),n):[].concat(n).concat({name:x,characters:q(t)})}return n}(e,[{name:"Currency",characters:[[36,"dollar sign"],[162,"cent sign"],[8364,"euro sign"],[163,"pound sign"],[165,"yen sign"],[164,"currency sign"],[8352,"euro-currency sign"],[8353,"colon sign"],[8354,"cruzeiro sign"],[8355,"french franc sign"],[8356,"lira sign"],[8357,"mill sign"],[8358,"naira sign"],[8359,"peseta sign"],[8360,"rupee sign"],[8361,"won sign"],[8362,"new sheqel sign"],[8363,"dong sign"],[8365,"kip sign"],[8366,"tugrik sign"],[8367,"drachma sign"],[8368,"german penny symbol"],[8369,"peso sign"],[8370,"guarani sign"],[8371,"austral sign"],[8372,"hryvnia sign"],[8373,"cedi sign"],[8374,"livre tournois sign"],[8375,"spesmilo sign"],[8376,"tenge sign"],[8377,"indian rupee sign"],[8378,"turkish lira sign"],[8379,"nordic mark sign"],[8380,"manat sign"],[8381,"ruble sign"],[20870,"yen character"],[20803,"yuan character"],[22291,"yuan character, in hong kong and taiwan"],[22278,"yen/yuan character variant one"]]},{name:"Text",characters:[[169,"copyright sign"],[174,"registered sign"],[8482,"trade mark sign"],[8240,"per mille sign"],[181,"micro sign"],[183,"middle dot"],[8226,"bullet"],[8230,"three dot leader"],[8242,"minutes / feet"],[8243,"seconds / inches"],[167,"section sign"],[182,"paragraph sign"],[223,"sharp s / ess-zed"]]},{name:"Quotations",characters:[[8249,"single left-pointing angle quotation mark"],[8250,"single right-pointing angle quotation mark"],[171,"left pointing guillemet"],[187,"right pointing guillemet"],[8216,"left single quotation mark"],[8217,"right single quotation mark"],[8220,"left double quotation mark"],[8221,"right double quotation mark"],[8218,"single low-9 quotation mark"],[8222,"double low-9 quotation mark"],[60,"less-than sign"],[62,"greater-than sign"],[8804,"less-than or equal to"],[8805,"greater-than or equal to"],[8211,"en dash"],[8212,"em dash"],[175,"macron"],[8254,"overline"],[164,"currency sign"],[166,"broken bar"],[168,"diaeresis"],[161,"inverted exclamation mark"],[191,"turned question mark"],[710,"circumflex accent"],[732,"small tilde"],[176,"degree sign"],[8722,"minus sign"],[177,"plus-minus sign"],[247,"division sign"],[8260,"fraction slash"],[215,"multiplication sign"],[185,"superscript one"],[178,"superscript two"],[179,"superscript three"],[188,"fraction one quarter"],[189,"fraction one half"],[190,"fraction three quarters"]]},{name:"Mathematical",characters:[[402,"function / florin"],[8747,"integral"],[8721,"n-ary sumation"],[8734,"infinity"],[8730,"square root"],[8764,"similar to"],[8773,"approximately equal to"],[8776,"almost equal to"],[8800,"not equal to"],[8801,"identical to"],[8712,"element of"],[8713,"not an element of"],[8715,"contains as member"],[8719,"n-ary product"],[8743,"logical and"],[8744,"logical or"],[172,"not sign"],[8745,"intersection"],[8746,"union"],[8706,"partial differential"],[8704,"for all"],[8707,"there exists"],[8709,"diameter"],[8711,"backward difference"],[8727,"asterisk operator"],[8733,"proportional to"],[8736,"angle"]]},{name:"Extended Latin",characters:[[192,"A - grave"],[193,"A - acute"],[194,"A - circumflex"],[195,"A - tilde"],[196,"A - diaeresis"],[197,"A - ring above"],[256,"A - macron"],[198,"ligature AE"],[199,"C - cedilla"],[200,"E - grave"],[201,"E - acute"],[202,"E - circumflex"],[203,"E - diaeresis"],[274,"E - macron"],[204,"I - grave"],[205,"I - acute"],[206,"I - circumflex"],[207,"I - diaeresis"],[298,"I - macron"],[208,"ETH"],[209,"N - tilde"],[210,"O - grave"],[211,"O - acute"],[212,"O - circumflex"],[213,"O - tilde"],[214,"O - diaeresis"],[216,"O - slash"],[332,"O - macron"],[338,"ligature OE"],[352,"S - caron"],[217,"U - grave"],[218,"U - acute"],[219,"U - circumflex"],[220,"U - diaeresis"],[362,"U - macron"],[221,"Y - acute"],[376,"Y - diaeresis"],[562,"Y - macron"],[222,"THORN"],[224,"a - grave"],[225,"a - acute"],[226,"a - circumflex"],[227,"a - tilde"],[228,"a - diaeresis"],[229,"a - ring above"],[257,"a - macron"],[230,"ligature ae"],[231,"c - cedilla"],[232,"e - grave"],[233,"e - acute"],[234,"e - circumflex"],[235,"e - diaeresis"],[275,"e - macron"],[236,"i - grave"],[237,"i - acute"],[238,"i - circumflex"],[239,"i - diaeresis"],[299,"i - macron"],[240,"eth"],[241,"n - tilde"],[242,"o - grave"],[243,"o - acute"],[244,"o - circumflex"],[245,"o - tilde"],[246,"o - diaeresis"],[248,"o slash"],[333,"o macron"],[339,"ligature oe"],[353,"s - caron"],[249,"u - grave"],[250,"u - acute"],[251,"u - circumflex"],[252,"u - diaeresis"],[363,"u - macron"],[253,"y - acute"],[254,"thorn"],[255,"y - diaeresis"],[563,"y - macron"],[913,"Alpha"],[914,"Beta"],[915,"Gamma"],[916,"Delta"],[917,"Epsilon"],[918,"Zeta"],[919,"Eta"],[920,"Theta"],[921,"Iota"],[922,"Kappa"],[923,"Lambda"],[924,"Mu"],[925,"Nu"],[926,"Xi"],[927,"Omicron"],[928,"Pi"],[929,"Rho"],[931,"Sigma"],[932,"Tau"],[933,"Upsilon"],[934,"Phi"],[935,"Chi"],[936,"Psi"],[937,"Omega"],[945,"alpha"],[946,"beta"],[947,"gamma"],[948,"delta"],[949,"epsilon"],[950,"zeta"],[951,"eta"],[952,"theta"],[953,"iota"],[954,"kappa"],[955,"lambda"],[956,"mu"],[957,"nu"],[958,"xi"],[959,"omicron"],[960,"pi"],[961,"rho"],[962,"final sigma"],[963,"sigma"],[964,"tau"],[965,"upsilon"],[966,"phi"],[967,"chi"],[968,"psi"],[969,"omega"]]},{name:"Symbols",characters:[[8501,"alef symbol"],[982,"pi symbol"],[8476,"real part symbol"],[978,"upsilon - hook symbol"],[8472,"Weierstrass p"],[8465,"imaginary part"]]},{name:"Arrows",characters:[[8592,"leftwards arrow"],[8593,"upwards arrow"],[8594,"rightwards arrow"],[8595,"downwards arrow"],[8596,"left right arrow"],[8629,"carriage return"],[8656,"leftwards double arrow"],[8657,"upwards double arrow"],[8658,"rightwards double arrow"],[8659,"downwards double arrow"],[8660,"left right double arrow"],[8756,"therefore"],[8834,"subset of"],[8835,"superset of"],[8836,"not a subset of"],[8838,"subset of or equal to"],[8839,"superset of or equal to"],[8853,"circled plus"],[8855,"circled times"],[8869,"perpendicular"],[8901,"dot operator"],[8968,"left ceiling"],[8969,"right ceiling"],[8970,"left floor"],[8971,"right floor"],[9001,"left-pointing angle bracket"],[9002,"right-pointing angle bracket"],[9674,"lozenge"],[9824,"black spade suit"],[9827,"black club suit"],[9829,"black heart suit"],[9830,"black diamond suit"],[8194,"en space"],[8195,"em space"],[8201,"thin space"],[8204,"zero width non-joiner"],[8205,"zero width joiner"],[8206,"left-to-right mark"],[8207,"right-to-left mark"]]}]);return 1<n.length?[{name:"All",characters:O(n,function(e){return e.characters})}].concat(n):n},T=function(n){return{getCharMap:function(){return S(n)},insertChar:function(e){l(n,e)}}},E=function(e){var n=e,r=function(){return n};return{get:r,set:function(e){n=e},clone:function(){return E(r())}}},z=function(e,n){return-1!==e.indexOf(n)},U=function(e,n){var a=[],i=n.toLowerCase();return function(e,n){for(var r=0,t=e.length;r<t;r++)n(e[r],r,e)}(e.characters,function(e){var n,r,t;n=e[0],r=e[1],t=i,(z(String.fromCharCode(n).toLowerCase(),t)||z(r.toLowerCase(),t)||z(r.toLowerCase().replace(/\s+/g,""),t))&&a.push(e)}),k(a,function(e){return{text:e[1],value:String.fromCharCode(e[0]),icon:String.fromCharCode(e[0])}})},D="pattern",I=function(r,e){var t,a,i,n=function(){return[{label:"Search",type:"input",name:D},{type:"collection",name:"results"}]},o=1===e.length?E(x):E("All"),c=function(r,t){(function(e,n){for(var r=0,t=e.length;r<t;r++){var a=e[r];if(n(a,r,e))return v.some(a)}return v.none()})(e,function(e){return e.name===o.get()}).each(function(e){var n=U(e,t);r.setData({results:n})})},u=(t=function(e){var n=e.getData().pattern;c(e,n)},a=40,i=null,{cancel:function(){null!==i&&(clearTimeout(i),i=null)},throttle:function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];null!==i&&clearTimeout(i),i=setTimeout(function(){t.apply(null,e),i=null},a)}}),s={title:"Special Character",size:"normal",body:1===e.length?{type:"panel",items:n()}:{type:"tabpanel",tabs:k(e,function(e){return{title:e.name,items:n()}})},buttons:[{type:"cancel",name:"close",text:"Close",primary:!0}],initialData:{pattern:"",results:U(e[0],"")},onAction:function(e,n){"results"===n.name&&(l(r,n.value),e.close())},onTabChange:function(e,n){o.set(n),u.throttle(e)},onChange:function(e,n){n.name===D&&u.throttle(e)}};r.windowManager.open(s)},N=function(e,n){e.addCommand("mceShowCharmap",function(){I(e,n)})},P=tinymce.util.Tools.resolve("tinymce.util.Promise"),j=function(e,n){return 0===e.startOffset||/\s/.test(n.charAt(e.startOffset-1))},L=function(e){e.ui.registry.addButton("charmap",{icon:"insert-character",tooltip:"Special character",onAction:function(){return e.execCommand("mceShowCharmap")}}),e.ui.registry.addMenuItem("charmap",{icon:"insert-character",text:"Special character...",onAction:function(){return e.execCommand("mceShowCharmap")}})};i.add("charmap",function(e){var t,a,n=S(e);return N(e,n),L(e),t=e,a=n[0],t.ui.registry.addAutocompleter("charmap",{ch:":",columns:"auto",minChars:2,matches:j,fetch:function(r,e){return new P(function(e,n){e(U(a,r))})},onAction:function(e,n,r){t.selection.setRng(n),t.insertContent(r),e.hide()}}),T(e)}),function M(){}}();
|
@@ -1 +1,9 @@
|
|
1
|
-
|
1
|
+
/**
|
2
|
+
* Copyright (c) Tiny Technologies, Inc. All rights reserved.
|
3
|
+
* Licensed under the LGPL or a commercial license.
|
4
|
+
* For LGPL see License.txt in the project root for license information.
|
5
|
+
* For commercial licenses see https://www.tiny.cloud/
|
6
|
+
*
|
7
|
+
* Version: 5.0.0-1 (2019-02-04)
|
8
|
+
*/
|
9
|
+
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=function(e,n){e.focus(),e.undoManager.transact(function(){e.setContent(n)}),e.selection.setCursorLocation(),e.nodeChanged()},o=function(e){return e.getContent({source_view:!0})},n=function(n){var e=o(n);n.windowManager.open({title:"Source Code",size:"large",body:{type:"panel",items:[{type:"textarea",name:"code"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:{code:e},onSubmit:function(e){t(n,e.getData().code),e.close()}})},c=function(e){e.addCommand("mceCodeEditor",function(){n(e)})},i=function(e){e.ui.registry.addButton("code",{icon:"sourcecode",tooltip:"Source code",onAction:function(){return n(e)}}),e.ui.registry.addMenuItem("code",{icon:"sourcecode",text:"Source code",onAction:function(){return n(e)}})};e.add("code",function(e){return c(e),i(e),{}}),function u(){}}();
|