mhalo / mhalo.kindeditor Goto Github PK
View Code? Open in Web Editor NEWkindeditor美化
Home Page: https://www.npmjs.com/package/mhalo.kindeditor
License: GNU Lesser General Public License v2.1
kindeditor美化
Home Page: https://www.npmjs.com/package/mhalo.kindeditor
License: GNU Lesser General Public License v2.1
对比一下高度,当小于一定阈值后才执行自动高度
1.ke-icon-quote 鼠标经过是:undefined
2.编辑器内有图片,图片下面有很多文件的时候,再对图片,右键编辑的时候,会回弹到上面去。。能不能不回弹,哪个位子右键的就在那里,autoHeightMode: false
这个参数设置成false测试。。..
测试代码如下:
<p>
<img src="/attached/image/20230215/75d077345d732dabbe239dff423694f9b22d0d61.png" alt="" />
</p>
<p>
<br />
</p>
<p>
<br />
</p>
<p>
<br />
</p>
<p>
<br />
</p>
<p>
<br />
</p>
<p>
<br />
</p>
<p>
的撒发生发大师傅
</p>
<p>
啊的首发式发生
</p>
<p>
阿斯顿发顺丰打赏啊大师傅大势发
</p>
<p>
阿斯顿发大水发
</p>
比如,现在的demo页面中的那张图片。
你点击右键,进行图片属性,就会自动获取图片的高度和宽度,我不想设置高度和宽度,
进行删除,然后出现的现象是你删除高度和宽度就互相在玩一样,你删除:宽度,点击高度的设置,就会变成:NaN,
那反过来就是:你删除:高度,点击宽度的设置,就会变成:NaN....查看html代码,实际没有设置图片的高宽。。
能否加个参数控制,不自动获取高宽,或者图片界面,可以不显示:高宽?
https://www.cnblogs.com/jsk540/archive/2011/04/26/2029703.html
做的是旅游行业,需要在内容页中任意位置插入多组图片,需要可以轮播切换,所以。哎,图片可能是风景的,人物,等等。。
我不会转换。。。
只是把节目弄出来了。。哎。。。实在是不想麻烦作者。但是又。。卡在如何上传哪里。。。
前台我会弄。。。前台我用的是:jquery.SuperSlide
现在基本都是上传图片和文件是把图片和文件的路径保存到表里面了。。不需要写一大堆的json字段
// 官方的。。。
{
"moveup_dir_path":"",
"current_dir_path":"",
"current_url":"\/ke4\/php\/..\/attached\/",
"total_count":5,
"file_list":[
{
"is_dir":false,
"has_file":false,
"filesize":208736,
"dir_path":"",
"is_photo":true,
"filetype":"jpg",
"filename":"1241601537255682809.jpg",
"datetime":"2018-06-06 00:36:39"
},
{
"is_dir":false,
"has_file":false,
"filesize":14966,
"dir_path":"",
"is_photo":true,
"filetype":"jpg",
"filename":"1_192040_1.jpg",
"datetime":"2018-06-06 00:36:39"
},
{
"is_dir":false,
"has_file":false,
"filesize":245132,
"dir_path":"",
"is_photo":true,
"filetype":"jpg",
"filename":"2009321101428.jpg",
"datetime":"2018-06-06 00:36:39"
},
{
"is_dir":false,
"has_file":false,
"filesize":229316,
"dir_path":"",
"is_photo":true,
"filetype":"jpg",
"filename":"24000750690483.jpg",
"datetime":"2018-06-06 00:36:39"
},
{
"is_dir":false,
"has_file":false,
"filesize":26094,
"dir_path":"",
"is_photo":true,
"filetype":"jpg",
"filename":"W020091124524510014093.jpg",
"datetime":"2018-06-06 00:36:39"
}
]
}
存到数据表中后,可以直接
{
"error": 0,
"page": 1,
"limit": 20,
"count": 4,
"data": [
{
"size": 139256,
"name": "123qe.png",
"type": "png",
"url": "/static/upload/image/20240112/5a9191d173ff707d5dcfdb12e1b585d8.png",
"datetime": "2024-01-12 18:23:19",
"width": 757,
"height": 930
},
{
"size": 146791,
"name": "ads.png",
"type": "png",
"url": "/static/upload/image/20240112/76d7b92f3a53a387cd6fc76b2a67329d.png",
"datetime": "2024-01-12 18:23:19",
"width": 667,
"height": 951
},
{
"size": 116421,
"name": "win10_21H2_19044.2130.png",
"type": "png",
"url": "/static/upload/image/20240112/9d0d51f5a1293197d8f9cb4305282164.png",
"datetime": "2024-01-12 18:16:49",
"width": 667,
"height": 951
},
{
"size": 106275,
"name": "444.png",
"type": "png",
"url": "/static/upload/image/20210615/6d0965b0eabfb62d77427e0232a4fdc4.png",
"datetime": "2021-06-15 13:31:21",
"width": 409,
"height": 454
}
]
}
error和上传一样,0成功,1失败
page、limit、count、data 这些作者应该都看的明白吧,可能要加一个往下加载的功能了。。图片太多了,卡啊。鼠标经过显示(name+大小+时间),点击就返回url。。
批量上传界面,也可以加入,在:全部插入 按钮的前面加上:图片空间 ,这里就是多选了,我记得哪个改的就是类似。。
RT
插件名称:wx
代码
/*******************************************************************************
* KindEditor - WYSIWYG HTML Editor for Internet
* Copyright (C) 2006-2011 kindsoft.net
*
* @author Roddy <[email protected]>
* @site http://www.kindsoft.net/
* @licence http://www.kindsoft.net/license.php
*******************************************************************************/
KindEditor.plugin('wx', function (K) {
var self = this;
var name = 'wx';
function click(value) {
self.insertHtml(value);
self.select();
self.hideMenu();
}
self.clickToolbar(name, function () {
var menu = self.createMenu({
name: name,
width: 120
});
menu.addItem({
title: '[微信]',
click: function () {
click('[微信]');
}
});
menu.addItem({
title: '[昵称]',
click: function () {
click('[昵称]');
}
});
menu.addItem({
title: '[电话]',
click: function () {
click('[电话]');
}
});
menu.addItem({
title: '[二维码]',
click: function () {
click('[二维码]');
}
});
menu.addItem({
title: '[性别]',
click: function () {
click('[性别]');
}
});
menu.addItem({
title: '[省份]',
click: function () {
click('[省份]');
}
});
menu.addItem({
title: '[城市]',
click: function () {
click('[城市]');
}
});
});
});
lang里面增加
'wx' : '微信相关'
default.css文件里面增加
.ke-icon-wx {
background-position: 0px -1072px;
width: 16px;
height: 16px;
}
在工具栏上面没有显示出来,但是鼠标经过那里的时候,显示:微信相关,也有插件里面的功能。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.