Because of the slow typing on the phone, it is not suitable for lengthy articles, so there are few rich text editors on the mobile side. Arteditor is a jquery based mobile end Rich text editor, supporting the insertion of pictures, follow-up to improve other features.
Plugin Address: Https://github.com/baixuexiyang/artEditor Welcome to star or fork.
Demo
Reference:
<script src= "Http://code.jquery.com/jquery-1.11.0.min.js" ></script>
Parameters:
Imgtar
Picture Upload button
Limitsize
Picture maximum limit, default 3 trillion
Showserver
Display a picture returned from the server, by default a picture showing local resources
Uploadurl
Picture Upload Road Strength
Data
Upload pictures Other parameters
Uploadfield
Upload picture fields
Placeholader
Rich Text editor Holder
Validhtml
When pasting, remove illegal HTML tags
Uploadsuccess
Picture upload Successful Callback
Uploaderror
Picture upload failed callback
Demo
Html:
Js:
$ (' #content '). Arteditor ({
imgtar: ' #imageUpload ',
limitsize:5,//Mega
Showserver:false,
uploadurl: ' ,
data: {},
Uploadfield: ' Image ',
placeholader: ' <p> Please enter the content of the article Body </p> ',
validhtml: [ BR "],
uploadsuccess:function (res) {
//return img URL return
res.path;
},
Uploaderror: Function (res) {
//Something Error
console.log (res);
}
});
The above content for you to introduce the jquery mobile end Arteditor Rich Text editor of the relevant knowledge, I hope you like.