feat: added javascript Insert element commands

This commit is contained in:
jideguru
2021-05-27 00:58:09 +01:00
parent 5c168365b6
commit f4f1802eb6
3 changed files with 121 additions and 65 deletions

View File

@@ -17,6 +17,7 @@ class _RichEditorState extends State<RichEditor> {
int port = 5321;
LocalServer? localServer;
@override
void initState() {
super.initState();
@@ -27,15 +28,14 @@ class _RichEditorState extends State<RichEditor> {
Widget build(BuildContext context) {
return Column(
children: [
GroupedTab(
controller: _controller,
),
GroupedTab(controller: _controller),
Flexible(
child: WebView(
initialUrl: 'file:///android_asset/flutter_assets/packages/rich_editor/assets/editor/editor.html',
initialUrl:
'file:///android_asset/flutter_assets/packages/rich_editor/assets/editor/editor.html',
onWebViewCreated: (WebViewController controller) {
_controller = controller;
// print();
print('WebView created');
setState(() {});
},
javascriptMode: JavascriptMode.unrestricted,