chore: prepare release
This commit is contained in:
parent
27b4992817
commit
08f456aaaf
@ -1,3 +1,3 @@
|
||||
## 0.0.1
|
||||
|
||||
* TODO: Describe initial release.
|
||||
* Initial release with basic features
|
||||
|
20
README.md
20
README.md
@ -1,5 +1,5 @@
|
||||
# ✨ rich_editor
|
||||
[![pub package](https://img.shields.io/pub/v/badge.svg)](https://pub.dartlang.org/packages/rich_editor)
|
||||
[![pub package](https://img.shields.io/pub/v/rich_editor.svg)](https://pub.dartlang.org/packages/rich_editor)
|
||||
[![pub points](https://badges.bar/rich_editor/pub%20points)](https://pub.dev/packages/rich_editor/score)
|
||||
|
||||
WYSIWYG editor for Android and JavaFX with a rich set of supported formatting options.
|
||||
@ -25,8 +25,24 @@ Based on https://github.com/dankito/RichTextEditor, but for Flutter.
|
||||
- [ ] Search
|
||||
|
||||
## 📸 Screenshots
|
||||
<img src="res/1.png" width="400">
|
||||
<img src="res/2.png" width="400">
|
||||
|
||||
|
||||
## Usage
|
||||
```dart
|
||||
RichEditor(
|
||||
key: keyEditor,
|
||||
value: 'initial html here',
|
||||
// You can return a Link (maybe you need to upload the image to your
|
||||
// storage before displaying in the editor or you can also use base64
|
||||
getImageUrl: (image) {
|
||||
String link = 'https://avatars.githubusercontent.com/u/24323581?v=4';
|
||||
String base64 = base64Encode(image.readAsBytesSync());
|
||||
String base64String = 'data:image/png;base64, $base64';
|
||||
return base64String;
|
||||
},
|
||||
)
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
|
@ -86,7 +86,14 @@ class _MyHomePageState extends State<MyHomePage> {
|
||||
),
|
||||
body: RichEditor(
|
||||
key: keyEditor,
|
||||
value: '<p> init html val </p>',
|
||||
value: '''
|
||||
<h1>Heading 1</h1>
|
||||
<h2>Heading 2</h2>
|
||||
<h3>Heading 3</h3>
|
||||
<h4>Heading 4</h4>
|
||||
<h5>Heading 5</h5>
|
||||
<h6>Heading 6</h6>
|
||||
''',
|
||||
// You can return a Link (maybe you need to upload the image to your
|
||||
// storage before displaying in the editor or you can also use base64
|
||||
getImageUrl: (image) {
|
||||
|
@ -38,11 +38,13 @@ class FontListParser {
|
||||
break;
|
||||
}
|
||||
}
|
||||
SystemFont systemFont = new SystemFont(family.name!, font.t ?? '');
|
||||
if (fonts.contains(systemFont)) {
|
||||
continue;
|
||||
if( font.t != null) {
|
||||
SystemFont systemFont = new SystemFont(family.name!, font.t!);
|
||||
if (fonts.contains(systemFont)) {
|
||||
continue;
|
||||
}
|
||||
fonts.add(new SystemFont(family.name!, font.t!));
|
||||
}
|
||||
fonts.add(new SystemFont(family.name!, font.t ?? ''));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user