All Projects → yungzhu → rich_input

yungzhu / rich_input

Licence: MIT license
Rich input box, implement @Someone and subject with color highlighting

Programming Languages

dart
5743 projects
swift
15916 projects

Projects that are alternatives of or similar to rich input

react-native-element-textinput
A react-native TextInput, TagsInput and AutoComplete component easy to customize for both iOS and Android.
Stars: ✭ 28 (-51.72%)
Mutual labels:  input, textfield, textinput
Braft Editor
美观易用的React富文本编辑器,基于draft-js开发
Stars: ✭ 4,310 (+7331.03%)
Mutual labels:  rich-text-editor, rich
Inputkit
📝InputKit, an Elegant Kit to limits your input text, inspired by BlocksKit, written in both Objective-C & ⚡️Swift.
Stars: ✭ 420 (+624.14%)
Mutual labels:  input, textfield
Autocompletefield
Subclass of UITextField that shows inline suggestions while typing.
Stars: ✭ 656 (+1031.03%)
Mutual labels:  input, textfield
TextInputLayout
The objective of this code is to guide you to create login screen with TextInputLayout in iOS app.
Stars: ✭ 30 (-48.28%)
Mutual labels:  input, textfield
Underlinetextfield
Simple UITextfield Subclass with state
Stars: ✭ 156 (+168.97%)
Mutual labels:  input, textfield
kindaVim.theapp
Ultimate Vim Mode for macOS
Stars: ✭ 372 (+541.38%)
Mutual labels:  input
Text to MD
Convert your docs to markdown format.
Stars: ✭ 15 (-74.14%)
Mutual labels:  rich-text-editor
compose-actors
🤖 Android app built with jetpack 🚀 compose follows new revamped guide to app architecture. Implemented with State, Coroutines ➰, ViewModels, Repository pattern, Light/Dark theme 🌈 MD3, Animations, Draw on canvas, Custom layouts, UI state handling, 🌀 Image loading with coil, Palette 🎨 usage and dynamic theming etc.
Stars: ✭ 80 (+37.93%)
Mutual labels:  textfield
awesome-flutter-ui
10+ flutter(android, ios) UI design examples ⚡ - login, books, profile, food order, movie streaming, walkthrough, widgets
Stars: ✭ 848 (+1362.07%)
Mutual labels:  textfield
react-headless-phone-input
Headless phone number input component for React. Because phone numbers are hard.
Stars: ✭ 25 (-56.9%)
Mutual labels:  input
svelte-multiselect
Keyboard-friendly, accessible and highly customizable multi-select component
Stars: ✭ 91 (+56.9%)
Mutual labels:  input
react-file-input-previews-base64
This package provides an easy to use, ready to go and customizable wrapper around file input, with option for image previews and returning file as base64 string.
Stars: ✭ 15 (-74.14%)
Mutual labels:  input
hook-slinger
A generic service to send, retry, and manage webhooks.
Stars: ✭ 88 (+51.72%)
Mutual labels:  rich
am-editor
A rich text collaborative editor framework that can use React and Vue custom plug-ins. 一个富文本实时协同编辑器框架,可以使用React和Vue自定义插件。
Stars: ✭ 542 (+834.48%)
Mutual labels:  rich-text-editor
wysiwyg-editor-php-sdk
PHP SDK to ease the integration of Froala WYSIWYG Editor on server side.
Stars: ✭ 37 (-36.21%)
Mutual labels:  rich-text-editor
AreaPickerView
areapicker in china, easy to use. 中国的地区选择器.简单易用.
Stars: ✭ 32 (-44.83%)
Mutual labels:  textfield
rci
🔢 better code inputs for react/web
Stars: ✭ 805 (+1287.93%)
Mutual labels:  input
LEAmountInputView
Amount Input View (inspired by Square's design)
Stars: ✭ 44 (-24.14%)
Mutual labels:  input
SheenValidator
Android library to make form validation easier
Stars: ✭ 29 (-50%)
Mutual labels:  input

rich_input

This is a high performance rich media input box, implemented through the native textfield extension, with less disruptive, but at the same time has a strong extensibility, implements the @ someone, # topics, expressions and other functions, support custom color highlighting

Language: English | 中文简体

Special feature

  • Use native textfield capabilities with less code, less disruption and subsequent compatibility
  • Support @someone #topic and insert emojis, etc
  • Support for custom highlighting, and custom styles
  • Support for using the backspace key to delete entire special text blocks
  • Support for special character handling
  • Support for custom data fields to enhance rich text

Demo

Getting Started

Core code

import 'package:rich_input/rich_input.dart';

RichInputController controller = RichInputController(text: "Text");

const block = RichBlock(
  text: "@somebody",
  data: "@123456",
  style: TextStyle(color: Colors.blue),
);
controller.insertBlock(block);

// Get custom data
print(controller.data);
// Get text
print(controller.text);

// RichInput(controller: controller);

Example

import 'package:flutter/material.dart';
import 'package:rich_input/rich_input.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      home: MyHomePage(),
    );
  }
}

class MyHomePage extends StatefulWidget {
  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  RichInputController _controller;
  FocusNode _focusNode;

  @override
  void initState() {
    _focusNode = FocusNode();
    _controller = RichInputController(text: "Text");

    // Refresh text display, not required
    _controller.addListener(() {
      setState(() {});
    });
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: SafeArea(
        child: Padding(
          padding: const EdgeInsets.all(15),
          child: Column(
            crossAxisAlignment: CrossAxisAlignment.start,
            children: <Widget>[
              RichInput(
                focusNode: _focusNode,
                controller: _controller,
              ),
              Wrap(
                spacing: 10,
                children: [
                  RaisedButton(
                    onPressed: () {
                      _controller.insertText("Text");
                    },
                    child: const Text("Add Text"),
                  ),
                  RaisedButton(
                    onPressed: () {
                      _controller.insertText("😁");
                    },
                    child: const Text("Add 😁"),
                  ),
                  RaisedButton(
                    onPressed: () {
                      _controller.insertText("👍");
                    },
                    child: const Text("Add 👍"),
                  ),
                  RaisedButton(
                    onPressed: () {
                      const block = RichBlock(
                        text: "@abc",
                        data: "@123456",
                        style: TextStyle(
                          color: Colors.blue,
                          fontWeight: FontWeight.bold,
                        ),
                      );
                      _controller.insertBlock(block);
                    },
                    child: const Text("Add @    "),
                  ),
                  RaisedButton(
                    onPressed: () {
                      const block = RichBlock(
                        text: "#subject",
                        data: "#888999",
                        style: TextStyle(
                          color: Colors.red,
                          fontWeight: FontWeight.bold,
                        ),
                      );
                      _controller.insertBlock(block);
                    },
                    child: const Text("Add #"),
                  ),
                  RaisedButton(
                    onPressed: () {
                      _focusNode.unfocus();
                    },
                    child: const Text("unfocus"),
                  )
                ],
              ),
              const SizedBox(height: 10),
              Text("Text:${_controller.text}"),
              const SizedBox(height: 10),
              Text("Data:${_controller.data}"),
            ],
          ),
        ),
      ),
    );
  }
}

For detailed examples

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].