chore: dart fixes

pull/1990/head
CatHood0 9 months ago
parent 8d639795e2
commit 7c3e914d6a
  1. 10
      quill_html_converter/lib/quill_html_converter.dart

@ -1,7 +1,8 @@
library quill_html_converter;
import 'package:dart_quill_delta/dart_quill_delta.dart';
import 'package:vsc_quill_delta_to_html/vsc_quill_delta_to_html.dart' as converter
import 'package:vsc_quill_delta_to_html/vsc_quill_delta_to_html.dart'
as converter
show
ConverterOptions,
QuillDeltaToHtmlConverter,
@ -64,14 +65,14 @@ final _defaultConverterOptions = ConverterOptions(
allow8DigitHexColors: true,
),
// This handle specific styles and attributes
// This handle specific styles and attributes
converterOptions: converter.OpConverterOptions(
customCssStyles: (op) {
// Validate if our attributes exist in [DeltaInsertOp]
// and return the necessary HTML style
// These lists of attributes, are passed as inline styles
//
// For example, if you have a delta like ->
// For example, if you have a delta like ->
// [ { "insert": "hello", "attributes": { "line-height": 1.5 }} ]
//
// Without the validation below to verify if exist line-height atribute in the Operation, it would be:
@ -93,7 +94,8 @@ final _defaultConverterOptions = ConverterOptions(
inlineStyles: converter.InlineStyles(
<String, converter.InlineStyleType>{
'font': converter.InlineStyleType(
fn: (value, _) => converter.defaultInlineFonts[value] ?? 'font-family: $value',
fn: (value, _) =>
converter.defaultInlineFonts[value] ?? 'font-family: $value',
),
'size': converter.InlineStyleType(
fn: (value, _) {

Loading…
Cancel
Save