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

[Selection] SelectableRegion should support rich text clipboard #104206

Open
chunhtai opened this issue May 19, 2022 · 0 comments
Open

[Selection] SelectableRegion should support rich text clipboard #104206

chunhtai opened this issue May 19, 2022 · 0 comments
Labels
c: new feature Nothing broken; request for a new capability c: proposal A detailed proposal for a change to Flutter f: selection SelectableRegion, SelectionArea, SelectionContainer, Selectable, and related APIs framework flutter/packages/flutter repository. See also f: labels. P3 Issues that are less important to the Flutter project team-framework Owned by Framework team triaged-framework Triaged by Framework team

Comments

@chunhtai
Copy link
Contributor

chunhtai commented May 19, 2022

SelectableRegion currently only support PlainText data type. We should make sure we can store RichText data type.

import 'package:flutter/material.dart';

void main() => runApp(const MyApp());

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  static const String _title = 'Flutter Code Sample';

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: _title,
      home: SelectionArea(
        child: Scaffold(
          appBar: AppBar(title: const Text(_title)),
          body: Center(
            child: Column(
              mainAxisAlignment: MainAxisAlignment.center,
              children: const <Widget>[
                Text('Row 1', style: TextStyle(fontSize: 30, color: Colors.red)),
                Text('Row 2'),
                Text('Row 3'),
              ],
            ),
          ),
        ),
      ),
    );
  }
}
  1. try to select and copy test with different style
  2. paste into google doc or some richtext editor
  3. currently it store as plainText.

Ideally it should preserve some rich text content.

@chunhtai chunhtai added c: new feature Nothing broken; request for a new capability framework flutter/packages/flutter repository. See also f: labels. labels May 19, 2022
@goderbauer goderbauer added P2 Important issues not at the top of the work list P3 Issues that are less important to the Flutter project and removed P2 Important issues not at the top of the work list labels May 25, 2022
@chunhtai chunhtai added the f: selection SelectableRegion, SelectionArea, SelectionContainer, Selectable, and related APIs label May 25, 2022
@chunhtai chunhtai changed the title SelectableRegion should support rich text clipboard [Selection] SelectableRegion should support rich text clipboard May 25, 2022
@exaby73 exaby73 added the c: proposal A detailed proposal for a change to Flutter label May 26, 2022
@flutter-triage-bot flutter-triage-bot bot added team-framework Owned by Framework team triaged-framework Triaged by Framework team labels Jul 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: new feature Nothing broken; request for a new capability c: proposal A detailed proposal for a change to Flutter f: selection SelectableRegion, SelectionArea, SelectionContainer, Selectable, and related APIs framework flutter/packages/flutter repository. See also f: labels. P3 Issues that are less important to the Flutter project team-framework Owned by Framework team triaged-framework Triaged by Framework team
Projects
None yet
Development

No branches or pull requests

3 participants