Skip to content

Commit

Permalink
fix: editor not showing
Browse files Browse the repository at this point in the history
  • Loading branch information
Shubham-Lal committed Jul 10, 2024
1 parent aa4833a commit 405b6c2
Show file tree
Hide file tree
Showing 122 changed files with 7 additions and 44 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 6 additions & 6 deletions client/src/pages/create-debate/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ export default function CreateDebatePage() {
try {
const link = document.createElement('link');
link.rel = 'stylesheet';
link.href = '/src/sceditor/minified/themes/default.min.css';
link.href = '/sceditor/minified/themes/default.min.css';
document.head.appendChild(link);

const sceditorScript = document.createElement('script');
sceditorScript.src = '/src/sceditor/minified/sceditor.min.js';
sceditorScript.src = '/sceditor/minified/sceditor.min.js';
sceditorScript.onload = () => {
const formatScript = document.createElement('script');
formatScript.src = '/src/sceditor/minified/formats/xhtml.js';
formatScript.src = '/sceditor/minified/formats/xhtml.js';
formatScript.onload = () => {
if (textareaRef.current) {
fetch('/src/pages/create-debate/emoticons.json')
fetch('/sceditor/emoticons/emoticons.json')
.then(response => response.json())
.then((emoticons: string[]) => {
const emoticonsConfig: { dropdown: { [key: string]: string } } = { dropdown: {} };
Expand All @@ -32,8 +32,8 @@ export default function CreateDebatePage() {

(window as any).sceditor.create(textareaRef.current, {
format: 'xhtml',
style: '/src/sceditor/minified/themes/default.min.css',
emoticonsRoot: '/src/sceditor/emoticons/',
style: '/sceditor/minified/themes/default.min.css',
emoticonsRoot: '/sceditor/emoticons/',
emoticons: emoticonsConfig
});

Expand Down
37 changes: 0 additions & 37 deletions client/src/sceditor/emoticons/emoticons.json

This file was deleted.

2 changes: 1 addition & 1 deletion client/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true
},
"include": ["src"],
"include": ["src", "public/sceditor"],
"references": [{ "path": "./tsconfig.node.json" }]
}

0 comments on commit 405b6c2

Please sign in to comment.