use of org.wordpress.android.editor.EditorFragment in project WordPress-Android by wordpress-mobile.
the class EditPostActivity method onEditorFragmentInitialized.
@Override
public void onEditorFragmentInitialized() {
fillContentEditorFields();
// Set the error listener
if (mEditorFragment instanceof EditorFragment) {
mEditorFragment.setDebugModeEnabled(BuildConfig.DEBUG);
((EditorFragment) mEditorFragment).setWebViewErrorListener(new ErrorListener() {
@Override
public void onJavaScriptError(String sourceFile, int lineNumber, String message) {
CrashlyticsUtils.logException(new JavaScriptException(sourceFile, lineNumber, message), T.EDITOR, String.format(Locale.US, "%s:%d: %s", sourceFile, lineNumber, message));
}
@Override
public void onJavaScriptAlert(String url, String message) {
// no op
}
});
}
}
Aggregations