glynskyi / zefyrka Goto Github PK
View Code? Open in Web Editor NEWSoft and gentle rich text editing for Flutter applications
License: MIT License
Soft and gentle rich text editing for Flutter applications
License: MIT License
I need add maxLength
Hi, I'm using Zefyrka Package in my flutter web project. But I found some issue in Flutter web.
1 - Zefyrka editor takes 4-5 seconds before someone can use the editor.
2- Line spacing is too much. (Almost like you have enter a new line twice). Is there any way to reduce it?
I am currently using version 2.5.0-6.0.pre (channel dev). When I use alt qr to enter Polish characters, the characters appear twice in the vast majority of cases (this is a problem in the last few versions of Flutter). Except for a few characters (such as "a"), where a character appears only once, but typing any other character after it deletes all edited text (this issue only occurs with ZefyrEditor). Could you please take a look at this?
Thank you:)
Is there a project similar to https://github.com/JacobWrenn/notustohtml/blob/master/lib/notustohtml.dart that will allow for delta to HTML conversion for this new Delta object created in Zefyrka?
When I toggle on a format like bold or italic and then press Enter to go to a newline, the newline is not bolded/italicized as well. Is there a way to stop the all the formatting from clearing when a user goes to a new line?
How do you handle image pick?
A TextField Widget that allow how to convert easily what's in the TextField to with custom texteditor toolbar how to do this package give sample code for this question
chairwatch_flutter depends on zefyrka ^1.0.0+1 which depends on url_launcher ^5.0.0, url_launcher ^5.0.0 is required
[baatdilki] flutter pub get
Running "flutter pub get" in baatdilki...
Because every version of flutter_test from sdk depends on meta 1.3.0 and zefyrka >=1.0.2 depends on meta ^1.4.0, flutter_test from sdk is incompatible with zefyrka >=1.0.2.
So, because baatdilki depends on both zefyrka ^1.0.2+1 and flutter_test any from sdk, version solving failed.
pub get failed (1; So, because baatdilki depends on both zefyrka ^1.0.2+1 and flutter_test any from sdk, version solving failed.)
exit code 1
Is it possible to add our own tool buttons? Love the editor so far, but the toolbar is very basic...
I have a embed node with a button, but the button not receiver the click
This issue is also reported here: memspace/zefyr#426
To erase a horizontal line, you have to place the cursor exactly to the right of the horizontal line.
And it's too difficult in mobile environment.
How about having the horizontal line to be selected when you tap it?
It seems to be need something easier way to delete the horizontal line.
Thanks.
Hi,
I wrapped the widget with Directionality and it is change to RTL but everything become RTL and it fine if u only use RTL Lang but if u want to mix is a problem.
Another thing when is RTL the bullet offset wrong and the bullet under the text.
So maybe you can add it as one of the option like bold or italic
Thank you!
Any other Way to Store Data in Listview
flutter --version
Flutter 2.0.6 • channel unknown • unknown source
Framework • revision 1d9032c7e1 (4 months ago) • 2021-04-29 17:37:58 -0700
Engine • revision 05e680e202
Tools • Dart 2.12.3
I created a simple custom embed and made a builder for it. But the children inside the rendered embed widget doesn't receive clicks from the user.
What I want to do is to add a simple IconButton into the embedded content.
On web, when hovering over the links, it doesn't show the hand cursor to indicate it is a clickable element. However, it is clickable with the editing cursor.
How can i get the HTML from the ZefyrEditor.
if you have something like this:
ZefyrEditor( controller: _controller, readOnly: true, ),
the User will be able to delete the text in the editor.
showCursor: false,
doesn't help
flutter --version:
Flutter 2.2.3 • channel stable • https://github.com/flutter/flutter.git
Framework • revision f4abaa0735 (7 weeks ago) • 2021-07-01 12:46:11 -0700
Engine • revision 241c87ad80
Tools • Dart 2.13.4
Hello,
It would be great if Zefyrka have features such as mention and hashtag highlight with customizable symbols
Any plan to support this features?
Thank you
Hi, I need to dynamically control the height of the parent container, ZefyrField does not have an onChange callback? I need to get the RenderBox in the onChange method to calculate the height. Is there any other way to get the height change of ZefyrField? Thanks.
After upgrading flutter version to 3.10
, following errors occured. Please fix it asap:
Error: The non-abstract class 'RawEditorState' is missing implementations for these members:
editor.dart:714
- TextInputClient.insertContent
Try to either
- provide an implementation,
- inherit an implementation from a superclass or mixin,
- mark the class as abstract, or
- provide a 'noSuchMethod' implementation.
class RawEditorState extends EditorState
^^^^^^^^^^^^^^
/C:/flutter/packages/flutter/lib/src/services/text_input.dart:1117:8: Context: 'TextInputClient.insertContent' is defined here.
void insertContent(KeyboardInsertedContent content) {}
^^^^^^^^^^^^^
: Error: Type 'DragSelectionUpdateCallback' not found.
text_selection.dart:1069
final DragSelectionUpdateCallback? onDragSelectionUpdate;
^^^^^^^^^^^^^^^^^^^^^^^^^^^
: Error: 'DragSelectionUpdateCallback' isn't a type.
text_selection.dart:1069
final DragSelectionUpdateCallback? onDragSelectionUpdate;
^^^^^^^^^^^^^^^^^^^^^^^^^^^
: Error: No named parameter with the name 'kind'.
text_selection.dart:1250
debugOwner: this, kind: PointerDeviceKind.touch),
^^^^
/C:/flutter/packages/flutter/lib/src/gestures/long_press.dart:248:3: Context: Found this candidate, but the arguments don't match.
LongPressGestureRecognizer({
^^^^^^^^^^^^^^^^^^^^^^^^^^
: Error: No named parameter with the name 'kind'.
text_selection.dart:1268
debugOwner: this, kind: PointerDeviceKind.mouse),
^^^^
I can't custom checkbox
no example
Because quill_delta >=1.0.0-dev.3.0 depends on quiver_hashcode ^2.0.0 and every version of zefyrka depends on quiver_hashcode ^3.0.0+1, quill_delta >=1.0.0-dev.3.0 is incompatible with zefyrka.
So, because fashow depends on both quill_delta ^2.0.0 and zefyrka ^1.0.1, version solving failed.
The suggestions does not appear on iOS devices.
If I want to show suggestions, then I have to set autocorrect to true when creating TextInputConfiguration in widgets/editor_input_client_mixin.dart file.
_textInputConnection = TextInput.attach(
this,
TextInputConfiguration(
inputType: TextInputType.multiline,
readOnly: widget.readOnly,
obscureText: false,
autocorrect: true,
inputAction: TextInputAction.newline,
keyboardAppearance: widget.keyboardAppearance,
textCapitalization: widget.textCapitalization,
),
);
I think it should be modified to set autocorrect value to true.
What do you think?
../flutter/.pub-cache/hosted/pub.dartlang.org/zefyrka-1.0.9/lib/src/widgets/editor.dart:722:7: Error: The non-abstract class 'RawEditorState' is missing implementations for these members:
- TextSelectionDelegate.copySelection
- TextSelectionDelegate.cutSelection
- TextSelectionDelegate.pasteText
- TextSelectionDelegate.selectAll
Try to either
- provide an implementation,
- inherit an implementation from a superclass or mixin,
- mark the class as abstract, or
- provide a 'noSuchMethod' implementation.
class RawEditorState extends EditorState
^^^^^^^^^^^^^^
../../../../flutter/packages/flutter/lib/src/services/text_input.dart:948:8: Context: 'TextSelectionDelegate.copySelection' is defined here.
void copySelection(SelectionChangedCause cause) {
^^^^^^^^^^^^^
../../../../flutter/packages/flutter/lib/src/services/text_input.dart:872:8: Context: 'TextSelectionDelegate.cutSelection' is defined here.
void cutSelection(SelectionChangedCause cause) {
^^^^^^^^^^^^
../../../../flutter/packages/flutter/lib/src/services/text_input.dart:900:16: Context: 'TextSelectionDelegate.pasteText' is defined here.
Future<void> pasteText(SelectionChangedCause cause) async {
^^^^^^^^^
../../../../flutter/packages/flutter/lib/src/services/text_input.dart:928:8: Context: 'TextSelectionDelegate.selectAll' is defined here.
void selectAll(SelectionChangedCause cause) {
^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/zefyrka-1.4.0/lib/src/widgets/text_selection.dart:1069:9: Error: Type 'DragSelectionUpdateCallback' not found. This comes after I update the Dart version
Hello, I got the following error when I try to run flutter pub get
Because every version of flutter_test from sdk depends on meta 1.3.0 and zefyrka >=1.0.2 depends on meta ^1.4.0, flutter_test from sdk is incompatible with zefyrka >=1.0.2.
Any solution regarding this matter?
Thank you
Video: https://vimeo.com/658396463/c4966aba27
My scenario: I'm doing a colour button on the toolbar using ZDropdownButton<Color>
. After setting the text style, if I touch anywhere in the editor, except another text, the cursor just vanishes. It continues to accept input, but the cursor is invisible.
The cursor only become visible again if I press [Enter] or touch on another text.
On the video, you can see the cursor briefly disappears after I turn the word Color blue (that's because I touch the test word afterwards). Then, when colouring another word and touching on the empty editor space, notice how the cursor vanishes and never returns (until I touch a word or press [Enter] on the keyboard).
This is my toolbar button (with a modified ZDropdownButton
class so the button don't get 110 pixels of width):
ZDropdownButton<Color>(
child: Icon(Remix.font_color, color: _selectedColor),
initialValue: _selectedColor ?? theme.colorScheme.onSurface,
items: _colors,
onSelected: (color) => _editorController.formatSelection(NotusAttribute.color.fromInt(color.value)),
),
The current color is tracked by:
_editorController.addListener(() {
final selectionStyle = _editorController.getSelectionStyle();
final colorAttribute = selectionStyle.get(NotusAttribute.color);
if (colorAttribute != null) {
setState(() => _selectedColor = Color(colorAttribute.value!));
}
final backgroundColorAttribute = selectionStyle.get(NotusAttribute.backgroundColor);
if (backgroundColorAttribute != null) {
setState(() => _selectedBackgroundColor = Color(backgroundColorAttribute.value!));
}
});
The colours itself are only the current light/dark theme + Material primaries + black and white:
_colors = [
PopupMenuItem(child: SizedBox(width: 80, height: 16, child: Placeholder(color: widget.defaultTextColor)), value: widget.defaultTextColor),
...Colors.primaries.map(
(color) => PopupMenuItem(
child: Container(width: 80, height: 16, color: color),
value: color,
),
),
PopupMenuItem(child: Container(width: 80, height: 16, color: Colors.black), value: Colors.black),
PopupMenuItem(child: Container(width: 80, height: 16, color: Colors.white), value: Colors.white),
];
Try to compile with flutter 3.0 and you'll get the following error:
../../../../Software/flutter/.pub-cache/hosted/pub.dartlang.org/zefyrka-1.1.1/lib/src/widgets/editor.dart:722:7: Error: The non-abstract class 'RawEditorState' is missing implementations for these members:
- TextInputClient.insertTextPlaceholder
- TextInputClient.removeTextPlaceholder
Try to either
- provide an implementation,
- inherit an implementation from a superclass or mixin,
- mark the class as abstract, or
- provide a 'noSuchMethod' implementation.
class RawEditorState extends EditorState
^^^^^^^^^^^^^^
../../../../Software/flutter/packages/flutter/lib/src/services/text_input.dart:1124:8: Context: 'TextInputClient.insertTextPlaceholder' is defined here.
void insertTextPlaceholder(Size size) {}
^^^^^^^^^^^^^^^^^^^^^
../../../../Software/flutter/packages/flutter/lib/src/services/text_input.dart:1127:8: Context: 'TextInputClient.removeTextPlaceholder' is defined here.
void removeTextPlaceholder() {}
^^^^^^^^^^^^^^^^^^^^^
../../../../Software/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_quill-4.1.3/lib/src/widgets/raw_editor.dart:233:7: Error: The non-abstract class 'RawEditorState' is missing implementations for these members:
- TextInputClient.insertTextPlaceholder
- TextInputClient.removeTextPlaceholder
Try to either
- provide an implementation,
- inherit an implementation from a superclass or mixin,
- mark the class as abstract, or
- provide a 'noSuchMethod' implementation.
link https://github.com/glynskyi/zefyrka/blob/main/documentation is not working
When the app is in dark-mode, everything is okay but when in light-mode the text color still remains white and I can't seem to find a way of changing the text color to black.
That threw an exception "Another exception was thrown: Invalid argument(s): Cannot handle u: true".
hintText
Hi @glynskyi, thank you for this Zefyr like package. I've noticed that the Toolbar only shows the buttons when we set them to be hidden, if no parameters are passed then no button is drawn.
Example
ZefyrToolbar.basic( controller: _controller, hideBoldButton: true, hideItalicButton: true, ),
This draws the bold and italic button
I have tried using OnLauncher, but I don't know how to implement it correctly, since when clicking on the link, the Url should open and it doesn't
With my current project Im using null-safe, still with new flutter library I see this error:
════════ Exception caught by widgets library ═══════════════════════════════════
Null check operator used on a null value
The relevant error-causing widget was
ZefyrEditor
Dart 2.13
Flutter: 2.2
The current Dart SDK version is 2.14.4.
Because richtexteditor requires SDK version >=2.15.0-178.1.beta <3.0.0, version solving failed.
Running "flutter pub get" in flutter-rich-text-editor-example...
pub get failed (1; Because richtexteditor requires SDK version >=2.15.0-178.1.beta <3.0.0,
version solving failed.)
My pubspec.yaml defines sdk: ">=2.15.0-144.0.dev <3.0.0" but cannot install the package:
Running "flutter pub get" in myapp...
The current Dart SDK version is 2.15.0-144.0.dev.
Because myapp depends on zefyrka >=1.1.0 which requires SDK version >=2.15.0 <3.0.0, version solving failed.
pub get failed (1; Because myapp depends on zefyrka >=1.1.0 which requires SDK version >=2.15.0 <3.0.0, version solving failed.)
In Editor.dart line 579 child.getPositionForOffset(localOffset);
throws the exception. Looks like the underlying text field isn't getting a size properly. I've tried to put the ZefyrField into Columns, Expanded, Container, etc and it still throws this problem. I've even copied the example code and it gives me the same problems.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.