1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2026-01-03 23:42:28 +03:00

Lexical: Added basic URL field header option list

May show bad option label names on chrome/safari.
This was an easy first pass without loads of extra custom UI since we're
using native datalists.
This commit is contained in:
Dan Brown
2024-08-16 12:29:40 +01:00
parent 1ef4044419
commit ad6b26ba97
7 changed files with 135 additions and 10 deletions

View File

@@ -18,6 +18,7 @@ import {showImageManager} from "../../../utils/images";
import searchImageIcon from "@icons/editor/image-search.svg";
import searchIcon from "@icons/search.svg";
import {showLinkSelector} from "../../../utils/links";
import {LinkField} from "../../framework/blocks/link-field";
export function $showImageForm(image: ImageNode, context: EditorUiContext) {
const imageModal: EditorFormModal = context.manager.createModal('image');
@@ -132,11 +133,11 @@ export const link: EditorFormDefinition = {
{
build() {
return new EditorActionField(
new EditorFormField({
new LinkField(new EditorFormField({
label: 'URL',
name: 'url',
type: 'text',
}),
})),
new EditorButton({
label: 'Browse links',
icon: searchIcon,