In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly introduces how to make layui support wangEditor editor, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let Xiaobian take you to understand.
The way to get layui to support the wangEditor editor:
WangEditor.min.js module code
For example, refer to a 123.js "123.js" basic configuration editor module code as follows: layui.config ({base:'.. / lib/wang/' / / wangEditor.min.js directory, modify / / such as my location: lib/wang/wangEditor.min.js}) according to your storage location. Layui.define (function (exports) {exports ('wangeditor.min', function () {demo:demo// is useless, just testing});}); / / layui.use ([' layer', 'form','wangeditor.min'], function () {var layer = layui.layer, form = layui.form, wang=layui.wangeditor (' wang'); wang.create () / / create an editor / / generally use var html = wang.$txt.html () when performing button operations; / / get content, more methods, please wangEditor editor website console.log (html); / / generally use} when performing button operations)
This is the editor.
/ / Rich text editor configures picture upload wang.config.uploadImgUrl ='.. / page/upload/upload.aspx'/ calls the background method wang.config.uploadImgFileName = 'file'//, but you can define wang.config.uploadHeaders = {' Accept': 'text/x-json'}; / / the backend upload return code / / image upload failed. Response.Write "error | returned information" output according to its own program-successful return-direct output image path address: such as "/ upload/xxxx.jpg"-successfully returned-error | returned information
The following is a brief introduction to the content of the assignment editor, which is generally used for article editing
Edit page
Here is the article content var editorhtml=$ ("# content") read by the database. Val () / / get the content of textarea wang.$txt.html (editorhtml) / / add the content to the editor. Thank you for reading this article carefully. I hope the article "how to make layui support wangEditor Editor" shared by the editor will be helpful to everyone. At the same time, I hope you will support it and follow the industry information channel. More related knowledge is waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.