• Resolved mdeerbon

    (@mdeerbon)


    I have a wordpress website where I wish to display pricing and allow a customer to purchase through the mindbody app. The MD_App provide a bit of script to allow that to happen, as follows;
    <script src=”https://widgets.mindbodyonline.com/javascripts/healcode.js&#8221; type=”text/javascript”></script> <healcode-widget data-version=”0.2″ data-link-class=”healcode-pricing-option-text-link” data-site-id=”88231″ data-mb-site-id=”560331″ data-type=”pricing-link” data-inner-html=”Buy Now” data-service-id=”100004″ />

    However the editor strips out the <healcode-widget… > section when moving from text to visual. The code works when in preview mode, but then switching to visual and /or updating, removes that vital bit of <healcode-widget> code. Is the editor being too smart by half, or is there something else going on?

    I suggest it’s a bug in the editor, but … I don’t care what is causing the problem, but I would like a fix / workaround please. Does anyone have any suggestions please?
    Note: I tried to enclose all of the code within an anchor tag ie and also tried it within a span tag (ie <span style=”color:#ee8d43;”> … ), but that didn’t work.

    Edit: Update: Have have found an alternative solution, which is a total re-write of the links. ;-(
    The webpage now works, however, this is a work around.

    Thanks in advance

    • This topic was modified 4 years, 2 months ago by mdeerbon.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator bcworkz

    (@bcworkz)

    You’re not going to like my answer: “It’s a feature, not a bug.”

    The editor strips out HTML elements it doesn’t recognize or thinks is a security risk. The safest way to embed code within page content is by using custom shortcodes. See Shortcode API.

    Shortcodes are expanded into content outside of the editor, so it has no opportunity to mess up the code that we need.

    Thread Starter mdeerbon

    (@mdeerbon)

    bcworkz; thanks for your response. You are correct; I didn’t like the answer, however, it is what it is!
    I tried to resolve the problem with “shortCodes Ultimate” plugin, but I couldn’t get that to work either.
    As I mentioned above, I have a work around, which will have to the way it is done!

    Thanks again for your response.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Editor removes code from page’ is closed to new replies.