-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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: console error when creating a list with inline style (close #221) #222
Conversation
src/js/wysiwygCommands/ul.js
Outdated
range.setStart(newLIs[0].firstChild, startOffset); | ||
range.setEnd(newLIs[newLIs.length - 1].firstChild, endOffset); | ||
range.setStart(newStartContainer, startOffset); | ||
range.setEnd(newEndContainer, endOffset); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
위에 ol.js, task.js와 비슷한 패턴이 반복해서 쓰이는것 같음으로 재사용할 여지가 많으면, 중복된 패턴을 모아서 함수로 만들어도 좋을것 같습니다.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
옙!
수고하셨습니다. 리뷰 완료했습니다. |
[6/26] 저도 이견 없습니다. 고생하셨어요~ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
수고하셨습니다!!
*/ | ||
const containsNode = function(root, node) { | ||
const walker = document.createTreeWalker(root, 4, null, false); | ||
let found = root === node; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
괄호 하나 쳐주시면 읽기 좋을것 같아요
let found = root === node; | ||
|
||
while (!found && walker.nextNode()) { | ||
found = walker.currentNode === node; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
여기도
* @returns {Range} - range instance | ||
* @memberof WysiwygEditor | ||
*/ | ||
setSelectionByContainerAndOffset(startContainer, startOffset, endContainer, endOffset) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이 친구는 TC 만들기 쉬울것 같은데 빠져있네요?
Please check if the PR fulfills these requirements
fix #xxx[,#xxx]
, where "xxx" is the issue number)Description
#221
Thank you for your contribution to TOAST UI product. 🎉 😘 ✨