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

block node and createEditor #173

Open
wants to merge 42 commits into
base: main
Choose a base branch
from
Open

block node and createEditor #173

wants to merge 42 commits into from

Conversation

Yxwww
Copy link
Contributor

@Yxwww Yxwww commented Sep 21, 2022

  • backwards compatible with existing schema
  • new article schema preset that uses a block node as the top level node

@@ -118,7 +125,23 @@ function CodeActions(props: ActionProps) {

if (!editorState || !node || pos == null) return null;

const onDelete = () => dispatch(deleteNode(stateId, viewId, { node, pos }));
const onDelete = () => {
const foundParentFigureResult = findParentNodeOfTypeClosestToPos(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes an issue where delete code actions does not delete the figure wrapped around it

@@ -19,6 +20,23 @@ export const initialState: EditorsState = {
// eslint-disable-next-line @typescript-eslint/default-param-last
const editorReducer = (state = initialState, action: EditorActionTypes): EditorsState => {
switch (action.type) {
case REGISTER_EDITOR_STATE: {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make it so that we can directly register editor state using the state object. The future goal is not having editor state in redux at all

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.

2 participants