Closed Kaushik1502 closed 4 years ago
Have you tried this:
<HTML
html={html: feedContent}
imagesMaxWidth={imageMaxWidth}
onLinkPress={(event, href) => console.log('clicked link: ', href)}
/>
It is showing [object Object]
Did you manage to render it properly? I am having also a problem rendering a simple table with images.
Did you manage to render it properly? I am having also a problem rendering a simple table with images.
You can't render a table directly as it is in IGNORED_TAGS
in HTMLUtils.js
. I have used this plugin.
I am trying to render below html which I am getting as a json response
<figure class="wp-block-table"><table><tbody><tr><td>Former Prime Minister Mohammad Mahathir’s gambit to reinforce his leadership<br><br>mandate — through a shock resignation last week, in a bid to return to power<br><br>with a planned majority confidence vote in parliament — has been thwarted.<br><br>Bersatu president Muhyiddin Yassin, Mahathir’s former ally and home minister,<br><br>has received the monarch’s appointment as prime minister.<br><br><br><br>On Sunday, Muhyiddin broke with Mahathir to form an alliance between Bersatu<br><br>and the United Malays Nasional Organisation (UMNO), the party of now-disgraced<br><br>former Prime Minister Najib Razak, who is now facing corruption charges. He was<br><br>ousted from power along with UMNO after Mahathir’s Pakatan Harapan coalition<br><br>pulled an election upset in 2018. Bersatu and the UNMO-led Barisan Nasional<br><br>coalition, along with the Malaysian Islamic Party (PAS), United Alliance, and a<br><br>group of confidence and supply lawmakers currently gives Muhyiddin 113 votes,<br><br>only just gaining the 112 needed in the 222-seat lower Dewan Rakyat.<br><br><br><br>However, the political drama is set to continue, as Mahathir has (also) claimed<br><br>he has support of 113 lawmakers, and is seeking an urgent confidence vote when<br><br>parliament reconvenes on March 9. Some officials have warned that the session<br><br>may be postponed given the political turmoil, which gives both Muhyiddin and<br><br>Mahathir time to siphon off votes from each other.<br><br><br><br>Confidants close to Mahathir are hopeful that he can clinch a majority vote,<br><br>though Muhyiddin’s surprise defection has shaken the former ruling coalition.<br><br>If a confidence vote is held and Mahathir prevails, the monarch is expected to<br><br>respect the results and reappoint him as Prime Minister. The monarch is<br><br>expected to retain a prime minister “who in his judgement is likely to command<br><br>the confidence of the majority of the members” of the lower House. The<br><br>constitution does not mention whether a formal confidence vote is necessary to<br><br>prove the prime minister has lost the confidence of the majority, with this<br><br>ambiguity lending the monarch some discretion over the Prime Ministerial<br><br>appointment. <br><br><br><br>But should Mahathir return to power, his Pakatan Harapan coalition will<br><br>continue to be engulfed in internal power struggles, given the widening rift<br><br>between Mahathir and his once-presumptive successor Anwar Ibrahim, and growing<br><br>policy differences between himself and his largest coalition partner, the<br><br>Democratic Action Party.<br><br><br><br>Given the state of ever-shifting alliances, the new (or returning government)<br><br>will be fragile in an effectively hung parliament, with continued challenges<br><br>over who commands the majority confidence of parliament raising the probability<br><br>of fresh elections. Should that be the case, Barisan Nasional may be able to<br><br>chart a course back into power, drawing on nationalist rhetoric and criticism<br><br>over the former government’s poor economic leadership, with growth at its<br><br>slowest pace in a decade. Pakatan Harapan has recently lost momentum after a<br><br>string of by-election losses.<br><br><br><br>The policy implications are now uncertain under a Muhyiddin (and UMNO-led)<br><br>government, but it is probable that he may opt for further fiscal spending to<br><br>shore up the slowing economy, as well as his own public support. Mahathir<br><br>announced a $4.8 billion stimulus package last Thursday, to combat the impact<br><br>from the global COVID-19 outbreak, raising the 2020 fiscal deficit target by<br><br>0.2% to 3.4%. While markets took the deficit increase in stride, seeing the<br><br>stimulus response as appropriate given the circumstances, a further widening of<br><br>the deficit gap would likely catch the attention of ratings agencies. This also<br><br>comes as commodity prices have plunged in recent weeks, with Brent crude moving<br><br>lower to $50/bbl. Officials are bracing for spillover effects, including a hit<br><br>to energy-related fiscal revenues.<br><br><br><br>More monetary action looks warranted<br><br><br><br>Given the rising external risks looming over a weakening economy, coupled with<br><br>political tensions which could disrupt fiscal policy, Bank Negara Malaysia is<br><br>considering another 25 basis point rate cut as soon as Tuesday. Officials see<br><br>up to another 50 basis points of easing this year, but caution that more<br><br>firepower may be needed depending on the severity and duration of the COVID-19<br><br>epidemic.<br><br><br><br>While January’s pre-emptive rate cut was previously thought to be sufficient to<br><br>buttress the economy, the COVID-19 outbreak and its global repercussions have<br><br>left officials reassessing the potential headwinds to the local economy. The<br><br>government lowered its 2020 GDP estimate last week from 4.8% to 3.2%-4.2%, a<br><br>downgrade BNM staff perceive as warranting additional monetary stimulus. While<br><br>BNM Governor Nor Shamsiah stated last month it would be difficult to fully<br><br>assess the impact of the COVID-19 outbreak, the central bank expects a sharp<br><br>hit to growth this quarter due to a near standstill in tourism traffic, and the<br><br>economic slowdown in China, which has weighed on manufacturing activity and<br><br>commodity exports.<br><br><br><br>December exports were up 2.7% y/y but contracted 3.3% y/y last quarter. Staff<br><br>expect exports will be weak this quarter, as hinted in the lower January and<br><br>February PMI readings due to falling export orders and supply disruptions. And<br><br>as they await more data to judge the risks, market volatility and tighter<br><br>liquidity conditions in the past week have added another reason for a move<br><br>sooner rather than later. With the overnight policy rate at 2.75%, the central<br><br>bank sees “ample room” and more urgency to lower rates in a bid to support<br><br>private consumption, which remains resilient and is seen as the main<br><br>growth-driver this year, and to spur investment amid a murkier domestic<br><br>political environment and a challenging external outlook.<br><br><br><br>Analyst: Earl Han +1 408 786 5872<br><br><br><br>Warning: Significant personal liability and criminal prosecution can result<br><br>from any copying or unauthorized disclosure of these materials. Your use of<br><br>these materials, even if under instruction by your employer, is unlawful unless<br><br>you are specifically authorized to do so by name. Copying or unauthorized<br><br>disclosure by you, or by others with your knowledge or participation, can<br><br>subject you to such liability. This material is sent to prospective and<br><br>existing clients for the engagement of Medley Global Advisors LLC consulting<br><br>services.<br><br> </td></tr></tbody></table></figure>
Here is the code snippet
N.B: If I use below library to render that content it is rendering properly.
Please let me know how to render this type of html content