').hide();
- $modal.append($box);
-
- $.ajax({
- dataType: "json",
- cache: false,
- url: this.opts.imageManagerJson,
- success: $.proxy(function(data)
- {
- $.each(data, $.proxy(function(key, val)
+ RedactorPlugins.imagemanager = function()
+ {
+ return {
+ init: function()
+ {
+ if (!this.opts.imageManagerJson) return;
+
+ this.modal.addCallback('image', this.imagemanager.load);
+ },
+ load: function()
+ {
+ var $modal = this.modal.getModal();
+
+ this.modal.createTabber($modal);
+ this.modal.addTab(1, 'Upload', 'active');
+ this.modal.addTab(2, 'Choose');
+
+ $('#redactor-modal-image-droparea').addClass('redactor-tab redactor-tab1');
+
+ var $box = $('
').hide();
+ $modal.append($box);
+
+ $.ajax({
+ dataType: "json",
+ cache: false,
+ url: this.opts.imageManagerJson,
+ success: $.proxy(function(data)
{
- // title
- var thumbtitle = '';
- if (typeof val.title !== 'undefined') thumbtitle = val.title;
+ $.each(data, $.proxy(function(key, val)
+ {
+ // title
+ var thumbtitle = '';
+ if (typeof val.title !== 'undefined') thumbtitle = val.title;
- var img = $('
');
- $('#redactor-image-manager-box').append(img);
- $(img).click($.proxy(this.imagemanager.insert, this));
+ var img = $('
');
+ $('#redactor-image-manager-box').append(img);
+ $(img).click($.proxy(this.imagemanager.insert, this));
- }, this));
+ }, this));
- }, this)
- });
+ }, this)
+ });
- },
- insert: function(e)
- {
- this.image.insert('
');
- }
+ },
+ insert: function(e)
+ {
+ this.image.insert('
');
+ }
+ };
};
-};
\ No newline at end of file
+})(jQuery);
\ No newline at end of file
diff --git a/assets/plugins/limiter/limiter.js b/assets/plugins/limiter/limiter.js
index 90a6cb0..f767f42 100644
--- a/assets/plugins/limiter/limiter.js
+++ b/assets/plugins/limiter/limiter.js
@@ -1,38 +1,41 @@
if (!RedactorPlugins) var RedactorPlugins = {};
-RedactorPlugins.limiter = function()
+(function($)
{
- return {
- init: function()
- {
- if (!this.opts.limiter) return;
-
- this.$editor.on('keydown.redactor-limiter', $.proxy(function(e)
+ RedactorPlugins.limiter = function()
+ {
+ return {
+ init: function()
{
- var key = e.which;
- var ctrl = e.ctrlKey || e.metaKey;
+ if (!this.opts.limiter) return;
- if (key == this.keyCode.BACKSPACE
- || key == this.keyCode.DELETE
- || key == this.keyCode.ESC
- || key == this.keyCode.SHIFT
- || (ctrl && key == 65)
- || (ctrl && key == 82)
- || (ctrl && key == 116)
- )
+ this.$editor.on('keydown.redactor-limiter', $.proxy(function(e)
{
- return;
- }
+ var key = e.which;
+ var ctrl = e.ctrlKey || e.metaKey;
- var count = this.$editor.text().length;
- if (count >= this.opts.limiter)
- {
- return false;
- }
+ if (key == this.keyCode.BACKSPACE
+ || key == this.keyCode.DELETE
+ || key == this.keyCode.ESC
+ || key == this.keyCode.SHIFT
+ || (ctrl && key == 65)
+ || (ctrl && key == 82)
+ || (ctrl && key == 116)
+ )
+ {
+ return;
+ }
+
+ var count = this.$editor.text().length;
+ if (count >= this.opts.limiter)
+ {
+ return false;
+ }
- }, this));
+ }, this));
- }
+ }
+ };
};
-};
\ No newline at end of file
+})(jQuery);
\ No newline at end of file
diff --git a/assets/plugins/table/table.js b/assets/plugins/table/table.js
index dfc4831..aecf951 100644
--- a/assets/plugins/table/table.js
+++ b/assets/plugins/table/table.js
@@ -1,169 +1,171 @@
if (!RedactorPlugins) var RedactorPlugins = {};
-RedactorPlugins.table = function()
+(function($)
{
- return {
- getTemplate: function()
- {
- return String()
- + '
';
- },
- init: function()
- {
-
- var dropdown = {};
-
- dropdown.insert_table = { title: this.lang.get('insert_table'), func: this.table.show };
- dropdown.insert_row_above = { title: this.lang.get('insert_row_above'), func: this.table.addRowAbove };
- dropdown.insert_row_below = { title: this.lang.get('insert_row_below'), func: this.table.addRowBelow };
- dropdown.insert_column_left = { title: this.lang.get('insert_column_left'), func: this.table.addColumnLeft };
- dropdown.insert_column_right = { title: this.lang.get('insert_column_right'), func: this.table.addColumnRight };
- dropdown.add_head = { title: this.lang.get('add_head'), func: this.table.addHead };
- dropdown.delete_head = { title: this.lang.get('delete_head'), func: this.table.deleteHead };
- dropdown.delete_column = { title: this.lang.get('delete_column'), func: this.table.deleteColumn };
- dropdown.delete_row = { title: this.lang.get('delete_row'), func: this.table.deleteRow };
- dropdown.delete_table = { title: this.lang.get('delete_table'), func: this.table.deleteTable };
-
- this.observe.addButton('td', 'table');
- this.observe.addButton('th', 'table');
-
- var button = this.button.addBefore('link', 'table', this.lang.get('table'));
- this.button.addDropdown(button, dropdown);
- },
- show: function()
- {
- this.modal.addTemplate('table', this.table.getTemplate());
-
- this.modal.load('table', this.lang.get('insert_table'), 300);
- this.modal.createCancelButton();
+ RedactorPlugins.table = function()
+ {
+ return {
+ getTemplate: function()
+ {
+ return String()
+ + '
';
+ },
+ init: function()
+ {
- var button = this.modal.createActionButton(this.lang.get('insert'));
- button.on('click', this.table.insert);
+ var dropdown = {};
+
+ dropdown.insert_table = { title: this.lang.get('insert_table'), func: this.table.show };
+ dropdown.insert_row_above = { title: this.lang.get('insert_row_above'), func: this.table.addRowAbove };
+ dropdown.insert_row_below = { title: this.lang.get('insert_row_below'), func: this.table.addRowBelow };
+ dropdown.insert_column_left = { title: this.lang.get('insert_column_left'), func: this.table.addColumnLeft };
+ dropdown.insert_column_right = { title: this.lang.get('insert_column_right'), func: this.table.addColumnRight };
+ dropdown.add_head = { title: this.lang.get('add_head'), func: this.table.addHead };
+ dropdown.delete_head = { title: this.lang.get('delete_head'), func: this.table.deleteHead };
+ dropdown.delete_column = { title: this.lang.get('delete_column'), func: this.table.deleteColumn };
+ dropdown.delete_row = { title: this.lang.get('delete_row'), func: this.table.deleteRow };
+ dropdown.delete_table = { title: this.lang.get('delete_table'), func: this.table.deleteTable };
+
+ this.observe.addButton('td', 'table');
+ this.observe.addButton('th', 'table');
+
+ var button = this.button.addBefore('link', 'table', this.lang.get('table'));
+ this.button.addDropdown(button, dropdown);
+ },
+ show: function()
+ {
+ this.modal.addTemplate('table', this.table.getTemplate());
- this.selection.save();
- this.modal.show();
+ this.modal.load('table', this.lang.get('insert_table'), 300);
+ this.modal.createCancelButton();
- $('#redactor-table-rows').focus();
+ var button = this.modal.createActionButton(this.lang.get('insert'));
+ button.on('click', this.table.insert);
- },
- insert: function()
- {
+ this.selection.save();
+ this.modal.show();
- var rows = $('#redactor-table-rows').val(),
- columns = $('#redactor-table-columns').val(),
- $tableBox = $('
'),
- tableId = Math.floor(Math.random() * 99999),
- $table = $('
'),
- i, $row, z, $column;
+ $('#redactor-table-rows').focus();
- for (i = 0; i < rows; i++)
+ },
+ insert: function()
{
- $row = $('
');
- for (z = 0; z < columns; z++)
+ var rows = $('#redactor-table-rows').val(),
+ columns = $('#redactor-table-columns').val(),
+ $tableBox = $(''),
+ tableId = Math.floor(Math.random() * 99999),
+ $table = $('
'),
+ i, $row, z, $column;
+
+ for (i = 0; i < rows; i++)
{
- $column = $('
' + this.opts.invisibleSpace + ' | ');
+ $row = $('
');
- // set the focus to the first td
- if (i === 0 && z === 0)
+ for (z = 0; z < columns; z++)
{
- $column.append(this.selection.getMarker());
+ $column = $('' + this.opts.invisibleSpace + ' | ');
+
+ // set the focus to the first td
+ if (i === 0 && z === 0)
+ {
+ $column.append(this.selection.getMarker());
+ }
+
+ $($row).append($column);
}
- $($row).append($column);
+ $table.append($row);
}
- $table.append($row);
- }
+ $tableBox.append($table);
+ var html = $tableBox.html();
- $tableBox.append($table);
- var html = $tableBox.html();
+ this.modal.close();
+ this.selection.restore();
- this.modal.close();
- this.selection.restore();
+ if (this.table.getTable()) return;
- if (this.table.getTable()) return;
+ this.buffer.set();
- this.buffer.set();
-
- var current = this.selection.getBlock() || this.selection.getCurrent();
- if (current && current.tagName != 'BODY')
- {
- if (current.tagName == 'LI') current = $(current).closest('ul, ol');
- $(current).after(html);
- }
- else
- {
- this.insert.html(html);
- }
+ var current = this.selection.getBlock() || this.selection.getCurrent();
+ if (current && current.tagName != 'BODY')
+ {
+ if (current.tagName == 'LI') current = $(current).closest('ul, ol');
+ $(current).after(html);
+ }
+ else
+ {
+ this.insert.html(html);
+ }
- this.selection.restore();
+ this.selection.restore();
- var table = this.$editor.find('#table' + tableId);
+ var table = this.$editor.find('#table' + tableId);
- if (!this.opts.linebreaks && (this.utils.browser('mozilla') || this.utils.browser('msie')))
- {
- var $next = table.next();
- if ($next.length === 0)
+ if (!this.opts.linebreaks && (this.utils.browser('mozilla') || this.utils.browser('msie')))
{
- table.after(this.opts.emptyHtml);
+ var $next = table.next();
+ if ($next.length === 0)
+ {
+ table.after(this.opts.emptyHtml);
+ }
}
- }
- this.observe.buttons();
+ this.observe.buttons();
- table.find('span.redactor-selection-marker').remove();
- table.removeAttr('id');
+ table.find('span.redactor-selection-marker').remove();
+ table.removeAttr('id');
- this.code.sync();
- this.core.setCallback('insertedTable', table);
- },
- getTable: function()
- {
- var $table = $(this.selection.getParent()).closest('table');
+ this.code.sync();
+ this.core.setCallback('insertedTable', table);
+ },
+ getTable: function()
+ {
+ var $table = $(this.selection.getParent()).closest('table');
- if (!this.utils.isRedactorParent($table)) return false;
- if ($table.size() === 0) return false;
+ if (!this.utils.isRedactorParent($table)) return false;
+ if ($table.size() === 0) return false;
- return $table;
- },
- restoreAfterDelete: function($table)
- {
- this.selection.restore();
- $table.find('span.redactor-selection-marker').remove();
- this.code.sync();
- },
- deleteTable: function()
- {
- var $table = this.table.getTable();
- if (!$table) return;
+ return $table;
+ },
+ restoreAfterDelete: function($table)
+ {
+ this.selection.restore();
+ $table.find('span.redactor-selection-marker').remove();
+ this.code.sync();
+ },
+ deleteTable: function()
+ {
+ var $table = this.table.getTable();
+ if (!$table) return;
- this.buffer.set();
+ this.buffer.set();
- var $next = $table.next();
- if (!this.opts.linebreaks && $next.length !== 0)
- {
- this.caret.setStart($next);
- }
- else
- {
- this.caret.setAfter($table);
- }
+ var $next = $table.next();
+ if (!this.opts.linebreaks && $next.length !== 0)
+ {
+ this.caret.setStart($next);
+ }
+ else
+ {
+ this.caret.setAfter($table);
+ }
- $table.remove();
+ $table.remove();
- this.code.sync();
- },
- deleteRow: function()
- {
+ this.code.sync();
+ },
+ deleteRow: function()
+ {
var $table = this.table.getTable();
if (!$table) return;
@@ -182,8 +184,8 @@ RedactorPlugins.table = function()
$current_tr.remove();
this.table.restoreAfterDelete($table);
},
- deleteColumn: function()
- {
+ deleteColumn: function()
+ {
var $table = this.table.getTable();
if (!$table) return;
@@ -205,126 +207,131 @@ RedactorPlugins.table = function()
this.table.restoreAfterDelete($table);
},
- addHead: function()
- {
- var $table = this.table.getTable();
- if (!$table) return;
-
- this.buffer.set();
-
- if ($table.find('thead').size() !== 0)
+ addHead: function()
{
- this.table.deleteHead();
- return;
- }
-
- var tr = $table.find('tr').first().clone();
- tr.find('td').html(this.opts.invisibleSpace);
- $thead = $('').append(tr);
- $table.prepend($thead);
+ var $table = this.table.getTable();
+ if (!$table) return;
- this.code.sync();
+ this.buffer.set();
- },
- deleteHead: function()
- {
- var $table = this.table.getTable();
- if (!$table) return;
-
- var $thead = $table.find('thead');
- if ($thead.size() === 0) return;
-
- this.buffer.set();
+ if ($table.find('thead').size() !== 0)
+ {
+ this.table.deleteHead();
+ return;
+ }
- $thead.remove();
- this.code.sync();
- },
- addRowAbove: function()
- {
- this.table.addRow('before');
- },
- addRowBelow: function()
- {
- this.table.addRow('after');
- },
- addColumnLeft: function()
- {
- this.table.addColumn('before');
- },
- addColumnRight: function()
- {
- this.table.addColumn('after');
- },
- addRow: function(type)
- {
- var $table = this.table.getTable();
- if (!$table) return;
+ var tr = $table.find('tr').first().clone();
+ tr.find('td').replaceWith($.proxy(function()
+ {
+ return $('').html(this.opts.invisibleSpace);
+ }, this));
- this.buffer.set();
+ $thead = $('').append(tr);
+ $table.prepend($thead);
- var $current = $(this.selection.getCurrent());
- var $current_tr = $current.closest('tr');
- var new_tr = $current_tr.clone();
+ this.code.sync();
- new_tr.find('th').replaceWith(function()
+ },
+ deleteHead: function()
{
- var $td = $(' | ');
- $td[0].attributes = this.attributes;
+ var $table = this.table.getTable();
+ if (!$table) return;
- return $td.append($(this).contents());
- });
+ var $thead = $table.find('thead');
+ if ($thead.size() === 0) return;
- new_tr.find('td').html(this.opts.invisibleSpace);
+ this.buffer.set();
- if (type == 'after')
+ $thead.remove();
+ this.code.sync();
+ },
+ addRowAbove: function()
{
- $current_tr.after(new_tr);
- }
- else
+ this.table.addRow('before');
+ },
+ addRowBelow: function()
{
- $current_tr.before(new_tr);
- }
-
- this.code.sync();
- },
- addColumn: function (type)
- {
- var $table = this.table.getTable();
- if (!$table) return;
-
- var index = 0;
- var current = $(this.selection.getCurrent());
-
- this.buffer.set();
+ this.table.addRow('after');
+ },
+ addColumnLeft: function()
+ {
+ this.table.addColumn('before');
+ },
+ addColumnRight: function()
+ {
+ this.table.addColumn('after');
+ },
+ addRow: function(type)
+ {
+ var $table = this.table.getTable();
+ if (!$table) return;
- var $current_tr = current.closest('tr');
- var $current_td = current.closest('td, th');
+ this.buffer.set();
- $current_tr.find('td, th').each($.proxy(function(i, elem)
- {
- if ($(elem)[0] === $current_td[0]) index = i;
+ var $current = $(this.selection.getCurrent());
+ var $current_tr = $current.closest('tr');
+ var new_tr = $current_tr.clone();
- }, this));
+ new_tr.find('th').replaceWith(function()
+ {
+ var $td = $(' | ');
+ $td[0].attributes = this.attributes;
- $table.find('tr').each($.proxy(function(i, elem)
- {
- var $current = $(elem).find('td, th').eq(index);
+ return $td.append($(this).contents());
+ });
- var td = $current.clone();
- td.html(this.opts.invisibleSpace);
+ new_tr.find('td').html(this.opts.invisibleSpace);
if (type == 'after')
{
- $current.after(td);
+ $current_tr.after(new_tr);
}
else
{
- $current.before(td);
+ $current_tr.before(new_tr);
}
- }, this));
+ this.code.sync();
+ },
+ addColumn: function (type)
+ {
+ var $table = this.table.getTable();
+ if (!$table) return;
+
+ var index = 0;
+ var current = $(this.selection.getCurrent());
+
+ this.buffer.set();
+
+ var $current_tr = current.closest('tr');
+ var $current_td = current.closest('td, th');
- this.code.sync();
- }
+ $current_tr.find('td, th').each($.proxy(function(i, elem)
+ {
+ if ($(elem)[0] === $current_td[0]) index = i;
+
+ }, this));
+
+ $table.find('tr').each($.proxy(function(i, elem)
+ {
+ var $current = $(elem).find('td, th').eq(index);
+
+ var td = $current.clone();
+ td.html(this.opts.invisibleSpace);
+
+ if (type == 'after')
+ {
+ $current.after(td);
+ }
+ else
+ {
+ $current.before(td);
+ }
+
+ }, this));
+
+ this.code.sync();
+ }
+ };
};
-};
\ No newline at end of file
+})(jQuery);
\ No newline at end of file
diff --git a/assets/plugins/textdirection/textdirection.js b/assets/plugins/textdirection/textdirection.js
index a249dd2..be65f18 100755
--- a/assets/plugins/textdirection/textdirection.js
+++ b/assets/plugins/textdirection/textdirection.js
@@ -1,28 +1,31 @@
if (!RedactorPlugins) var RedactorPlugins = {};
-RedactorPlugins.textdirection = function()
+(function($)
{
- return {
- init: function()
- {
- var that = this;
- var dropdown = {};
+ RedactorPlugins.textdirection = function()
+ {
+ return {
+ init: function()
+ {
+ var that = this;
+ var dropdown = {};
- dropdown.ltr = { title: 'Left to Right', func: that.textdirection.setLtr };
- dropdown.rtl = { title: 'Right to Left', func: that.textdirection.setRtl};
+ dropdown.ltr = { title: 'Left to Right', func: that.textdirection.setLtr };
+ dropdown.rtl = { title: 'Right to Left', func: that.textdirection.setRtl};
- var button = this.button.add('textdirection', 'Change Text Direction');
- this.button.addDropdown(button, dropdown);
- },
- setRtl: function()
- {
- this.buffer.set();
- this.block.setAttr('dir', 'rtl');
- },
- setLtr: function()
- {
- this.buffer.set();
- this.block.removeAttr('dir');
- }
+ var button = this.button.add('textdirection', 'Change Text Direction');
+ this.button.addDropdown(button, dropdown);
+ },
+ setRtl: function()
+ {
+ this.buffer.set();
+ this.block.setAttr('dir', 'rtl');
+ },
+ setLtr: function()
+ {
+ this.buffer.set();
+ this.block.removeAttr('dir');
+ }
+ };
};
-};
\ No newline at end of file
+})(jQuery);
\ No newline at end of file
diff --git a/assets/plugins/textexpander/textexpander.js b/assets/plugins/textexpander/textexpander.js
index 2fbe896..7d3b30b 100644
--- a/assets/plugins/textexpander/textexpander.js
+++ b/assets/plugins/textexpander/textexpander.js
@@ -1,57 +1,60 @@
if (!RedactorPlugins) var RedactorPlugins = {};
-RedactorPlugins.textexpander = function()
+(function($)
{
- return {
- init: function()
- {
- if (!this.opts.textexpander) return;
-
- this.$editor.on('keyup.redactor-limiter', $.proxy(function(e)
+ RedactorPlugins.textexpander = function()
+ {
+ return {
+ init: function()
{
- var key = e.which;
- if (key == this.keyCode.SPACE)
+ if (!this.opts.textexpander) return;
+
+ this.$editor.on('keyup.redactor-limiter', $.proxy(function(e)
{
- var current = this.selection.getCurrent();
- var cloned = $(current).clone();
+ var key = e.which;
+ if (key == this.keyCode.SPACE)
+ {
+ var current = this.selection.getCurrent();
+ var cloned = $(current).clone();
- var $div = $('');
- $div.html(cloned);
+ var $div = $(' ');
+ $div.html(cloned);
- var text = $div.html();
- $div.remove();
+ var text = $div.html();
+ $div.remove();
- var len = this.opts.textexpander.length;
- var replaced = 0;
+ var len = this.opts.textexpander.length;
+ var replaced = 0;
- for (var i = 0; i < len; i++)
- {
- var re = new RegExp(this.opts.textexpander[i][0]);
- if (text.search(re) != -1)
+ for (var i = 0; i < len; i++)
{
- replaced++;
- text = text.replace(re, this.opts.textexpander[i][1]);
+ var re = new RegExp(this.opts.textexpander[i][0]);
+ if (text.search(re) != -1)
+ {
+ replaced++;
+ text = text.replace(re, this.opts.textexpander[i][1]);
- $div = $(' ');
- $div.html(text);
- $div.append(this.selection.getMarker());
+ $div = $(' ');
+ $div.html(text);
+ $div.append(this.selection.getMarker());
- var html = $div.html().replace(/ /, '');
+ var html = $div.html().replace(/ /, '');
- $(current).replaceWith(html);
- $div.remove();
+ $(current).replaceWith(html);
+ $div.remove();
+ }
}
- }
- if (replaced !== 0)
- {
- this.selection.restore();
+ if (replaced !== 0)
+ {
+ this.selection.restore();
+ }
}
- }
- }, this));
+ }, this));
- }
+ }
+ };
};
-};
\ No newline at end of file
+})(jQuery);
\ No newline at end of file
diff --git a/assets/plugins/video/video.js b/assets/plugins/video/video.js
index 2af586d..389a2f0 100644
--- a/assets/plugins/video/video.js
+++ b/assets/plugins/video/video.js
@@ -1,74 +1,77 @@
if (!RedactorPlugins) var RedactorPlugins = {};
-RedactorPlugins.video = function()
+(function($)
{
- return {
- reUrlYoutube: /https?:\/\/(?:[0-9A-Z-]+\.)?(?:youtu\.be\/|youtube\.com\S*[^\w\-\s])([\w\-]{11})(?=[^\w\-]|$)(?![?=&+%\w.-]*(?:['"][^<>]*>|<\/a>))[?=&+%\w.-]*/ig,
- reUrlVimeo: /https?:\/\/(www\.)?vimeo.com\/(\d+)($|\/)/,
- getTemplate: function()
- {
- return String()
- + ''
- + ''
- + ''
- + '';
- },
- init: function()
- {
- var button = this.button.addAfter('image', 'video', this.lang.get('video'));
- this.button.addCallback(button, this.video.show);
- },
- show: function()
- {
- this.modal.addTemplate('video', this.video.getTemplate());
-
- this.modal.load('video', this.lang.get('video'), 700);
- this.modal.createCancelButton();
+ RedactorPlugins.video = function()
+ {
+ return {
+ reUrlYoutube: /https?:\/\/(?:[0-9A-Z-]+\.)?(?:youtu\.be\/|youtube\.com\S*[^\w\-\s])([\w\-]{11})(?=[^\w\-]|$)(?![?=&+%\w.-]*(?:['"][^<>]*>|<\/a>))[?=&+%\w.-]*/ig,
+ reUrlVimeo: /https?:\/\/(www\.)?vimeo.com\/(\d+)($|\/)/,
+ getTemplate: function()
+ {
+ return String()
+ + ''
+ + ''
+ + ''
+ + '';
+ },
+ init: function()
+ {
+ var button = this.button.addAfter('image', 'video', this.lang.get('video'));
+ this.button.addCallback(button, this.video.show);
+ },
+ show: function()
+ {
+ this.modal.addTemplate('video', this.video.getTemplate());
- var button = this.modal.createActionButton(this.lang.get('insert'));
- button.on('click', this.video.insert);
+ this.modal.load('video', this.lang.get('video'), 700);
+ this.modal.createCancelButton();
- this.selection.save();
- this.modal.show();
+ var button = this.modal.createActionButton(this.lang.get('insert'));
+ button.on('click', this.video.insert);
- $('#redactor-insert-video-area').focus();
+ this.selection.save();
+ this.modal.show();
- },
- insert: function()
- {
- var data = $('#redactor-insert-video-area').val();
+ $('#redactor-insert-video-area').focus();
- if (!data.match(/ |