mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
Capturing Text box content when enabling markdown editor
This commit is contained in:
parent
474ff8c194
commit
3eb4736a47
6 changed files with 6 additions and 3 deletions
|
@ -691,6 +691,7 @@ function setupMarkdownEditorEnabler() {
|
||||||
elem: document.querySelector('#' + dataId),
|
elem: document.querySelector('#' + dataId),
|
||||||
resize: DownArea.RESIZE_VERTICAL,
|
resize: DownArea.RESIZE_VERTICAL,
|
||||||
hide: ['heading', 'bold-italic'],
|
hide: ['heading', 'bold-italic'],
|
||||||
|
value: document.getElementById(dataId).value
|
||||||
});
|
});
|
||||||
setupAutoResize(dataId);
|
setupAutoResize(dataId);
|
||||||
link.style.display = 'none';
|
link.style.display = 'none';
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
elem: document.querySelector('#body'),
|
elem: document.querySelector('#body'),
|
||||||
resize: DownArea.RESIZE_VERTICAL,
|
resize: DownArea.RESIZE_VERTICAL,
|
||||||
hide: ['heading', 'bold-italic'],
|
hide: ['heading', 'bold-italic'],
|
||||||
|
value: document.getElementById("body").value
|
||||||
});
|
});
|
||||||
setupAutoResize('body');
|
setupAutoResize('body');
|
||||||
});
|
});
|
||||||
|
|
|
@ -34,6 +34,7 @@
|
||||||
elem: document.querySelector('#body'),
|
elem: document.querySelector('#body'),
|
||||||
resize: DownArea.RESIZE_VERTICAL,
|
resize: DownArea.RESIZE_VERTICAL,
|
||||||
hide: ['heading', 'bold-italic'],
|
hide: ['heading', 'bold-italic'],
|
||||||
|
value: document.getElementById("body").value
|
||||||
});
|
});
|
||||||
setupAutoResize('body');
|
setupAutoResize('body');
|
||||||
});
|
});
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
elem: document.querySelector('#body'),
|
elem: document.querySelector('#body'),
|
||||||
resize: DownArea.RESIZE_VERTICAL,
|
resize: DownArea.RESIZE_VERTICAL,
|
||||||
hide: ['heading', 'bold-italic'],
|
hide: ['heading', 'bold-italic'],
|
||||||
value: {{ form.body.data | tojson | safe }},
|
value: document.getElementById("body").value
|
||||||
});
|
});
|
||||||
setupAutoResize('body');
|
setupAutoResize('body');
|
||||||
});
|
});
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
elem: document.querySelector('#body'),
|
elem: document.querySelector('#body'),
|
||||||
resize: DownArea.RESIZE_VERTICAL,
|
resize: DownArea.RESIZE_VERTICAL,
|
||||||
hide: ['heading', 'bold-italic'],
|
hide: ['heading', 'bold-italic'],
|
||||||
value: {{ form.body.data | tojson | safe }}
|
value: document.getElementById("body").value
|
||||||
});
|
});
|
||||||
setupAutoResize('body');
|
setupAutoResize('body');
|
||||||
});
|
});
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
elem: document.querySelector('#about'),
|
elem: document.querySelector('#about'),
|
||||||
resize: DownArea.RESIZE_VERTICAL,
|
resize: DownArea.RESIZE_VERTICAL,
|
||||||
hide: ['heading', 'bold-italic'],
|
hide: ['heading', 'bold-italic'],
|
||||||
value: {{ form.about.data | tojson | safe }}
|
value: document.getElementById("about").value
|
||||||
});
|
});
|
||||||
setupAutoResize('about');
|
setupAutoResize('about');
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue