Merge pull request 'Capturing Text box content when enabling markdown editor' (#294) from JollyDevelopment/pyfedi:jollydev/fix-markdown-text-clear into main

Reviewed-on: https://codeberg.org/rimu/pyfedi/pulls/294
This commit is contained in:
rimu 2024-08-16 23:56:09 +00:00
commit 5fc46e4abe
6 changed files with 6 additions and 3 deletions

View file

@ -691,6 +691,7 @@ function setupMarkdownEditorEnabler() {
elem: document.querySelector('#' + dataId),
resize: DownArea.RESIZE_VERTICAL,
hide: ['heading', 'bold-italic'],
value: document.getElementById(dataId).value
});
setupAutoResize(dataId);
link.style.display = 'none';

View file

@ -29,6 +29,7 @@
elem: document.querySelector('#body'),
resize: DownArea.RESIZE_VERTICAL,
hide: ['heading', 'bold-italic'],
value: document.getElementById("body").value
});
setupAutoResize('body');
});

View file

@ -34,6 +34,7 @@
elem: document.querySelector('#body'),
resize: DownArea.RESIZE_VERTICAL,
hide: ['heading', 'bold-italic'],
value: document.getElementById("body").value
});
setupAutoResize('body');
});

View file

@ -34,7 +34,7 @@
elem: document.querySelector('#body'),
resize: DownArea.RESIZE_VERTICAL,
hide: ['heading', 'bold-italic'],
value: {{ form.body.data | tojson | safe }},
value: document.getElementById("body").value
});
setupAutoResize('body');
});

View file

@ -27,7 +27,7 @@
elem: document.querySelector('#body'),
resize: DownArea.RESIZE_VERTICAL,
hide: ['heading', 'bold-italic'],
value: {{ form.body.data | tojson | safe }}
value: document.getElementById("body").value
});
setupAutoResize('body');
});

View file

@ -35,7 +35,7 @@
elem: document.querySelector('#about'),
resize: DownArea.RESIZE_VERTICAL,
hide: ['heading', 'bold-italic'],
value: {{ form.about.data | tojson | safe }}
value: document.getElementById("about").value
});
setupAutoResize('about');
});