phoenixLu

Results issues of phoenixLu

类似支付宝首页-更多页里,编辑我的应用的交互方式,在插入到dropdown的位置,不影响其他组件的原来顺序

--- title: MediumEditor富文本编辑器介绍与实战 date: 2018-01-26 --- > [MediumEditor](https://yabwe.github.io/medium-editor/)是一款开源又轻量的行内工具栏编辑器,有三大特点:纯js实现不依赖js库,压缩后紧28k很轻量,兼容高级浏览器及IE9+,另外TA的扩展性非常强,堪称神器了,在github上收获1w+个赞,1.4k+的fork,活跃度也是非常高了。在近期的项目中使用了此插件,下面就来分享一些使用体验和总结。 [MediumEditor]兼容性: ![image](https://cloud.githubusercontent.com/assets/2444240/12874138/d3960a04-cd9b-11e5-8cc5-8136d82cf5f6.png) ## 认识 ![image](https://raw.github.com/yabwe/medium-editor/master/demo/img/medium-editor.jpg) 上图展示了`MediumEditor`这款行内工具式编辑器,比较轻量简单,跟传统的菜单式的富文本编辑器使用体验上有很大差异,更试用于一些**重内容轻排版**的创作平台。支持对文本的加粗、设为标题、设为超链接等基本功能,TA提供很全面的API,来实现对内容的个性化编辑,其强大的扩展性可以很方便的集成你自定义的extensions。 ## 使用 `MediumEditor`上手使用基本无压力,文档与接口说明(虽然是英文)也很清晰。 近期的项目是基于vuejs框架,下面也就介绍下此款编辑器在实际项目的使用姿势。 - ### 安装 当然首先记得install下,通过npm: `npm install medium-editor` or 通过bower: `bower install medium-editor`...

待归档

--- title: svg图标在种草社区项目里的实践 date: 2017-07-29 author: luzhongfang --- > 前端仔对svg这个词应该都不陌生,可缩放的矢量图形,意味着清晰、无损,想来该是越来越高清的手机端的宠儿,然而实际大公司里用的并不多,知乎上也有关于这个问题的[讨论](https://www.zhihu.com/question/26865508)。即便如此,svg在业界还是备受关注的,也有很多人对其看好,觉得是未来趋势。于是,在种草的最新一期需求里,小试了一把,来谈谈使用过程及感受。 先扔个扫盲贴,[SVG Sprite 使用简介](https://github.com/kaola-fed/blog/issues/36)一文类比了icon font,清晰的介绍了svg图标的使用方式。 ### 项目中实践过程 - #### 收集图标 在业务功能都码的差不多了,开始想捣腾下svg了,就从设计师那里,要到了本项目的一些svg图标文件,将各个文件换成了英文名后放到了项目的static目录下。 - #### 拼合图标 查阅了一些文档,发现了一个可以[将svg图标进行拼合的工具](https://github.com/Hiswe/gulp-svg-symbols),有点sprite精灵图的意思。于是在项目中安装了下 ``` npm i gulp-svg-symbols --save-dev ```...

已归档

按钮(按钮组)的点击事件做统一的节流处理 比如只响应最后一次事件 防止重复提交

freemarker包版本似乎有点老 或者不是官方的jar包 解析会有问题 尤其用来stringify对象的时候 建议升级下

### Description 'getClipboardContent' function is a local function, used in the 'handlePaste' method of 'paste extension'; - I want to override the 'handlePaste' method,the method use the 'getClipboardContent' function which...

### When I use pasteHTML to insert elements whitch is contenteditable=false, it will fail at second time See the demo code: https://jsfiddle.net/LatcLud9/ 1. click "insertHTML2", the second time it failed...

### Description selection text , then set "b" , then set "h2", then set "h2", comes nested html looks like a bug; my buttons config like this: ``` buttons: [...

### Description [Description of the bug or feature] ### Steps to reproduce 1. set 'delay' option: ``` delay: 100 ``` 2. select some text 3. if put the cursor out...

in safari, when i paste some text in the editor, the content still has its style attribution; in chrome, it is ok; ``` forcePlainText: true, cleanPastedHTML: true, ```