Skip to content

Commit

Permalink
Revert toMarkdown function back to original and format
Browse files Browse the repository at this point in the history
  • Loading branch information
etahto committed Feb 7, 2025
1 parent e839f76 commit a48e5fd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
12 changes: 2 additions & 10 deletions etp-front/src/components/text-editor/quill.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,7 @@ const dispatchEvent = (name, node, editor) => {
*/
export const quill = (
node,
{
html = '',
toolbar,
keyboard,
id,
required,
onEditorSetup,
onChange = () => {}
}
{ html = '', toolbar, keyboard, id, required, onEditorSetup }
) => {
let isInitialized = false;
const q = new Quill(node, {
Expand Down Expand Up @@ -74,7 +66,7 @@ export const quill = (
);
remove.href = '';

const focusout = () => {
const focusout = event => {
if (!root.contains(event.relatedTarget) && event.target !== action) {
dispatchEvent('editor-focus-out', node, editor);
}
Expand Down
5 changes: 1 addition & 4 deletions etp-front/src/components/text-editor/text-editor.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,7 @@
}
};
const toMarkdown = html => {
const markdown = turndownService.turndown(html);
return markdown;
};
const toMarkdown = R.bind(turndownService.turndown, turndownService);
let editorElement = null;
Expand Down

0 comments on commit a48e5fd

Please sign in to comment.