You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
I am using Python to connect to API. I want to find and replace some texts in pages with new texts while keeping the HTML/CSS formating.
But for Content-Type, the PUT API seems to only support "
@jimqian, could you provide an example of what you are trying to insert?
<p>apple apple.</p><p><span style="color: rgb(206,145,120);">New Sentence</span></p><p>banana</p><p><span style="color: rgb(206,145,120);">New Sentence.</span></p><p>orange</p><p><span style="color: rgb(206,145,120);">New Sentence.</span></p><p>pineapple</p>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am basically trying to change "Old Sentence." to "New Sentence." for example. While ignoring things that are neither: like "pineapple" and also keeping the original formatting: like <p>, <span, and color.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
And it's being inserted directly as that? Are you inserting it inside of an HTML macro?
Also, are you putting in "<p>apple apple.</p>..." are did it just render that way when you put it into the text box here?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No I did not use the HTML macro. What is that? Thank you very much for pointing it out!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@jimqian, you need to enable it at the system level. https://confluence.atlassian.com/doc/html-macro-38273085.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So basically:
1) Tell my wiki's admin to enable HTML macro and
2) Add {html} {html} around my html code when using API to put?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
And btw would using scriptrunner instead of api circumvent this problem without having the admin enable html?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.