zefyr icon indicating copy to clipboard operation
zefyr copied to clipboard

set hint text in zefyr

Open MaheshManoharan opened this issue 5 years ago • 34 comments

How to set hint text zefyr, I already put the question in Reddit and StackOverflow. but no one answers. So tell me please

MaheshManoharan avatar Feb 20 '21 08:02 MaheshManoharan

Do you mean placeholder, similar to https://github.com/singerdmx/flutter-quill/issues/11 ?

singerdmx avatar Feb 20 '21 08:02 singerdmx

Can you share Reddit and StackOverflow links?

singerdmx avatar Feb 20 '21 08:02 singerdmx

@MaheshManoharan I have a change that gets most working. Needs final touch

singerdmx avatar Feb 20 '21 09:02 singerdmx

@singerdmx https://www.reddit.com/r/FlutterDev/comments/lo04xy/zefyr_editor_in_flutter/ https://stackoverflow.com/questions/66289273/how-to-set-hint-text-in-zefyr-in-flutter here is the links

MaheshManoharan avatar Feb 20 '21 11:02 MaheshManoharan

yes...just like placeholder... users need to know what to do in that textfield. I don't know how to do it in zefyrEditor please help me.

MaheshManoharan avatar Feb 20 '21 11:02 MaheshManoharan

@singerdmx I know you did something, just like passing placeholder. But as a beginner in programming and github I don't know what to do now. Could you please say What I want to do now to get placeholder or hint text functionality?

MaheshManoharan avatar Feb 20 '21 11:02 MaheshManoharan

@MaheshManoharan OK, my change is done now. I tested it on my phone and it is working. All you need to do is this: image

singerdmx avatar Feb 20 '21 17:02 singerdmx

@singerdmx A little bit doubt again... I am using ZefyrEditor, But you showed me in QuillEditor

MaheshManoharan avatar Feb 20 '21 17:02 MaheshManoharan

I don't think Zefyr is accepting pull request. And this change is for https://pub.dev/packages/flutter_quill I will submit my change once my team mate verifies the change is working.

singerdmx avatar Feb 20 '21 19:02 singerdmx

I saw your package. It's nice, I will comment after check it out. Thank you for your response.

MaheshManoharan avatar Feb 21 '21 02:02 MaheshManoharan

I checked your example, but it shows just a white blank screen based on pub

MaheshManoharan avatar Feb 21 '21 03:02 MaheshManoharan

@MaheshManoharan the change is not checked in yet. Please wait until my team mate @li3317 verifies the change. Then we will bump the version

singerdmx avatar Feb 21 '21 03:02 singerdmx

@singerdmx could you please inform me, when it's over.

MaheshManoharan avatar Feb 21 '21 03:02 MaheshManoharan

@li3317 will update this thread here once it is in and let you know how to use placeholder with details

singerdmx avatar Feb 21 '21 03:02 singerdmx

Hi @MaheshManoharan Sorry about the delay! The change is now available on at https://pub.dev/packages/flutter_quill! Here's an example of how it looks. 151430107_289821215825210_5622744891969403627_n

li3317 avatar Feb 21 '21 03:02 li3317

@li3317 , @singerdmx Thank you both. I will comment after checking out.

MaheshManoharan avatar Feb 21 '21 03:02 MaheshManoharan

@li3317 , @singerdmx No change, it just shows a blank screen. I have just used the code in pub example.

MaheshManoharan avatar Feb 21 '21 03:02 MaheshManoharan

image

Did you add anything here?

singerdmx avatar Feb 21 '21 03:02 singerdmx

@singerdmx no I can't add placeholder, because it just shows a white blank screen. I haven't added it yet. just used this example code in https://pub.dev/packages/flutter_quill/example

MaheshManoharan avatar Feb 21 '21 03:02 MaheshManoharan

@singerdmx how did you upload the image? I can post my screenshot.

MaheshManoharan avatar Feb 21 '21 03:02 MaheshManoharan

New version with placeholder support is published! (By the way I dragged and dropped the screenshot into text box here)

li3317 avatar Feb 21 '21 03:02 li3317

@li3317 it shows awaiting... Screenshot_1613878751

MaheshManoharan avatar Feb 21 '21 03:02 MaheshManoharan

I got above screen - blank white screen

MaheshManoharan avatar Feb 21 '21 03:02 MaheshManoharan

Paste your code

singerdmx avatar Feb 21 '21 04:02 singerdmx

Also can you try to run the code in https://github.com/singerdmx/flutter-quill/tree/stable/app and let us know what you see?

singerdmx avatar Feb 21 '21 04:02 singerdmx

`import 'dart:async'; import 'dart:io';

import 'package:flutter/material.dart'; import 'package:flutter_quill/widgets/controller.dart'; import 'package:flutter_quill/widgets/editor.dart'; import 'package:flutter_quill/widgets/toolbar.dart';

void main() => MaterialApp(home: HomePage());

class HomePage extends StatefulWidget { @override _HomePageState createState() => _HomePageState(); }

class _HomePageState extends State<HomePage> { QuillController _controller = QuillController.basic();

@override Widget build(BuildContext context) { return Scaffold( body: Column( children: [ QuillToolbar.basic( controller: _controller, uploadFileCallback: _uploadImageCallBack), Expanded( child: Container( child: QuillEditor.basic( controller: _controller, readOnly: false, // change to true to be view only mode ), ), ) ], )); }

Future<String> _uploadImageCallBack(File file) async { // call upload file API and return file's absolute url return new Completer<String>().future; } } `

MaheshManoharan avatar Feb 21 '21 05:02 MaheshManoharan

You did it wrong please read REAME

singerdmx avatar Feb 21 '21 05:02 singerdmx

Please follow https://github.com/singerdmx/flutter-quill/blob/stable/app/lib/pages/home_page.dart

singerdmx avatar Feb 21 '21 05:02 singerdmx

@singerdmx oh..my bad. I have been using zefyr, now I have changed my mind to use flutter-quill, Your response is the best. Thank you, guys. You are so supportive. flutter-quill/stable app code is working fine. Is there any doubt or question, should I comment here. As a beginner, I don't know what to talk about.

MaheshManoharan avatar Feb 21 '21 05:02 MaheshManoharan

@MaheshManoharan for issues regarding https://pub.dev/packages/flutter_quill , please create issue under https://github.com/singerdmx/flutter-quill/issues

We were using Zefyr until we found it uses custom delta format that is incompatible with quilljs https://quilljs.com/docs/formats

Also lack of support is one of the reasons as well.

singerdmx avatar Feb 21 '21 05:02 singerdmx