INNER CODE UNIT · TypeScript
getEditorInitialValue
yoav-lavi/melody · playground/src/editors/index.ts:31
const getEditorInitialValue = () => {
const urlParamContent = urlParams.get('content');
if (urlParamContent !== null) {
return decodeURIComponent(atob(urlParamContent));
}
return DEFAULT_EDITOR_VALUE;
};
const initialValue = getEditorInitialValue();
export const initEditors = async () => {
if (!melodyEditorTarget || !regexEditorTarget) {
return;
}
melodyEditorTarget.style.display = 'block';
regexEditorTarget.style.display = 'block';