我正在尝试使用Flutter <div class = 'mask-div'>
<table>Copy of Table A</table>
</div>
<div class='scrolling-div">
<table> Table A </table>
</div>
<style>
div{
top:0px;
left:0px;
}
.mask-div{
width:100%;
position: fixed;
height:40px;
overflow: hidden;
background:white;
}
<style>
小部件以确保可以在我的网络应用程序中复制文本,但是上下文中没有出现“复制”选项菜单。
我正在使用以下代码 (“全选”和“复制”应作为默认的工具栏选项https://api.flutter.dev/flutter/material/SelectableText/toolbarOptions.html给出):
SelectableText
有人可以帮助我解决这个问题吗?
答案 0 :(得分:0)
我试过了,但是我们不能选择文本的一部分,但是可以选择整个文本。
child: SelectableText(sample.sourceCode,
cursorColor: Colors.red,
showCursor: true,
toolbarOptions: ToolbarOptions(
copy: true,
selectAll: true,
cut: false,
paste: false
),
style: TextStyle(color: Colors.black, fontStyle: FontStyle.normal))
在网络中使用Ctrl
+ A
和Ctrl
+ C
复制整个文本。