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: the editor cannot apply empty string attributes to wysiwyg node #1781

Merged
merged 5 commits into from
Aug 31, 2021

Conversation

js87zz
Copy link
Contributor

@js87zz js87zz commented Aug 30, 2021

Please check if the PR fulfills these requirements

  • It's the right issue type on the title
  • When resolving a specific issue, it's referenced in the PR's title (e.g. fix #xxx[,#xxx], where "xxx" is the issue number)
  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes/features)
  • Docs have been added/updated (for bug fixes/features)
  • It does not introduce a breaking change or has a description of the breaking change

Description


Thank you for your contribution to TOAST UI product. 🎉 😘 ✨

Copy link
Contributor

@lja1018 lja1018 left a comment

Choose a reason for hiding this comment

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

리뷰완료합니다.

Copy link

@dongsik-yoo dongsik-yoo left a comment

Choose a reason for hiding this comment

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

리뷰 완료합니다. 수고하셨습니다.


const result = oneLineTrim`
<iframe width="" height="" src="" class="html-block"></iframe>
<p>test</p>

Choose a reason for hiding this comment

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

속성의 빈값을 확인 하는 것 외에 다른 컨텐츠가 들어가야 할 필요가 있었어요?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

딱히 의미가 없네요. 해당 텍스트는 제거하겠습니다~

@@ -864,6 +864,25 @@ describe('editor', () => {

expect(wwEditor.innerHTML).toContain(result);
});

it('should keep the html block attributes with an empty string after changing the mode', () => {

Choose a reason for hiding this comment

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

설명에 block이 들어갈 필요는 없는 거죠?

Choose a reason for hiding this comment

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

제가 보기에도 굳이 언급 안해도 될 것 같은 단어네요.

Copy link

@adhrinae adhrinae left a comment

Choose a reason for hiding this comment

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

리뷰 완료합니다.

@js87zz js87zz force-pushed the fix/empty-string-attributes branch from ebc207a to ae87ad1 Compare August 31, 2021 02:58
@js87zz js87zz merged commit 8bcc287 into master Aug 31, 2021
@js87zz js87zz deleted the fix/empty-string-attributes branch August 31, 2021 04:16
ahamelers pushed a commit to ahamelers/tui.editor that referenced this pull request Aug 21, 2023
…hn#1781)

* fix: add controls attribute for video

* fix: set attritutes properly with empty string

* chore: add test case(empty string attributes)

* fix: remove attribute when value is null or undefined

* chore: apply code review
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants