Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[QUESTION] Boring text upload message in the top left corner of the page #28

Closed
andeersonluiz opened this issue Apr 25, 2021 · 10 comments
Closed
Labels
question Further information is requested

Comments

@andeersonluiz
Copy link

Hello, i'm using the html-editor and ever when do upload image in text edditing an text is showed in the top left side from page saying "Find file - NameFile ". How i remove it? The image bellow show the message in my page.

Sem título

My CustomHtmlEditor:

return Theme(
  data: ThemeData(
      primaryColor: Colors.red,
      selectedRowColor: Colors.red,
      textTheme: Theme.of(context).textTheme.apply(
            bodyColor: Theme.of(context).primaryColor,
            displayColor: Theme.of(context).primaryColor,
            decorationColor: Theme.of(context).primaryColor,
          )),
  child: HtmlEditor(
    controller: controller,
    htmlEditorOptions: HtmlEditorOptions(
      hint: "Escreva o texto aqui...",
      initialText: initialText,
    ),
    otherOptions: OtherOptions(
        height: 400,
        ),
    callbacks: Callbacks(
      onChange: onChange,
    ),
    htmlToolbarOptions: HtmlToolbarOptions(
        buttonFocusColor: Theme.of(context).primaryColor,
        buttonColor: Theme.of(context).primaryColor,
        buttonBorderColor: Colors.black,
        buttonFillColor: Theme.of(context).backgroundColor,
        buttonSelectedColor: Theme.of(context).primaryColor,
        dropdownFocusColor: Theme.of(context).primaryColor,
        textStyle: Theme.of(context)
            .textTheme
            .caption!
            .copyWith(color: Theme.of(context).primaryColor),
        toolbarType: ToolbarType.nativeGrid,
        defaultToolbarButtons: [
          StyleButtons(),
          FontSettingButtons(fontSizeUnit: false),
          FontButtons(
              clearAll: false, superscript: false, subscript: false),
          ParagraphButtons(
              increaseIndent: false,
              decreaseIndent: false,
              textDirection: false,
              lineHeight: false,
              caseConverter: false),
          InsertButtons(
            otherFile: false,
          ),
        ]),
  ),
);
@andeersonluiz andeersonluiz added the question Further information is requested label Apr 25, 2021
@tneotia
Copy link
Owner

tneotia commented Apr 25, 2021

Hi, which web renderer are you using when building the page? I suggest to use the html web renderer.

See here: https://github.com/tneotia/html-editor-enhanced#important-note-for-web

If you are using the html renderer then let me know and I'll look into this. Thanks!

@andeersonluiz
Copy link
Author

Yes, i'm using html render. I run the flutter with the following command:
flutter run --web-renderer html or flutter build --web-renderer html

@tneotia
Copy link
Owner

tneotia commented Apr 26, 2021

Hmm I tested with the example app and your widget code, but I cannot reproduce:

image

As you can see I inserted an image there but I don't see any "pick file" button in the top left.

Would you be able to share the code of your entire page? This way I can exactly test your use case and see what the issue is. Thanks for the reply!

@andeersonluiz
Copy link
Author

Remove the AppBar, in my version mobile the error not occured because the appBar overlap the message the "picked file".

Version mobile without appBar :

versionMobile

Case the error not show for you, i will send the project.

@tneotia
Copy link
Owner

tneotia commented Apr 26, 2021

Thanks for this detail. I will check in the morning on this issue, if you want to send the project that will be fine also.

@andeersonluiz
Copy link
Author

Okay, thanks for support!!

@tneotia
Copy link
Owner

tneotia commented Apr 26, 2021

I tried again without app bar but I cannot reproduce still. I think the project will be helpful in this matter if possible.

image

@andeersonluiz
Copy link
Author

Hello! Sorry for answering for late, i do some changes in the exemple project, i removed the appBar and added my custom theme, the bug probably resides in some settings of theme.
bug

The files of project above:
example.zip

@tneotia
Copy link
Owner

tneotia commented Apr 30, 2021

Yep, the issue is the theme. You have the line scaffoldBackgroundColor: brownLight,. The brownLight color causes the issue.

If you remove the opacity from brownLight you cannot see the choose file button anymore. Because your background is slightly transparent, you see the choose file button there. So for example static Color brownLight = Color.fromRGBO(191, 169, 138, 1); fixes your issue.

@andeersonluiz
Copy link
Author

Nice! Problem resolved. Thanks for support!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants