一般的に、私は iframe の使用に反対していますが、それは私の特定の問題を解決しました。
問題は、Web ページに tinyMCE エディターがあることです。ユーザーがこのエディターを使用してコンテンツを作成すると、コンテンツは HTML として Web アプリケーションに送信されます。このコンテンツは div に表示されます。tinyMCE は、絶対的な位置を持つスタイルを追加することが多く、Web アプリケーションの残りの部分を壊すものを追加します。
テストしたところ、新しい HTML 5が私の状況iframe srcdoc="<p>Some HTML</p>"
にseamless="true"
ぴったりであることがわかりました。それはシームレスに見え、コンテンツのスタイルと私のスタイルはそのままでした. 悲しいことに、HTML5 srcdoc 属性はまだ Android でサポートされていないことがわかりました ( http://w3schools.com/html5/tryit.asp?filename=tryhtml5_iframe_srcdocは、chrome と android ブラウザーで異なる結果をもたらします)。
質問は次のとおりです。受信したコンテンツのすべてのスタイルを保持し、それを div に含める iframe srcdoc に代わるものはありますか?