@@ -81,90 +81,90 @@ class _HtmlEditorExampleState extends State<HtmlEditorExample> {
81
81
toolbarType: ToolbarType .nativeScrollable, //by default
82
82
onButtonPressed:
83
83
(ButtonType type, bool ? status, Function ? updateStatus) {
84
- print (
84
+ debugPrint (
85
85
"button '${describeEnum (type )}' pressed, the current selected status is $status " );
86
86
return true ;
87
87
},
88
88
onDropdownChanged: (DropdownType type, dynamic changed,
89
89
Function (dynamic )? updateSelectedItem) {
90
- print (
90
+ debugPrint (
91
91
"dropdown '${describeEnum (type )}' changed to $changed " );
92
92
return true ;
93
93
},
94
94
mediaLinkInsertInterceptor:
95
95
(String url, InsertFileType type) {
96
- print ( url);
96
+ debugPrint ( ' url $ url ' );
97
97
return true ;
98
98
},
99
99
mediaUploadInterceptor:
100
100
(PlatformFile file, InsertFileType type) async {
101
- print ( file.name); //filename
102
- print ( file.size); //size in bytes
103
- print ( file.extension ); //file extension (eg jpeg or mp4)
101
+ debugPrint ( 'fileName ${ file .name }' ); //filename
102
+ debugPrint ( 'fileSize ${ file .size }' ); //size in bytes
103
+ debugPrint ( 'fileExtension ${ file .extension }' ); //file extension (eg jpeg or mp4)
104
104
return true ;
105
105
},
106
106
),
107
107
otherOptions: const OtherOptions (height: 550 ),
108
108
callbacks: Callbacks (onBeforeCommand: (String ? currentHtml) {
109
- print ('html before change is $currentHtml ' );
109
+ debugPrint ('html before change is $currentHtml ' );
110
110
}, onChangeContent: (String ? changed) {
111
- print ('content changed to $changed ' );
111
+ debugPrint ('content changed to $changed ' );
112
112
}, onChangeCodeview: (String ? changed) {
113
- print ('code changed to $changed ' );
113
+ debugPrint ('code changed to $changed ' );
114
114
}, onChangeSelection: (EditorSettings settings) {
115
- print ('parent element is ${settings .parentElement }' );
116
- print ('font name is ${settings .fontName }' );
115
+ debugPrint ('parent element is ${settings .parentElement }' );
116
+ debugPrint ('font name is ${settings .fontName }' );
117
117
}, onDialogShown: () {
118
- print ('dialog shown' );
118
+ debugPrint ('dialog shown' );
119
119
}, onEnter: () {
120
- print ('enter/return pressed' );
120
+ debugPrint ('enter/return pressed' );
121
121
}, onFocus: () {
122
- print ('editor focused' );
122
+ debugPrint ('editor focused' );
123
123
}, onBlur: () {
124
- print ('editor unfocused' );
124
+ debugPrint ('editor unfocused' );
125
125
}, onBlurCodeview: () {
126
- print ('codeview either focused or unfocused' );
126
+ debugPrint ('codeview either focused or unfocused' );
127
127
}, onInit: () {
128
- print ('init' );
128
+ debugPrint ('init' );
129
129
},
130
130
//this is commented because it overrides the default Summernote handlers
131
131
/*onImageLinkInsert: (String? url) {
132
- print (url ?? "unknown url");
132
+ debugPrint (url ?? "unknown url");
133
133
},
134
134
onImageUpload: (FileUpload file) async {
135
- print (file.name);
136
- print (file.size);
137
- print (file.type);
138
- print (file.base64);
135
+ debugPrint (file.name);
136
+ debugPrint (file.size);
137
+ debugPrint (file.type);
138
+ debugPrint (file.base64);
139
139
},*/
140
140
onImageUploadError: (FileUpload ? file, String ? base64Str,
141
141
UploadError error) {
142
- print (describeEnum (error));
143
- print (base64Str ?? '' );
142
+ debugPrint (describeEnum (error));
143
+ debugPrint (base64Str ?? '' );
144
144
if (file != null ) {
145
- print ( file.name);
146
- print ( file.size);
147
- print ( file.type);
145
+ debugPrint ( 'fileName ${ file .name }' );
146
+ debugPrint ( 'fileName ${ file .size }' );
147
+ debugPrint ( 'fileType ${ file .type }' );
148
148
}
149
149
}, onKeyDown: (int ? keyCode) {
150
- print ('$keyCode key downed' );
151
- print (
150
+ debugPrint ('$keyCode key downed' );
151
+ debugPrint (
152
152
'current character count: ${controller .characterCount }' );
153
153
}, onKeyUp: (int ? keyCode) {
154
- print ('$keyCode key released' );
154
+ debugPrint ('$keyCode key released' );
155
155
}, onMouseDown: () {
156
- print ('mouse downed' );
156
+ debugPrint ('mouse downed' );
157
157
}, onMouseUp: () {
158
- print ('mouse released' );
158
+ debugPrint ('mouse released' );
159
159
}, onNavigationRequestMobile: (String url) {
160
- print ( url);
160
+ debugPrint ( ' url $ url ' );
161
161
return NavigationActionPolicy .ALLOW ;
162
162
}, onPaste: () {
163
- print ('pasted into editor' );
163
+ debugPrint ('pasted into editor' );
164
164
}, onScroll: () {
165
- print ('editor scrolled' );
165
+ debugPrint ('editor scrolled' );
166
166
}, onEditLink: (String ? urlDisplayText, String ? url, bool ? isOpenInNewTab, String linkTagId) async {
167
- print ('urlDisplayText: $urlDisplayText , url: $url , isOpenInNewTab: $isOpenInNewTab , linkTagId: $linkTagId ' );
167
+ debugPrint ('urlDisplayText: $urlDisplayText , url: $url , isOpenInNewTab: $isOpenInNewTab , linkTagId: $linkTagId ' );
168
168
final textLinkDialogController = TextEditingController (text: urlDisplayText);
169
169
final urlLinkDialogController = TextEditingController (text: url);
170
170
final textLinkDialogFocusNode = FocusNode ();
@@ -323,7 +323,7 @@ class _HtmlEditorExampleState extends State<HtmlEditorExample> {
323
323
},
324
324
mentionsWeb: ['test1' , 'test2' , 'test3' ],
325
325
onSelect: (String value) {
326
- print (value);
326
+ debugPrint (value);
327
327
}),
328
328
],
329
329
),
0 commit comments