Skip to content

Commit

Permalink
Solves styling issue
Browse files Browse the repository at this point in the history
  • Loading branch information
sertxudev committed Jul 7, 2022
1 parent 37ab2ce commit 79b6184
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 18 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@sertxudeveloper/markdown-editor",
"exportName": "MarkdownEditor",
"version": "0.2.6",
"version": "0.2.7",
"description": "A customizable markdown editor for your projects",
"main": "./build/MarkdownEditor.js",
"module": "./build/MarkdownEditor.js",
Expand Down
2 changes: 2 additions & 0 deletions src/plugins/mentions/Mentions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,8 @@ export default class Mentions extends Plugin {
// Fetch the mentions, render them, add the click event handler and append them to the listbox
this.fetchMentions(prefix, search)
.then(mentions => {
this.mentionsListbox.innerHTML = '';

let mentionsElements = mentions.map((item): HTMLElement => {
let element

Expand Down
34 changes: 17 additions & 17 deletions src/scss/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -53,31 +53,31 @@
@apply hidden;
}
}
}

.markdown-editor-preview {
@apply max-w-none pt-5 px-5 pb-1 break-words;
}
.mentions-listbox {
@apply border border-solid rounded-md shadow-md w-64 bg-white;

.mentions-listbox {
@apply border rounded-md shadow-md w-64 bg-white;
.mentions-listbox-item {
@apply py-2 px-3;

.mentions-listbox-item {
@apply py-2 px-3;
&:hover {
@apply bg-blue-100;
}

&:hover {
@apply bg-blue-100;
}
.mentions-listbox-item-name {
@apply text-gray-900 mr-2 text-sm font-medium;
}

.mentions-listbox-item-name {
@apply text-gray-900 mr-2 text-sm font-medium;
}

.mentions-listbox-item-id {
@apply text-gray-600 text-sm;
.mentions-listbox-item-id {
@apply text-gray-600 text-sm;
}
}
}
}

.markdown-editor-preview {
@apply max-w-none pt-5 px-5 pb-1 break-words;
}
}

&.markdown-write-mode {
Expand Down

0 comments on commit 79b6184

Please sign in to comment.