Home > Web Front-end > JS Tutorial > ArtEditor rich text editor adds form submission function_javascript skills

ArtEditor rich text editor adds form submission function_javascript skills

WBOY
Release: 2016-05-16 15:04:59
Original
1610 people have browsed it

Summary:

artEditor.js is a mobile rich text editor that supports image uploading, and will add emoticons, short videos and other functions later. Recently, a friend reported whether artEditor supports form submission. Of course, it does. Before this function is developed, you can implement form submission as follows

$('.submit').on('click', function(e) {
e.preventDefault();
$('.hidden').val($('#artEditor').getValue());
$(this).submit();
}); 
Copy after login

New features:

Added formInputId parameter, which represents the id of the hidden field of the form, and will put the editor content into the hidden field, as follows:

<form action="">
<input type="hidden" id="target">
<div id="artEditor">
</div>
</form>
<script>
$('#artEditor').artEditor({
formInputId: 'target'
});
</script>
Copy after login

Related reading:

jQuery mobile artEditor rich text editor

The editor will tell you so much about adding the form submission function to the ArtEditor rich text editor. I hope it will be helpful to you!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template