feat: added more editor settings
This commit is contained in:
parent
9ce8ad2365
commit
75ae842f4b
@ -67,25 +67,17 @@ class _MyHomePageState extends State<MyHomePage> {
|
||||
onSelected: (val) async {
|
||||
switch (val) {
|
||||
case 0:
|
||||
{
|
||||
String? html = await keyEditor.currentState?.getHtml();
|
||||
print(html);
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
{
|
||||
await keyEditor.currentState?.clear();
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
{
|
||||
await keyEditor.currentState?.unFocus();
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
{
|
||||
await keyEditor.currentState?.focus();
|
||||
}
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
@ -1,5 +1,3 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_html/flutter_html.dart';
|
||||
import 'package:path/path.dart';
|
||||
@ -21,7 +19,8 @@ class FontsDialog extends StatelessWidget {
|
||||
children: [
|
||||
for (SystemFont font in getSystemFonts())
|
||||
InkWell(
|
||||
child: Html(data: '<p style="font-family:${font.name}">'
|
||||
child: Html(
|
||||
data: '<p style="font-family:${font.name}">'
|
||||
'${basename(font.path!)}</p>'),
|
||||
onTap: () {
|
||||
Navigator.pop(context, font.name);
|
||||
|
@ -1,12 +1 @@
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
import 'package:rich_editor/rich_editor.dart';
|
||||
|
||||
void main() {
|
||||
// test('adds one to input values', () {
|
||||
// final calculator = Calculator();
|
||||
// expect(calculator.addOne(2), 3);
|
||||
// expect(calculator.addOne(-7), -6);
|
||||
// expect(calculator.addOne(0), 1);
|
||||
// });
|
||||
}
|
||||
void main() {}
|
||||
|
Loading…
Reference in New Issue
Block a user