Appended the popup's text to the editor

pull/13242/head
malik masis 3 years ago
parent a3dc489868
commit 840b7fb96f

@ -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');
});
};

@ -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