mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 18:51:41 +09:00
Always treat the textarea skin as producing HTML content, because it automatically generates HTML
This commit is contained in:
parent
2533db414b
commit
db8aa6fc2d
1 changed files with 16 additions and 1 deletions
|
|
@ -28,9 +28,24 @@
|
|||
|
||||
// Save edited content
|
||||
textarea.on("change", function() {
|
||||
content_input.val("<p>" + String($(this).val()).escape().replace(/\r?\n/, "</p>\n<p>") + "</p>");
|
||||
content_input.val("<p>" + String($(this).val()).escape().replace(/\r?\n/g, "</p>\n<p>") + "</p>");
|
||||
});
|
||||
|
||||
// Add use_editor and use_html fields to parent form.
|
||||
var parentform = $('#textarea_instance_{$editor_sequence}').parents('form');
|
||||
var use_editor = parentform.find("input[name='use_editor']");
|
||||
var use_html = parentform.find("input[name='use_html']");
|
||||
if (use_editor.size()) {
|
||||
use_editor.val("Y");
|
||||
} else {
|
||||
parentform.append('<input type="hidden" name="use_editor" value="Y" />');
|
||||
}
|
||||
if (use_html.size()) {
|
||||
use_html.val("Y");
|
||||
} else {
|
||||
parentform.append('<input type="hidden" name="use_html" value="Y" />');
|
||||
}
|
||||
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue