diff --git a/index.html b/index.html
index 51a4ca956..6e896a7ef 100755
--- a/index.html
+++ b/index.html
@@ -4,7 +4,7 @@
', {class: this.colorCls});
var cpStyle = colorEl.get(0).style;
var elToAppend = this.target && this.target.config ? this.target.config.el : '';
diff --git a/src/editor/model/Editor.js b/src/editor/model/Editor.js
index 72b2a0066..93c30ebed 100644
--- a/src/editor/model/Editor.js
+++ b/src/editor/model/Editor.js
@@ -18,10 +18,10 @@ require('block_manager'),
require('trait_manager'),
];
-var Backbone = require('backbone');
-var UndoManager = require('backbone-undo');
-var key = require('keymaster');
-var timedInterval;
+const Backbone = require('backbone');
+const UndoManager = require('backbone-undo');
+const key = require('keymaster');
+let timedInterval;
if (!Backbone.$) {
Backbone.$ = $;
diff --git a/src/grapesjs/index.js b/src/grapesjs/index.js
index 8fb20022e..f9b0bb8e1 100644
--- a/src/grapesjs/index.js
+++ b/src/grapesjs/index.js
@@ -4,9 +4,12 @@ module.exports = (() => {
const defaultConfig = require('./config/config');
const Editor = require('editor');
const PluginManager = require('plugin_manager');
+ const cash = require('cash-dom');
const plugins = new PluginManager();
const editors = [];
+ require('utils/cashAdds')(cash);
+
return {
// Will be replaced on build
@@ -36,10 +39,12 @@ module.exports = (() => {
*/
init(config = {}) {
const els = config.container;
+ let $ = $ || '';
// Make a missing $ more verbose
- if (isUndefined($)) {
- throw 'jQuery not found';
+ if (!$) {
+ $ = cash;
+ window.$ = $;
}
if (!els) {
diff --git a/src/style_manager/view/PropertyRadioView.js b/src/style_manager/view/PropertyRadioView.js
index 292660d7c..3b489d2c1 100644
--- a/src/style_manager/view/PropertyRadioView.js
+++ b/src/style_manager/view/PropertyRadioView.js
@@ -18,7 +18,7 @@ module.exports = require('./PropertyView').extend({
const prop = model.get('property');
const options = model.get('list') || model.get('options') || [];
- if (!this.$input) {
+ if (!this.input) {
if(options && options.length) {
let inputStr = '';
@@ -31,31 +31,33 @@ module.exports = require('./PropertyView').extend({
-
`;
+
+ `;
});
- this.$inputEl = $(inputStr);
- this.input = this.$inputEl.get(0);
- this.$el.find(`#${pfx}input-holder`).html(this.$inputEl);
- this.$input = this.$inputEl.find(`input[name="${prop}"]`);
+ const inputHld = this.el.querySelector(`#${pfx}input-holder`);
+ inputHld.innerHTML = `