Is there a way to put a shared remote snippet in the middle of sentence without breaking it up?

I have the remote snippet “<b>MyPortal.com</b>” in the middle of a sentence. I have to share it because it will change in the future and will be used on multple documents. Unfortunately, it breaks up a single line sentence into three separate lines. How do I get the snippet to continue the flow of the sentence? Is it possible?

Example:

If you have any questions, please refer to the department’s website at

MyPortal

or call the Customer Service Center at (555) 555-2000.

As always, there’s probably more than one way to do this. But one way would be to make use of the loadhtml() method in a selector script.

var field, result = “”;

field = loadhtml(“snippets/Snippet%201.html”);
if (field !== “”) result += field;

results.html(result);

I’m just using my local path to a local snippet, but you should be able to give it the URL you’re using in the remote snippet. This will insert that code directly into the flow of your paragraph, whereas a snippet is breaking things up because it’s called through the use of an Article tag.

Will this allow for the same use as the remote snippet functions? Replace text once and it updates all documents?

Yep. Every execution of the document it’s going to go hit that URL and insert whatever it receives. So every newly created document will have the text that was present at the URL at the time of creation.