Hello, I'm trying to add a macro to my editor so that this html code will get executed with the user only supplying the last field of a URL. Here's the code:
<iframe width="640" height="480" src="https://sketchfab.com/models/3e687de1cfe141b7b0f6fc664944a8de/embed" frameborder="0" allowfullscreen mozallowfullscreen="true" webkitallowfullscreen="true" onmousewheel=""></iframe> <p style="font-size: 13px; font-weight: normal; margin: 5px; color: #4A4A4A;"> <a href="https://sketchfab.com/models/3e687de1cfe141b7b0f6fc664944a8de" style="font-weight: bold; color: #1CAAD9;">Scene_000</a> by <a href="https://sketchfab.com/fpg" style="font-weight: bold; color: #1CAAD9;">Foul Play Games</a> on <a href="https://sketchfab.com" style="font-weight: bold; color: #1CAAD9;">Sketchfab</a> </p>
What I need to be able to replace is both instances of 3e687de1cfe141b7b0f6fc664944a8de So that the user can just add that to display a model that they have uploaded to the sketchfab site.
Thank you for your time,
Bryon
If you have a Cloud site I wrote an add-on that can do this yesterday called: Sketchfab for Confluence.
It's completely free so you should install it and give it a try.
Hi Robert,
I love this add-on, but I can't get it to render the iframe full width.
Is there a width setting somewhere I'm missing?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There is no width setting. I just imagined that the default size that came back would be acceptable. Do the Confluence formatting features not work for you with respect to positioning the box? Or would you just like more of it to show?
At any rate, I raised an issue for this: https://bitbucket.org/robertmassaioli/sketchfab-connect/issues/4/make-it-possible-to-declare-the-width-of
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Robert.
I replied in the issue... but basically, I'd like to see the whole box.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bryon,
I think you can write a User Macro for this. Please refer to https://confluence.atlassian.com/display/DOC/Writing+User+Macros
You can make the macro visible for all users, and select "Unrendered" for body processing.
In template, you can have:
<iframe width="640" height="480" src="https://sketchfab.com/models/$body/embed" frameborder="0" allowfullscreen mozallowfullscreen="true" webkitallowfullscreen="true" onmousewheel=""></iframe> <p style="font-size: 13px; font-weight: normal; margin: 5px; color: #4A4A4A;"> <a href="https://sketchfab.com/models/3e687de1cfe141b7b0f6fc664944a8de" style="font-weight: bold; color: #1CAAD9;">Scene_000</a> by <a href="https://sketchfab.com/fpg" style="font-weight: bold; color: #1CAAD9;">Foul Play Games</a> on <a href="https://sketchfab.com" style="font-weight: bold; color: #1CAAD9;">Sketchfab</a> </p>
Note "$body" in above code, as that takes the body of the macro. After saving that. You can insert the marco in your pages and in the body of macro, you can have the ID of the model you wish to display.
I hope this helps :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.