Release v2.0.2
This pull request includes significant updates to the post creation and editing pages, as well as the addition of a new EditToolBar
component for the editor. The changes aim to enhance the user experience and streamline the codebase.
Enhancements to Post Creation and Editing:
- Updated the initial state of
postData
to use the current date and time forcreatedAt
andupdatedAt
fields. (app/admin/posts/create/page.tsx
,app/admin/posts/edit/[id]/page.tsx
) (app/admin/posts/create/page.tsxL35-R83, app/admin/posts/edit/[id]/page.tsxR31-R46) - Replaced
ReactQuill
with a newEditor
component that includes a custom toolbar for better text editing capabilities. (app/admin/posts/create/page.tsx
,app/admin/posts/edit/[id]/page.tsx
) (app/admin/posts/create/page.tsxL226-R255, app/admin/posts/edit/[id]/page.tsxL179-R198) - Added
editorValue
to handle date conversions and maintain consistency in the editor's state. (app/admin/posts/create/page.tsx
,app/admin/posts/edit/[id]/page.tsx
) (app/admin/posts/create/page.tsxL35-R83, app/admin/posts/edit/[id]/page.tsxR31-R46)
Addition of EditToolBar
Component:
- Created a new
EditToolBar
component with custom undo and redo buttons, and a variety of formatting options for the editor. (app/components/EditToolBar.tsx
) - Integrated
EditToolBar
into the newEditor
component to provide enhanced text editing functionality. (app/components/EditToolBar.tsx
)
CSS Adjustments:
- Added custom styles to ensure consistent formatting across various HTML elements within the
.content
class. (app/globals.css
) [1] [2] - Applied specific styles for the Quill editor to improve its appearance and usability. (
app/globals.css
)