forked from kindsoft/kindeditor
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
隆昊
committed
Sep 12, 2015
1 parent
5a41bd7
commit fd76e3d
Showing
4 changed files
with
19 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
* @author Roddy <[email protected]> | ||
* @website http://www.kindsoft.net/ | ||
* @licence http://www.kindsoft.net/license.php | ||
* @version 4.1.11 (2015-02-28) | ||
* @version 4.1.11 (2015-09-12) | ||
*******************************************************************************/ | ||
(function (window, undefined) { | ||
if (window.KindEditor) { | ||
|
@@ -19,7 +19,7 @@ if (!window.console) { | |
if (!console.log) { | ||
console.log = function () {}; | ||
} | ||
var _VERSION = '4.1.11 (2015-02-28)', | ||
var _VERSION = '4.1.11 (2015-09-12)', | ||
_ua = navigator.userAgent.toLowerCase(), | ||
_IE = _ua.indexOf('msie') > -1 && _ua.indexOf('opera') == -1, | ||
_NEWIE = _ua.indexOf('msie') == -1 && _ua.indexOf('trident') > -1, | ||
|
@@ -79,7 +79,7 @@ function _inString(val, str, delimiter) { | |
} | ||
function _addUnit(val, unit) { | ||
unit = unit || 'px'; | ||
return val && /^\d+$/.test(val) ? val + unit : val; | ||
return val && /^-?\d+(?:\.\d+)?$/.test(val) ? val + unit : val; | ||
} | ||
function _removeUnit(val) { | ||
var match; | ||
|
@@ -5478,6 +5478,10 @@ function _create(expr, options) { | |
_each(_plugins, function(name, fn) { | ||
if (_isFunction(fn)) { | ||
fn.call(editor, KindEditor); | ||
if (!editor._pluginStatus) { | ||
editor._pluginStatus = {}; | ||
} | ||
editor._pluginStatus[name] = 'inited'; | ||
} | ||
}); | ||
return editor.create(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters