From ee9c27c97e5ab30d15699e3ea54afff106199fbc Mon Sep 17 00:00:00 2001 From: nguyenlamzx Date: Tue, 21 Jun 2022 02:09:50 +0700 Subject: [PATCH 01/13] add plugin cleaner --- .vscode/launch.json | 45 ++++ example/android/.gitignore | 2 + .../android/app/src/main/AndroidManifest.xml | 26 +- .../java/id/ercode/example/MainActivity.java | 13 - .../app/src/main/res/values-night/styles.xml | 2 +- .../app/src/main/res/values/styles.xml | 2 +- example/android/build.gradle | 6 +- example/ios/Flutter/AppFrameworkInfo.plist | 2 +- example/ios/Podfile.lock | 60 ++++- example/ios/Runner.xcodeproj/project.pbxproj | 4 +- .../xcshareddata/xcschemes/Runner.xcscheme | 2 +- example/lib/main.dart | 32 ++- example/pubspec.lock | 23 +- .../summernote-cleaner/summernote-cleaner.js | 222 ++++++++++++++++++ lib/assets/summernote.html | 4 + .../widgets/html_editor_widget_mobile.dart | 63 ++++- lib/src/widgets/html_editor_widget_web.dart | 29 +++ lib/utils/plugins.dart | 41 ---- lib/utils/plugins/summernote_at_mention.dart | 43 ++++ lib/utils/plugins/summernote_cleaner.dart | 131 +++++++++++ pubspec.lock | 21 +- pubspec.yaml | 3 +- 22 files changed, 654 insertions(+), 122 deletions(-) create mode 100644 .vscode/launch.json delete mode 100644 example/android/app/src/main/java/id/ercode/example/MainActivity.java create mode 100644 lib/assets/plugins/summernote-cleaner/summernote-cleaner.js create mode 100644 lib/utils/plugins/summernote_at_mention.dart create mode 100644 lib/utils/plugins/summernote_cleaner.dart diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000..8acd6ed2 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,45 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "html-editor-enhanced-1", + "request": "launch", + "type": "dart" + }, + { + "name": "html-editor-enhanced-1 (profile mode)", + "request": "launch", + "type": "dart", + "flutterMode": "profile" + }, + { + "name": "html-editor-enhanced-1 (release mode)", + "request": "launch", + "type": "dart", + "flutterMode": "release" + }, + { + "name": "example", + "cwd": "example", + "request": "launch", + "type": "dart" + }, + { + "name": "example (profile mode)", + "cwd": "example", + "request": "launch", + "type": "dart", + "flutterMode": "profile" + }, + { + "name": "example (release mode)", + "cwd": "example", + "request": "launch", + "type": "dart", + "flutterMode": "release" + } + ] +} \ No newline at end of file diff --git a/example/android/.gitignore b/example/android/.gitignore index 0a741cb4..6f568019 100644 --- a/example/android/.gitignore +++ b/example/android/.gitignore @@ -9,3 +9,5 @@ GeneratedPluginRegistrant.java # Remember to never publicly share your keystore. # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app key.properties +**/*.keystore +**/*.jks diff --git a/example/android/app/src/main/AndroidManifest.xml b/example/android/app/src/main/AndroidManifest.xml index d92152da..764640fc 100644 --- a/example/android/app/src/main/AndroidManifest.xml +++ b/example/android/app/src/main/AndroidManifest.xml @@ -5,21 +5,12 @@ - - - - + - - diff --git a/example/android/app/src/main/java/id/ercode/example/MainActivity.java b/example/android/app/src/main/java/id/ercode/example/MainActivity.java deleted file mode 100644 index 2afecb89..00000000 --- a/example/android/app/src/main/java/id/ercode/example/MainActivity.java +++ /dev/null @@ -1,13 +0,0 @@ -package id.ercode.example; - -import androidx.annotation.NonNull; -import io.flutter.embedding.android.FlutterActivity; -import io.flutter.embedding.engine.FlutterEngine; -import io.flutter.plugins.GeneratedPluginRegistrant; - -public class MainActivity extends FlutterActivity { - @Override - public void configureFlutterEngine(@NonNull FlutterEngine flutterEngine) { - GeneratedPluginRegistrant.registerWith(flutterEngine); - } -} diff --git a/example/android/app/src/main/res/values-night/styles.xml b/example/android/app/src/main/res/values-night/styles.xml index 449a9f93..3db14bb5 100644 --- a/example/android/app/src/main/res/values-night/styles.xml +++ b/example/android/app/src/main/res/values-night/styles.xml @@ -10,7 +10,7 @@ This theme determines the color of the Android Window while your Flutter UI initializes, as well as behind your Flutter UI while its running. - + This Theme is only used starting with V2 of Flutter's Android embedding. -->