UI Stabilization: Global color theme updates (#75B2D6), AI Assistant styling refactor, and navigation fixes
This commit is contained in:
@@ -1070,13 +1070,22 @@ export function NoteInput({
|
||||
noteContent={content}
|
||||
noteImages={allImages}
|
||||
onApplyToNote={(newContent) => {
|
||||
// Save current state to history before applying AI content
|
||||
setHistory(prev => [...prev.slice(0, historyIndex + 1), { title, content }])
|
||||
setHistoryIndex(prev => prev + 1)
|
||||
|
||||
if (type === 'richtext') {
|
||||
// If content looks like markdown, convert to HTML before injecting into richtext
|
||||
const looksLikeMarkdown = /^#{1,6}\s|^[-*]\s|\*\*[^*]+\*\*|^>\s/.test(newContent)
|
||||
setContent(looksLikeMarkdown ? markdownToBasicHtml(newContent) : newContent)
|
||||
} else {
|
||||
setContent(newContent)
|
||||
}
|
||||
toast.success(t('ai.appliedToNote'), {
|
||||
action: {
|
||||
label: t('general.undo'),
|
||||
onClick: () => handleUndo()
|
||||
}
|
||||
})
|
||||
}}
|
||||
lastActionApplied={false}
|
||||
notebooks={notebooks.map(nb => ({ id: nb.id, name: nb.name }))}
|
||||
|
||||
Reference in New Issue
Block a user