
Security News
Meet Socket at Black Hat Europe and BSides London 2025
Socket is heading to London! Stop by our booth or schedule a meeting to see what we've been working on.
lcap-wang-editor
Advanced tools
<!-- 该 README.md 根据 api.yaml 和 docs/*.md 自动生成,为了方便在 GitHub 和 NPM 上查阅。如需修改,请查看源文件 -->
Form
请在这里添加描述
<lcap-wang-editor value="<p>hello</p><img src='https://p3-passport.byteimg.com/img/user-avatar/834687b5e4137f4d998a95be7330f543~180x180.awebp'>"></lcap-wang-editor>
<lcap-wang-editor value="<p>hello</p><img src='https://p3-passport.byteimg.com/img/user-avatar/834687b5e4137f4d998a95be7330f543~180x180.awebp'" uploadImgServer="/upload/test"></lcap-wang-editor>
只读模式可以作为富文本编辑器的内容展示区,默认隐藏工具栏,通过readOnly设置
<template>
<div>
<lcap-wang-editor :readOnly="readOnly" value="<p>hello</p><img src='https://p3-passport.byteimg.com/img/user-avatar/834687b5e4137f4d998a95be7330f543~180x180.awebp'>"></lcap-wang-editor>
<u-button @click="handleReadOnly">切换</u-button>
</div>
</template>
<script>
export default {
data() {
return {
readOnly: true
}
},
methods:{
handleReadOnly() {
this.readOnly = !this.readOnly;
},
}
}
</script>
<template>
<u-form ref="form" gap="large">
<u-form-item :required="true" layout="block" rules="required" label="业务口径">
<lcap-wang-editor :value.sync="value" :editorStyle="editorStyle"></lcap-wang-editor>
</u-form-item>
<u-form-item layout="block">
<u-button @click="onClick">验证</u-button>
</u-form-item>
</u-form>
</template>
<script>
export default {
data() {
return {
value: '',
editorStyle: 'height: 300px',
}
},
mounted() {
setTimeout(() => {
this.value = '我有内容了';
}, 1000);
},
methods: {
async onClick() {
const valid = await this.$refs.form.validate();
},
},
}
</script>
| Prop/Attr | Type | Options | Default | Description |
|---|---|---|---|---|
| value.sync | string | '' | 需要传入的文本内容 | |
| readOnly | boolean | false | 启用只读模式 | |
| scroll | boolean | true | 启用滚动 | |
| placeholder | string | '' | 输入提示 | |
| editorStyle | string | '' | 编辑器样式CSS | |
| uploadImgServer | string | '' | 上传图片地址 |
内容修改时触发
| Param | Type | Description |
|---|---|---|
| $event.value | string | 当前输入区域的内容 |
| $event.editor | string | wangeditor 实例 |
输入时触发
| Param | Type | Description |
|---|---|---|
| value | string | 当前输入区域的内容 |
FAQs
<!-- 该 README.md 根据 api.yaml 和 docs/*.md 自动生成,为了方便在 GitHub 和 NPM 上查阅。如需修改,请查看源文件 -->
The npm package lcap-wang-editor receives a total of 3 weekly downloads. As such, lcap-wang-editor popularity was classified as not popular.
We found that lcap-wang-editor demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket is heading to London! Stop by our booth or schedule a meeting to see what we've been working on.

Security News
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.