editorBuilders static method

List<EmbedBuilder> editorBuilders({
  1. QuillEditorImageEmbedConfigurations? imageEmbedConfigurations = const QuillEditorImageEmbedConfigurations(),
  2. QuillEditorVideoEmbedConfigurations? videoEmbedConfigurations = const QuillEditorVideoEmbedConfigurations(),
})

Returns a list of embed builders for fq.QuillEditor.

This method provides a collection of embed builders to enhance the functionality of a fq.QuillEditor. It offers customization options for handling various types of embedded content, such as images, videos, and formulas.

The method returns a list of fq.EmbedBuilder objects that can be used with QuillEditor to enable embedded content features like images, videos, and formulas.

final quillEditor = QuillEditor( // Other editor configurations embedBuilders: embedBuilders, );

Implementation

static List<fq.EmbedBuilder> editorBuilders({
  QuillEditorImageEmbedConfigurations? imageEmbedConfigurations =
      const QuillEditorImageEmbedConfigurations(),
  QuillEditorVideoEmbedConfigurations? videoEmbedConfigurations =
      const QuillEditorVideoEmbedConfigurations(),
}) {
  if (kIsWeb) {
    throw UnsupportedError(
      'The editorBuilders() is not for web, please use editorWebBuilders() '
      'instead',
    );
  }
  return [
    if (imageEmbedConfigurations != null)
      QuillEditorImageEmbedBuilder(
        configurations: imageEmbedConfigurations,
      ),
    if (videoEmbedConfigurations != null)
      QuillEditorVideoEmbedBuilder(
        configurations: videoEmbedConfigurations,
      ),
    QuillEditorTableEmbedBuilder(),
  ];
}