This replaces our JSON-based richtext diffing with HTML-based richtext diffing for lexical. It uses [this HTML diff library](https://github.com/Arman19941113/html-diff) that I then modified to handle diffing more complex elements like links, uploads and relationships. This makes it way easier to spot changes, replacing the lengthy Lexical JSON with a clean visual diff that shows exactly what's different. ## Before  ## After  
44 lines
1.2 KiB
TypeScript
44 lines
1.2 KiB
TypeScript
export const autosaveCollectionSlug = 'autosave-posts'
|
|
|
|
export const autosaveWithValidateCollectionSlug = 'autosave-with-validate-posts'
|
|
|
|
export const customIDSlug = 'custom-ids'
|
|
|
|
export const draftCollectionSlug = 'draft-posts'
|
|
|
|
export const draftWithValidateCollectionSlug = 'draft-with-validate-posts'
|
|
export const draftWithMaxCollectionSlug = 'draft-with-max-posts'
|
|
|
|
export const postCollectionSlug = 'posts'
|
|
|
|
export const diffCollectionSlug = 'diff'
|
|
export const mediaCollectionSlug = 'media'
|
|
|
|
export const versionCollectionSlug = 'version-posts'
|
|
|
|
export const disablePublishSlug = 'disable-publish'
|
|
|
|
export const disablePublishGlobalSlug = 'disable-publish-global'
|
|
|
|
export const textCollectionSlug = 'text'
|
|
|
|
export const collectionSlugs = [
|
|
autosaveCollectionSlug,
|
|
draftCollectionSlug,
|
|
postCollectionSlug,
|
|
diffCollectionSlug,
|
|
mediaCollectionSlug,
|
|
versionCollectionSlug,
|
|
textCollectionSlug,
|
|
]
|
|
|
|
export const autoSaveGlobalSlug = 'autosave-global'
|
|
export const draftGlobalSlug = 'draft-global'
|
|
export const draftWithMaxGlobalSlug = 'draft-with-max-global'
|
|
|
|
export const globalSlugs = [autoSaveGlobalSlug, draftGlobalSlug]
|
|
|
|
export const localizedCollectionSlug = 'localized-posts'
|
|
|
|
export const localizedGlobalSlug = 'localized-global'
|