WordPress.org

Ready to get started?Download WordPress

Forums

anchor function in tinyMCE Advanced (12 posts)

  1. irwired
    Member
    Posted 3 years ago #

    I just downloaded tinyMCE Advanced. Specficaly to use the "anchor" function. (yesterday I have cleared my cashe and restarted my brouser)
    I can highlight text and name my anchor text. The little anchor icon is displayed in the editor screen. and the HTML looks correct.
    I assume I should be using the standard linking tool to link back to the anchor.
    Will the standard linking tool recognise and display the named link? (anchor link)
    If not how do I link back to the anchor.
    I read up on the proper way to code this in HTML. But the tinyMCE WYSIWYG editor should not require HTML code?

    Thanks for your help

  2. Mark / t31os
    Moderator
    Posted 3 years ago #

    You should be able to link to an anchor using the standard link function/button just fine, simply enter an anchor link instead of a URL...

    Eg. #myanchor

    Instead of. http://whatever

    NOTE: Links are actually anchors technically speaking, what you're referring to are *named* anchors, just a tip.

  3. irwired
    Member
    Posted 3 years ago #

    Thanks so much Mark.

    I knew the answer was going to be a simple one.
    I spent hours searching the documentation and boards.
    I know that usually means it is too simple to warrant an explanation.
    I assume therefore that if I want to link to an anchor on the same page only the #name is needed
    If the anchor is on another page then: http://url/page/#name.

    Thanks again
    Roger

  4. Mark / t31os
    Moderator
    Posted 3 years ago #

    Easiest way to be sure would be to simply try it, you could use "Preview" avoiding the need to publish a test piece. Alternatively you could use a password protected or private post for testing purposes to.

    That said, i think you're correct with your assumption anyway... :)

  5. irwired
    Member
    Posted 3 years ago #

    Hi Mark
    And thanks for following up.
    I had a chance to try placing anchors and testing them.
    I was in the middle of writing a post on the subject when I ran across this problem.

    Here is an excerpt from that post:

    Inserting the anchor: Most anchor text tools let you highlight the text that you want ot anchor to and then just click. A dialog box pops up and asks you to name the link. You can choose any name that makes sense to you.

    So far this has not worked for me in the tinyMCE Advanced tool. So here is the work-around: Highlight or place your cursor to the left of the text you will anchor to. Click the anchor tool button, then open the HTML tab and find the named link. It will look like this: .
    Cut and paste the text you want to anchor to between the >< like this. your text goes here. Include any HTML code needed to display the text correctly like for bold. Go back to your visual editor and check for the little anchor icon to the left of your anchored text. If the anchor is there you have been successful. This is not as hard as it sounds.;-)

    To link to your anchor:
    Highlight the text or image you want to link from. Click the link tool. If you are linking to a named link on the same page, type in the name you chose for your link preceded by a #sign. Like this: #my link. Note: you must save a draft and preview the page to test your link.

    To link to a “named anchor” on another page: Highlight the text you want to link to and open the link tool. In the url box enter the URL of the page that contains your “named anchor”: http://mysite/homepage/#mylink.

    Thanks for sticking with me. As always I am trying to pass along information of value.
    The best of luck with anchor text, leave me a comment if you have found this to be helpful or if you have something to add.

    Othe anchor tools I have used inset the higlighted text beween the >< points. Is this the way it is supposed to work?

    Other than this minor problem the anchors work as you described. You can see them in action at themlmworks
    Sometimes I think I'm brain dead. Hopefully this post will be helpful to others

    Thanks again

  6. Mark / t31os
    Moderator
    Posted 3 years ago #

    I've don't use TinyMCE Advanced myself, so i can't comment on how the named anchors should work, i'm also not sure i follow the problem you're having specifically.

    Can you describe the issue, i'm sure not what i'm suppose to be looking at above..

  7. irwired
    Member
    Posted 3 years ago #

    The editor is not happy with the code so let me try again

    There is a strange glitch, maybe it is supposed to work this way?
    When you highlight text that you want to “name” the anchor tool actually places the anchor to the left of the text.
    <a name=”anchor”></a>text here
    Say I want to place a named anchor here.
    I would highlight “here”
    And click the anchor button.
    The result in visual is this: Say I want to place a named anchor (space) here.
    The result in HTML is: Say I want to place a named anchor
    <a name=”anchor”></a> here.
    Normally the tool should place the anchor text inside the HTML code:
    Say I want to place a named anchor <a name=”anchor”> here </a>

    So to make it work you have to open HTML and cut and paste your text inside the code. This is something I noticed before I ran into the original issue I posted on. I thought as long as we were on the subject we might as well cover this glitch.

  8. Mark / t31os
    Moderator
    Posted 3 years ago #

    The standalone TinyMCE app does exactly the same, you can test it here.
    http://tinymce.moxiecode.com/tryit/full.php

    I don't think it's intended to anchor selected text, rather you're expected to enter the text into the box that appears when clicking the anchor link.

  9. irwired
    Member
    Posted 3 years ago #

    That is what I found too.
    Other anchor tools I have used worked quite a bit differently.
    That is what put me off the rails.
    As I said before, I hope this pulls others out of the weeds.

    Thanks for your kindness

  10. Mark / t31os
    Moderator
    Posted 3 years ago #

    I think it's currently the expected behaviour.
    http://tinymce.moxiecode.com/develop/bugtracker_view.php?id=1595

    If this more recent ticket is anything to go by though, that could change.
    http://tinymce.moxiecode.com/develop/bugtracker_view.php?id=4104

    By the way, happy to help.. ;)

  11. irwired
    Member
    Posted 3 years ago #

    That makes sense and validates my assumption. It is however, at your/my own peril, that you make assumptions about standardization of software functions.

    Thanks for the research. I poked around that same site and did not turn up anything pertinent.

    Have A great 4th of July weekend...there I go assuming again. You could be anywhere.

    cheers
    Roger

  12. Mark / t31os
    Moderator
    Posted 3 years ago #

    It's no problem, only took a few minutes to do a little digging, for what it's worth i'd prefer the behaviour you're after myself... :)

    Have a great weekend to... ;)

Topic Closed

This topic has been closed to new replies.

About this Topic