Arteditor Rich Text Editor practical method

Source: Internet
Author: User

Interface effect

Website: https://github.com/baixuexiyang/artEditor

Introduction File:

Interface code

<! DOCTYPE html>
lang= "en" >
<meta charset= "UTF-8" >
<title>arteditor</title>
<meta http-equiv= "access-control-allow-origin" content= "*" >
<!--forces the width of the document to remain at 1:1 of the width of the device, and the maximum width of the document is 1.0, and does not allow the user to tap the screen to zoom in.
<meta name= "viewport" content= "initial-scale=1, Maximum-scale=1, User-scalable=no, width= Device-width, Minimal-ui ">
<!--the safari private meta tag in the iphone device, which says: Allow full-screen mode to browse-
<meta name= "apple-mobile-web-app-capable" content= "yes" >
<link rel= "stylesheet" href= "Example/css/style.css" >
<body>
<div style= "width:320px;margin:0 auto;" >
<div class= "publish-article-title" >
<div class= "title-tips" > title </div>
<input type= "text" id= "title" class= "w100" placeholder= " article title" >
</div>
<div class= "publish-article-content" >
<div class= "title-tips" > Body </div>
<input type= "hidden" id= "target" >
<div class= "article-content" id= "content" >
</div>
<div class= "footer-btn g-image-upload-box" >
<div class= "Upload-button" >
&NBSP; <span class=" upload "><i class= "upload-img" > </i> Insert Picture </SPAN>
<input class= "input-file" id= "imageupload" type= "file" name= "fileInput " Capture= "Camera" accept= "image/*" style= "position:absolute;left:0;opacity:0;width:100%;" >
</div>
</div>
</div>
</div>
<script src= "Example/js/jquery-1.11.2.js" ></script>
<script src= "ArtEditor.min.js" ></script>
<script src= "Example/js/index.js" ></script>
</body>

JS Code

Js:

  $ (' #content '). Arteditor ({imgtar: ' #imageUpload ', limitsize:5,//Mega Showserver:false,-- here to modify to True  Uploadurl: ",-- Here's how to upload a picture  data: {}, Uploadfie      LD: ' Image ', Placeholader: ' <p> Please enter the article body Content </p> ', validhtml: [' BR '], uploadsuccess:function (res) { 
$ ("#demon"). Apppend (" ') here as the receive path
}, Uploaderror:function (re s) {//Something error Console.log (res); }});




Function Demon01 () {


  get to the path to the SQL
url= $ (' #demon '). GetValue ();//Detail Get Picture method
$.post ('.. /.. /.. /path location '), {

URL:
url

}

}.function(data)
{

}


估计很多人跟我差不多在传入CS层的时候会发现穿不进去,报错,等,或者是危险代码,
这时候介意在CS层的上方加入
  [ValidateInput(false)]
字段。就可以完成路径的保存了

Arteditor Rich Text Editor practical method

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.