You can't get the device phone number in iOS (the API for doing this was deprecated for iOS 6 and higher). For Android there are APIs (check out TelephonyManager) for this that you could use in a plugin.
Take a look at the plugin development guide for how to structure a plugin, but the Java code needed for Android would look something like this:
package com.mycompany.devicenumber;
import org.apache.cordova.CallbackContext;
import org.apache.cordova.CordovaPlugin;
import org.json.JSONArray;
import android.content.Context;
import android.telephony.TelephonyManager;
public class DeviceNumber extends CordovaPlugin {
@Override
public boolean execute(String action, JSONArray args, CallbackContext callbackContext) {
if (action.equals("getDeviceNumber")) {
getDeviceNumber(callbackContext);
return true;
}
// Method not found.
return false;
}
private void getDeviceNumber(CallbackContext callbackContext) {
// Get the device number
TelephonyManager telephonyManager = (TelephonyManager)cordova.getActivity().getSystemService(Context.TELEPHONY_SERVICE);
String result = telephonyManager.getLine1Number();
if (result != null) {
callbackContext.success(result);
} else {
callbackContext.error("Failed to get phone number from device.");
}
}
}
Regarding editors, use what you are comfortable with for editing a mix of Javascript, HTML, CSS, JSON, XML and Java / Objective C files. I personally find Sublime Text perfect for my needs.