Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(lexical): add lexical to admin #1666

Draft
wants to merge 39 commits into
base: main
Choose a base branch
from

Conversation

andrewleith
Copy link
Member

Summary | Résumé

This is an experiment to try using the Lexical editor inside of admin. It would replace our manual text areas that we require users to enter markdown into.

Right now I just plunked it on the /welcome page while I was trying to get it working.

Lessons learned:

  • Don't use the vanilla js version, since no one does so its very hard to find information

Next steps:

  • Figure out how to make it spit out its content as markdown
  • Use it on the templates page
  • Review form's implementation and use that in place of this stock version

Screenshot

image

@github-actions
Copy link

@andrewleith andrewleith changed the title feat(lexical): add lexical to admin and try it out on the welcome ppage feat(lexical): add lexical to admin Sep 18, 2023
app/assets/javascripts/lexical/Editor.tsx Fixed Show fixed Hide fixed
className="editor-input focus:outline-blue-focus"
id={editorId}
ariaLabel={ariaLabel && ariaLabel}
ariaDescribedBy={ariaDescribedBy && ariaDescribedBy}

Check warning

Code scanning / CodeQL

Identical operands Warning

Operands
ariaDescribedBy
and
ariaDescribedBy
are identical.
ariaLabel?: string;
ariaDescribedBy?: string;
}) => {
var textInput = React.createRef();

Check notice

Code scanning / CodeQL

Unused variable, import, function or class Note

Unused variable textInput.
app/main/views/index.py Fixed Show fixed Hide fixed

import FloatingLinkEditorPlugin from "./plugins/FloatingLinkEditorPlugin";
import ListMaxIndentPlugin from "./plugins/ListMaxIndentPlugin";
import TabIndentationPlugin from "./plugins/TabIndentationPlugin";

Check notice

Code scanning / CodeQL

Unused variable, import, function or class Note

Unused import TabIndentationPlugin.
import { mergeRegister, $getNearestNodeOfType } from "@lexical/utils";

import { $isLinkNode, TOGGLE_LINK_COMMAND } from "@lexical/link";
import { useTranslation } from "react-i18next";

Check notice

Code scanning / CodeQL

Unused variable, import, function or class Note

Unused import useTranslation.
RangeSelection | GridSelection | NodeSelection | null
>(null);

const { t } = useTranslation();

Check notice

Code scanning / CodeQL

Unused variable, import, function or class Note

Unused variable t.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant