A rich text view is used to display static content in your pages, like images and rich text.
How Rich Text Works
Rich Text allows you to add formatted text and images to your app that isn't associated with your database. It's often used for:
Welcome text as an introduction to the app
Adding logos and headers to pages that are printed
Instructions or lengthy text
Add Rich Text
You can add rich text to any page by selecting the RichText option at the top of the page:
Rich Text isn't associated with any specific object, so there’s no need to choose one.
Your rich text will be added to the page but will be empty with no content. You'll have to click on the rich text to edit it and add content (see below).
Edit Rich Text
Click directly on a rich text in your pages to edit it:
The rich text will open in "edit" mode:
You can manage content with a simple WYSIWYG editor where you enter text and format it with options for headers, bold, links, and more.
The toolbar at the top is used to add rich formatting to your text:
Knack Tip You’ll need to host any images you want to add to a Rich Text view. So be sure to first upload your pictures to a service like Dropbox and then you can use the link provided to add the image to your rich text view.
Note: if you're using a link copied from Dropbox, you'll need to remove the
?dl=0/ and add
/?raw=1 to the end of your URL in order to insert the image itself, not the page where the image is hosted.
You can also insert your own HTML code by pressing on the very first "< >" icon:
Note: while some basic HTML can be used, Rich Text views are not true code views so some elements may be stripped from the view when saved. If you're running into issues saving the code, it likely cannot be run from there and should be inserted into the "API & Code" code area on the app.
Embedding Content into a Page
You can embed external content into rich text views. The embed code needs to be within an iFrame.
To do so, create your embed code, then add a Rich Text view to the page you want the embedded content to appear on. While in the HTML editor for the Rich Text view, add the iFrame code and situate the embed code within that.
You may need to add iFrame elements such as width, height, etc. to get this setup to work. A quick web search should provide iFrame code generators if you're having trouble setting this up on your own. Feel free to reach out to email@example.com with any questions you may have.
Notes and Troubleshooting
- At this time, anchor links are not supported by rich text views.
- Broken images that are embedded with links may be due to the URL not being public. For example, images embedded from Google Drive will appear broken. We have had some customers resolve this issue by using conversion tools such as http://app.bytenbit.com/index.html to convert the image.