Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: value空值判断问题 #12

Merged
merged 4 commits into from
May 17, 2019
Merged

Conversation

donaldshen
Copy link
Contributor

@donaldshen donaldshen commented May 13, 2019

Why

  1. 仅有img时,value为空。fix 如果单单放截图,获取的数据是没有,一定要加点文字才能获取到数据 #9
  2. 切换粗体和斜体,value中自动插入'zero-width space'\u200b,干扰空值判断

How

见xmind

Xmind

image

@donaldshen donaldshen changed the title fix: 仅有img时的value空值问题 fix: value空值判断问题 May 13, 2019
This reverts commit eccd50f.
src/v-editor.vue Outdated
this.$emit('input', value)
// NOTE: 输入内容为空时,返回空字符串。空的quote和table都算内容为空
// WARNING: editor.txt.text()返回的是去掉标签的html内容
// 这意味着空table的时候返回一堆'&nbsp...'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

table 是 tab的意思?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

table是通过menu插入的表格。wangEditor源码里默认生成的table每一个格子里都有一个空格&nbsp

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已完善注释

@donaldshen donaldshen changed the title fix: value空值判断问题 fix: value空值判断问题,fix #9 May 16, 2019
@donaldshen donaldshen changed the title fix: value空值判断问题,fix #9 fix: value空值判断问题 May 16, 2019
@levy9527 levy9527 added the enhancement New feature or request label May 17, 2019
@levy9527 levy9527 merged commit 995ff96 into FEMessage:dev May 17, 2019
@donaldshen donaldshen deleted the fix-data-missing branch May 25, 2019 07:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

如果单单放截图,获取的数据是没有,一定要加点文字才能获取到数据
2 participants