Actualmente estoy renderizando el contenido HTML en Webview. Ese contenido HTML alojado en la nube y cargando en Webview usando el enlace html. Aquí, necesito agregar las siguientes etiquetas de casilla de verificación en ese contenido mientras se renderiza dinámicamente o necesito mostrar la casilla de verificación en la parte inferior de la página.
<div> <input type="checkbox" id="agreement_id" name="agreement" value="agreement"> <label for="other">I have read and accept the Electronic Communications Agreement consenting to the use of Electronic Records in connection with opening my new deposit credit accounts requested through the Swell mobile app.</label> </div>¿Es posible agregar mediante programación en la vista web nativa de reacción?
He descubierto la respuesta aquí: Usé injectedJavaScript .
const scripts1 = document.write( '<div> <input type="checkbox" id="agreement_id" name="agreement" value="agreement"> <label for="other">content</label> </div>', ); const webviewContent = () => { return ( <View style={{ height: windowHeight - heightBottom * 1.5, marginLeft: 10, marginRight: 10, }}> <WebView style={{backgroundColor: colors.primaryBackgroundColor}} originWhitelist={['*']} source={{ uri: 'https://www.google.com', }} injectedJavaScript={scripts1} /> </View> ); };