🐛 (textBubble) Fix link parsing in text editor
This commit is contained in:
@ -3,6 +3,7 @@ import { useTypebot } from '@/features/editor'
|
||||
import { TextBubbleBlock } from 'models'
|
||||
import React from 'react'
|
||||
import { parseVariableHighlight } from '@/utils/helpers'
|
||||
import { isEmpty } from 'utils'
|
||||
|
||||
type Props = {
|
||||
block: TextBubbleBlock
|
||||
@ -17,9 +18,9 @@ export const TextBubbleContent = ({ block }: Props) => {
|
||||
flexDir={'column'}
|
||||
opacity={block.content.html === '' ? '0.5' : '1'}
|
||||
className="slate-html-container"
|
||||
color={isEmpty(block.content.plainText) ? 'gray.500' : 'inherit'}
|
||||
dangerouslySetInnerHTML={{
|
||||
__html:
|
||||
block.content.html === ''
|
||||
__html: isEmpty(block.content.plainText)
|
||||
? `<p>Click to edit...</p>`
|
||||
: parseVariableHighlight(block.content.html, typebot),
|
||||
}}
|
||||
|
@ -23,10 +23,11 @@ export const platePlugins = createPlugins(
|
||||
renderAfterEditable: PlateFloatingLink,
|
||||
options: {
|
||||
isUrl: (url: string) =>
|
||||
url.startsWith('http') ||
|
||||
url.startsWith('mailto') ||
|
||||
url.startsWith('tel') ||
|
||||
url.startsWith('sms'),
|
||||
url.startsWith('http:') ||
|
||||
url.startsWith('https:') ||
|
||||
url.startsWith('mailto:') ||
|
||||
url.startsWith('tel:') ||
|
||||
url.startsWith('sms:'),
|
||||
},
|
||||
}),
|
||||
],
|
||||
|
@ -27,6 +27,8 @@ services:
|
||||
- ENCRYPTION_SECRET=SgVkYp2s5v8y/B?E(H+MbQeThWmZq4t6
|
||||
- ADMIN_EMAIL=me@email.com
|
||||
- NEXTAUTH_URL_INTERNAL=http://host.docker.internal:8080
|
||||
- GITHUB_CLIENT_ID=37a279454d016598c2df
|
||||
- GITHUB_CLIENT_SECRET=4b288a509352b591cd4478e3ac901668b2f8ed03
|
||||
typebot-viewer:
|
||||
build:
|
||||
context: .
|
||||
|
Reference in New Issue
Block a user