集成wangEditor
发表于|更新于
|浏览量:
寿命的缩短与思想的虚耗成正比。——达尔文
wangEditor:Typescript 开发的 Web 富文本编辑器, 轻量、简洁、易用、开源免费
html里集成wangEditor非常简单
1 | <div id="div1"></div> |
只需要上方几行代码即可完成

如果我们需要获取富文本中的内容
使用editor.txt.html()即可
相关推荐
2022-12-19
css attr
过于大方的施舍会导致盗窃——西塞罗 分享一个css函数attr MDN:https://developer.mozilla.org/zh-CN/docs/Web/CSS/attr attr可以获取我们标签内的属性作为值 例如: 1<p data-foo="hello">world</p> css: 123[data-foo]::before { content: attr(data-foo) " ";} 效果: [data-foo]::before { content: attr(data-foo) " "; } world 除了data-*的自定义属性,也可以获取其他的,例如custom-prefix 123456<style>[custom-prefix]::before { content: attr(custom-prefix);}</style><p custom-prefix="hello"&g...
2023-08-16
vue-demi
事物都是互相妥协的。就是冰山也会时而消融,时而重新凝聚。——爱默生 分享一个vue库 https://github.com/vueuse/vue-demi 用来解决编写的代码在vue2和vue3之间的兼容问题 安装: 1npm i vue-demi 然后修改package.json,将vue 和@vue/composition-api添加到peerDependencies中 1234567891011121314151617{ "dependencies": { "vue-demi": "latest" }, "peerDependencies": { "@vue/composition-api": "^1.0.0-rc.1", "vue": "^2.0.0 || >=3.0.0" }, "peerDependenciesM...
2024-10-29
typescript-exercises(三)
青年人的教育是国家的基石。——富兰克林 题面: 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970/*Intro: Since we already have some of the additional information about our users, it's a good idea to output it in a nice way.Exercise: Fix type errors in logPerson function. logPerson function should accept both User and Admin and should output relevant information according to the input: occupation for User an...
2024-07-17
进阶学习css的filter属性
经常谈论别人的短处只会使一个人心胸狭窄,使一个人变得非常多疑,非常无聊。——泰戈尔 首先是这个教程 Filter | CSS-Tricks 还有这个 Filter | CSS-Tricks 这里还有一个在线演示的网址 CSS filter Editor 你可以任意滑动值查看效果 See the Pen CSS filter Editor by Mads Stoumann (@stoumann) on CodePen.
2023-03-24
promisees
爱情是没有悲剧的。唯有缺乏爱情才有悲剧。——泰斯嘉 分享一个网站:https://bevacqua.github.io/promisees/ github:https://github.com/bevacqua/promisees 这个网站可以帮我们清晰地看到Promise的执行过程 非常的有趣和实用
2023-11-08
js惰性函数
要深入了解人的方法只有一个,就是不急于下定论。——圣·普波 在js中我们可以使用惰性函数,用于重新定义函数自身的行为 例如: 12345678910111213141516171819202122function addEvent(type, el, fn) { if (window.addEventListener) { addEvent = function(type, el, fn) { el.addEventListener(type, fn, false); } } else if (window.attachEvent) { addEvent = function(type, el, fn) { el.attachEvent('on' + type, fn); } } else { addEvent = function(type, el, fn) { el['...

阿超
我的名字叫阿超 年龄25岁 家在北京市 职业是软件开发 每天最晚也会在八点前回家 不抽烟 酒浅尝辄止 晚上十二点上床 保证睡足八个小时 睡前写一篇博客 再做二十分钟俯卧撑暖身 然后再睡觉 基本能熟睡到天亮 像婴儿一样不留下任何疲劳和压力 就这样迎来第二天的早晨 健康检查结果也显示我很正常 我想说明我是一个不论何时都追求内心平稳的人 不拘泥于胜负 不纠结于烦恼 不树立使我夜不能寐的敌人 这就是我在这社会的生活态度
Follow Me公告
This is my Blog