mirror of
https://code.castopod.org/adaures/castopod
synced 2025-04-23 01:01:20 +00:00

- add basic rollup config to bundle minified and browser compatible js - use babel to transpile typescript files to js - add static code checkers: eslint and stylelint - update package.json scripts - update DEPENDENCIES.md file to include rollup and popper - set html in rss feed description fields - update Podcast and Episode entities to add description_html attribute generated by parsing markdown to html using parsedown #9
20 lines
483 B
TypeScript
20 lines
483 B
TypeScript
import CodeMirror from "codemirror";
|
|
import "codemirror/lib/codemirror.css";
|
|
|
|
const HTMLEditor = (): void => {
|
|
const allHTMLEditors: NodeListOf<HTMLTextAreaElement> = document.querySelectorAll(
|
|
"textarea[data-editor='html']"
|
|
);
|
|
|
|
for (let j = 0; j < allHTMLEditors.length; j++) {
|
|
const textarea = allHTMLEditors[j];
|
|
|
|
CodeMirror.fromTextArea(textarea, {
|
|
lineNumbers: true,
|
|
mode: { name: "xml", htmlMode: true },
|
|
});
|
|
}
|
|
};
|
|
|
|
export default HTMLEditor;
|