-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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: apply widget syntax in WYSIWYG replaceSelection
API and remove widget syntax in getMarkdown()
API
#1423
Conversation
이견 없습니다. 고생하셨어요~ |
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.
수고하셨습니다.
apps/editor/src/widget/rules.ts
Outdated
@@ -29,7 +29,7 @@ export function createWidgetContent(info: string, content: string) { | |||
export function widgetToDOM(info: string, content: string) { | |||
const { rule, toDOM } = widgetRuleMap[info]; | |||
|
|||
content = trailingWidgetSyntax(content).match(rule)![0]; | |||
content = unwrapWidgetSyntax(content).match(rule)![0]; |
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.
저 위쪽은 text고 여기는 왜 content에요? 미묘하게 다른 것이 있나요??
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.
아 동일합니다. 이쪽을 미처 변경못했네요~text로 변경해둘게요
0e15994
to
0b0d310
Compare
…nsertText() in WYSIWYG)
3999fd5
to
8c31c6b
Compare
Hi team, is it possible that this change is creating this bug: #2663 ? For some reason, the widget syntax is just not being removed at all :-( Thanks! |
… widget syntax in `getMarkdown()` API (nhn#1423) * fix: apply widget rules in WYSIWYG API(replaceSelection) * fix: unwrap widget text in getMarkdown() API * refactor: change trailingWidgetSyntax to unwrapWidgetSyntax * chore: add widget node test case(getMarkdown(), replaceSelection(), insertText() in WYSIWYG) * chore: apply code review * chore: apply code review - 2
Please check if the PR fulfills these requirements
fix #xxx[,#xxx]
, where "xxx" is the issue number)Description
replaceSelection
API when matched with widget text rules$$widget0 ... $$
) on callinggetMarkdown()
APIThank you for your contribution to TOAST UI product. 🎉 😘 ✨