Since typing on mobile phones is slow and not suitable for long articles, there are very few rich text editors on mobile phones. artEditor is a mobile rich text editor based on jQuery, which supports inserting images and will improve other functions in the future.
Plug-in address: https://github.com/baixuexiyang/artEditor Welcome to star or fork.
demo
Quote:
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script> <script src="artEditor.min.js"></script>
Parameters:
imgTar
Image upload button
limitSize
Maximum image limit, default 3 MB
showServer
Display images returned from the server. The default is to display images from local resources
uploadUrl
Picture upload Lu Jin
data
Other parameters for uploading images
uploadField
Upload image field
placeholader
Rich text editor holder
validHtml
When pasting, remove illegal html tags
uploadSuccess
Callback on successful image upload
uploadError
Callback for image upload failure
demo:
html:
<div id="content"> </div>
js:
$('#content').artEditor({ imgTar: '#imageUpload', limitSize: 5, // 兆 showServer: false, uploadUrl: '', data: {}, uploadField: 'image', placeholader: '<p>请输入文章正文内容</p>', validHtml: ["br"], uploadSuccess: function(res) { // return img url return res.path; }, uploadError: function(res) { // something error console.log(res); } });
The above content introduces you to the jQuery mobile artEditor rich text editor. I hope you like it.