adding files of assets
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
"use strict";
|
||||
|
||||
// Class definition
|
||||
var KTFormsCKEditorBalloonBlock = function () {
|
||||
// Private functions
|
||||
var exampleBalloonBlock = function () {
|
||||
BalloonEditor
|
||||
.create(document.querySelector('#kt_docs_ckeditor_balloon_block'))
|
||||
.then(editor => {
|
||||
console.log(editor);
|
||||
})
|
||||
.catch(error => {
|
||||
console.error(error);
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
// Public Functions
|
||||
init: function () {
|
||||
exampleBalloonBlock();
|
||||
}
|
||||
};
|
||||
}();
|
||||
|
||||
// On document ready
|
||||
KTUtil.onDOMContentLoaded(function () {
|
||||
KTFormsCKEditorBalloonBlock.init();
|
||||
});
|
||||
@@ -0,0 +1,28 @@
|
||||
"use strict";
|
||||
|
||||
// Class definition
|
||||
var KTFormsCKEditorBalloon = function () {
|
||||
// Private functions
|
||||
var exampleBalloon = function () {
|
||||
BalloonEditor
|
||||
.create(document.querySelector('#kt_docs_ckeditor_balloon'))
|
||||
.then(editor => {
|
||||
console.log(editor);
|
||||
})
|
||||
.catch(error => {
|
||||
console.error(error);
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
// Public Functions
|
||||
init: function () {
|
||||
exampleBalloon();
|
||||
}
|
||||
};
|
||||
}();
|
||||
|
||||
// On document ready
|
||||
KTUtil.onDOMContentLoaded(function () {
|
||||
KTFormsCKEditorBalloon.init();
|
||||
});
|
||||
@@ -0,0 +1,28 @@
|
||||
"use strict";
|
||||
|
||||
// Class definition
|
||||
var KTFormsCKEditorClassic = function () {
|
||||
// Private functions
|
||||
var exampleClassic = function () {
|
||||
ClassicEditor
|
||||
.create(document.querySelector('#kt_docs_ckeditor_classic'))
|
||||
.then(editor => {
|
||||
console.log(editor);
|
||||
})
|
||||
.catch(error => {
|
||||
console.error(error);
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
// Public Functions
|
||||
init: function () {
|
||||
exampleClassic();
|
||||
}
|
||||
};
|
||||
}();
|
||||
|
||||
// On document ready
|
||||
KTUtil.onDOMContentLoaded(function () {
|
||||
KTFormsCKEditorClassic.init();
|
||||
});
|
||||
@@ -0,0 +1,30 @@
|
||||
"use strict";
|
||||
|
||||
// Class definition
|
||||
var KTFormsCKEditorDocument = function () {
|
||||
// Private functions
|
||||
var exampleDocument = function () {
|
||||
DecoupledEditor
|
||||
.create(document.querySelector('#kt_docs_ckeditor_document'))
|
||||
.then(editor => {
|
||||
const toolbarContainer = document.querySelector('#kt_docs_ckeditor_document_toolbar');
|
||||
|
||||
toolbarContainer.appendChild(editor.ui.view.toolbar.element);
|
||||
})
|
||||
.catch(error => {
|
||||
console.error(error);
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
// Public Functions
|
||||
init: function () {
|
||||
exampleDocument();
|
||||
}
|
||||
};
|
||||
}();
|
||||
|
||||
// On document ready
|
||||
KTUtil.onDOMContentLoaded(function () {
|
||||
KTFormsCKEditorDocument.init();
|
||||
});
|
||||
@@ -0,0 +1,28 @@
|
||||
"use strict";
|
||||
|
||||
// Class definition
|
||||
var KTFormsCKEditorInline = function () {
|
||||
// Private functions
|
||||
var exampleInline = function () {
|
||||
InlineEditor
|
||||
.create(document.querySelector('#kt_docs_ckeditor_inline'))
|
||||
.then(editor => {
|
||||
console.log(editor);
|
||||
})
|
||||
.catch(error => {
|
||||
console.error(error);
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
// Public Functions
|
||||
init: function () {
|
||||
exampleInline();
|
||||
}
|
||||
};
|
||||
}();
|
||||
|
||||
// On document ready
|
||||
KTUtil.onDOMContentLoaded(function () {
|
||||
KTFormsCKEditorInline.init();
|
||||
});
|
||||
@@ -0,0 +1,60 @@
|
||||
"use strict";
|
||||
|
||||
// Class definition
|
||||
var KTFormsQuillAutosave = function () {
|
||||
// Private functions
|
||||
var exampleAutosave = function () {
|
||||
var Delta = Quill.import('delta');
|
||||
var quill = new Quill('#kt_docs_quill_autosave', {
|
||||
modules: {
|
||||
toolbar: true
|
||||
},
|
||||
placeholder: 'Type your text here...',
|
||||
theme: 'snow'
|
||||
});
|
||||
|
||||
// Store accumulated changes
|
||||
var change = new Delta();
|
||||
quill.on('text-change', function (delta) {
|
||||
change = change.compose(delta);
|
||||
});
|
||||
|
||||
// Save periodically
|
||||
setInterval(function () {
|
||||
if (change.length() > 0) {
|
||||
console.log('Saving changes', change);
|
||||
/*
|
||||
Send partial changes
|
||||
$.post('/your-endpoint', {
|
||||
partial: JSON.stringify(change)
|
||||
});
|
||||
|
||||
Send entire document
|
||||
$.post('/your-endpoint', {
|
||||
doc: JSON.stringify(quill.getContents())
|
||||
});
|
||||
*/
|
||||
change = new Delta();
|
||||
}
|
||||
}, 5 * 1000);
|
||||
|
||||
// Check for unsaved data
|
||||
window.onbeforeunload = function () {
|
||||
if (change.length() > 0) {
|
||||
return 'There are unsaved changes. Are you sure you want to leave?';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
// Public Functions
|
||||
init: function () {
|
||||
exampleAutosave();
|
||||
}
|
||||
};
|
||||
}();
|
||||
|
||||
// On document ready
|
||||
KTUtil.onDOMContentLoaded(function () {
|
||||
KTFormsQuillAutosave.init();
|
||||
});
|
||||
@@ -0,0 +1,33 @@
|
||||
"use strict";
|
||||
|
||||
// Class definition
|
||||
var KTFormsQuillBasic = function() {
|
||||
// Private functions
|
||||
var exampleBasic = function() {
|
||||
var quill = new Quill('#kt_docs_quill_basic', {
|
||||
modules: {
|
||||
toolbar: [
|
||||
[{
|
||||
header: [1, 2, false]
|
||||
}],
|
||||
['bold', 'italic', 'underline'],
|
||||
['image', 'code-block']
|
||||
]
|
||||
},
|
||||
placeholder: 'Type your text here...',
|
||||
theme: 'snow' // or 'bubble'
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
// Public Functions
|
||||
init: function() {
|
||||
exampleBasic();
|
||||
}
|
||||
};
|
||||
}();
|
||||
|
||||
// On document ready
|
||||
KTUtil.onDOMContentLoaded(function() {
|
||||
KTFormsQuillBasic.init();
|
||||
});
|
||||
@@ -0,0 +1,28 @@
|
||||
"use strict";
|
||||
|
||||
// Class definition
|
||||
var KTFormsTinyMCEBasic = function() {
|
||||
// Private functions
|
||||
var exampleBasic = function() {
|
||||
var options = {selector: '#kt_docs_tinymce_basic'};
|
||||
|
||||
if (KTApp.isDarkMode()) {
|
||||
options['skin'] = 'oxide-dark';
|
||||
options['content_css'] = 'dark';
|
||||
}
|
||||
|
||||
tinymce.init(options);
|
||||
}
|
||||
|
||||
return {
|
||||
// Public Functions
|
||||
init: function() {
|
||||
exampleBasic();
|
||||
}
|
||||
};
|
||||
}();
|
||||
|
||||
// On document ready
|
||||
KTUtil.onDOMContentLoaded(function() {
|
||||
KTFormsTinyMCEBasic.init();
|
||||
});
|
||||
@@ -0,0 +1,28 @@
|
||||
"use strict";
|
||||
|
||||
// Class definition
|
||||
var KTFormsTinyMCEHidden = function() {
|
||||
// Private functions
|
||||
var exampleHidden = function() {
|
||||
tinymce.init({
|
||||
selector: '#kt_docs_tinymce_hidden',
|
||||
menubar: false,
|
||||
toolbar: ['styleselect fontselect fontsizeselect',
|
||||
'undo redo | cut copy paste | bold italic | link image | alignleft aligncenter alignright alignjustify',
|
||||
'bullist numlist | outdent indent | blockquote subscript superscript | advlist | autolink | lists charmap | print preview | code'],
|
||||
plugins : 'advlist autolink link image lists charmap print preview code'
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
// Public Functions
|
||||
init: function() {
|
||||
exampleHidden();
|
||||
}
|
||||
};
|
||||
}();
|
||||
|
||||
// On document ready
|
||||
KTUtil.onDOMContentLoaded(function() {
|
||||
KTFormsTinyMCEHidden.init();
|
||||
});
|
||||
@@ -0,0 +1,25 @@
|
||||
"use strict";
|
||||
|
||||
// Class definition
|
||||
var KTFormsTinyMCEPlugins = function() {
|
||||
// Private functions
|
||||
var examplePlugins = function() {
|
||||
tinymce.init({
|
||||
selector: '#kt_docs_tinymce_plugins',
|
||||
toolbar: 'advlist | autolink | link image | lists charmap | print preview',
|
||||
plugins : 'advlist autolink link image lists charmap print preview'
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
// Public Functions
|
||||
init: function() {
|
||||
examplePlugins();
|
||||
}
|
||||
};
|
||||
}();
|
||||
|
||||
// On document ready
|
||||
KTUtil.onDOMContentLoaded(function() {
|
||||
KTFormsTinyMCEPlugins.init();
|
||||
});
|
||||
Reference in New Issue
Block a user