Browse Source

Appended the popup's text to the editor

pull/13242/head
malik masis 4 years ago
parent
commit
840b7fb96f
  1. 8
      modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Contents/addWidgetModal.js
  2. 11
      modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Pages/create.js

8
modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Contents/addWidgetModal.js

@ -4,7 +4,13 @@ $(function () {
var initModal = function () {
$("#save-changes").click(function () {
alert("works");
var updatedText = $("#textId").val();
var contentEditorText = $("#ContentEditor")[0].innerText.split("\n")[2];
$('.ProseMirror div').contents()[0].data = contentEditorText + updatedText;
$('#addWidgetModal').modal('hide');
});
};

11
modules/cms-kit/src/Volo.CmsKit.Admin.Web/Pages/CmsKit/Pages/create.js

@ -137,15 +137,6 @@ $(function () {
}
}
});
editor.insertToolbarItem({ groupIndex: 0, itemIndex: 0 }, {
name: 'myItem',
tooltip: 'Custom Button',
command: 'bold',
text: '@',
className: 'toastui-editor-toolbar-icons first',
style: { backgroundImage: 'none' }
});
}
function uploadFile(blob, callback, source) {
@ -188,9 +179,7 @@ $(function () {
button.style.margin = '0';
button.innerHTML = `AW`;
button.addEventListener('click', (event) => {
//editor.exec('bold');
event.preventDefault();
alert("ye");
widgetModal.open();
});

Loading…
Cancel
Save