Skip to content

Page editor switching - #3387

Merged
ssddanbrown merged 12 commits into
developmentfrom
editor_switching
Apr 24, 2022
Merged

ssddanbrown merged 12 commits into
developmentfrom
editor_switching

Conversation

@ssddanbrown

@ssddanbrown ssddanbrown commented Apr 17, 2022

Copy link
Copy Markdown
Member

In progress branch of enabling change of editor at a page level.

Related to #119, #369, #458, #842

Progress

  • Update existing editor setting to reflect default.
  • Add new role permission for changing editor.
  • Add switch editor action within editor.
    • Save draft then reload with new editor content.
    • Markdown to HTML Conversion.
    • HTML to markdown conversion (Clean)
    • HTML to markdown conversion (Stable)
    • Prompt for HTML to markdown conversion.
  • Show editor/content type indicator in revisions.
  • Update API to suit.
  • Testing
    • Permission enforcement for pre-save draft
    • Permission enforcement for post-save draft
    • Permission enforcement for non-draft save

Questionables

  • How does API interaction work here? Depend on content type or separate property to define active editor option?
    • We currently allow pushing whatever type of content in, but editor remains depending on global setting. Seperate property, controlled via permission, would align most in forward compatible way.
    • Going to depend on content type, in combination with having the permissions, Can always allow additional control if needed in future.

Potentially Breaking Changes

  • REST API page-create/update actions may now cause the editor, for that page, to change for future in-platform editors depending upon content type.

Preview

bookstack_editor_switching.mp4

@ssddanbrown ssddanbrown added this to the Next Feature Release milestone Apr 17, 2022
@ssddanbrown ssddanbrown self-assigned this Apr 17, 2022
Extracted page editor view data gathering to its own class for
alignment. Updated the data used in views as part of the process to use
view-specific variables instead of custom attributes added to models.
Also moved tinymce library loading so it's not loaded when not using the
wysiwyg editor.
- Updated all dropdown list item actions into three specific styles:
  icon-item, text-item & label-item. Allows a stronger structure while
  prevents mixing of styles as we were getting for header dropdown in
  dark mode.
- Extracted out page editor top toolbar to its own view file & split
  editor switch options to different markdown options.
- Also tweaked some editor revision table styles and merged some
  sections to reduce space usage.
- Works better to avoid bad assumptions when showing the editor based
  upon content type.
- Also updated some previous tests to cleaner format.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

1 participant