-
Notifications
You must be signed in to change notification settings - Fork 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: add new styling for emoji links #14481
Changes from 5 commits
94a6863
3049eb5
5c75d7c
ee5e019
c60d650
c6ccbfa
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -376,7 +376,12 @@ export default function ToolbarPlugin(props: TextEditorProps) { | |
editor.registerUpdateListener(({ editorState, prevEditorState }) => { | ||
editorState.read(() => { | ||
const textInHtml = $generateHtmlFromNodes(editor).replace(/</g, "<").replace(/>/g, ">"); | ||
props.setText(textInHtml); | ||
props.setText( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Enter results in Multiple enter in a row don't work as expected in the email, but for this case shift-enter can be used. Wasn't able to figure out a fix for this yet |
||
textInHtml.replace( | ||
/<p\s+class="editor-paragraph"[^>]*>\s*<br>\s*<\/p>/g, | ||
"<p class='editor-paragraph'></p>" | ||
) | ||
); | ||
}); | ||
if (!prevEditorState._selection) editor.blur(); | ||
}); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,3 @@ | ||
.editor a { | ||
text-decoration: underline; | ||
font-size: 14px; | ||
} | ||
|
||
.editor li { | ||
padding-left: 1.28571429em; | ||
|
@@ -56,9 +52,18 @@ | |
font-style: italic; | ||
} | ||
|
||
// h6 is only used for emoji links | ||
.editor-heading-h6 { | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure why I need this, but if I remove it then the styles for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah seems like an issue in editor's end really. |
||
|
||
h6 a { | ||
font-size: 20px !important; | ||
text-decoration: none !important; | ||
} | ||
|
||
.editor-link { | ||
color: rgb(33, 111, 219); | ||
text-decoration: none; | ||
text-decoration: underline; | ||
} | ||
|
||
.editor-tokenFunction { | ||
|
@@ -67,6 +72,7 @@ | |
|
||
.editor-paragraph { | ||
margin: 0; | ||
margin-top:14px; | ||
position: relative; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same as behaves in email |
||
color: var(--cal-text); | ||
} | ||
|
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.
add inline styles for emojis (h6 links)