mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-17 14:04:26 +01:00
Fix: Rich TextBox (Summernote) not saving changes in code-view
The richtext box had an annoying bug: If you switch to code view, modify the code then save, the changes would be ignored. One had to switch back to preview mode prior to save. (See summernote/summernote#94 for more details)
This commit is contained in:
@@ -127,6 +127,16 @@
|
|||||||
@section PageFootContent {
|
@section PageFootContent {
|
||||||
<partial name="_ValidationScriptsPartial" />
|
<partial name="_ValidationScriptsPartial" />
|
||||||
<script src="~/vendor/summernote/summernote-bs5.js" asp-append-version="true"></script>
|
<script src="~/vendor/summernote/summernote-bs5.js" asp-append-version="true"></script>
|
||||||
|
<script>
|
||||||
|
// Fix annoying summernote bug (need to go back to preview after changing codeview): https://github.com/summernote/summernote/issues/94
|
||||||
|
document.querySelector('#save-form').addEventListener('submit', function (e) {
|
||||||
|
const codeView = document.querySelector(".note-codeview-keep.active");
|
||||||
|
if (codeView) {
|
||||||
|
codeView.click();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
||||||
<script>
|
<script>
|
||||||
var triggers = @Safe.Json(Model.Triggers);
|
var triggers = @Safe.Json(Model.Triggers);
|
||||||
var triggersByType = {};
|
var triggersByType = {};
|
||||||
|
|||||||
Reference in New Issue
Block a user