Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link editing #5

Open
ScotsScripts opened this issue Mar 14, 2020 · 2 comments
Open

Link editing #5

ScotsScripts opened this issue Mar 14, 2020 · 2 comments
Labels
question Further information is requested

Comments

@ScotsScripts
Copy link

It is difficult and in most cases almost impossible to deal with links when the link architecture needs to be hard coded into the template and all I want is to click-edit the link text and target.

For example, it would be super cool if this worked so that the text and link of a button could be edited without changing anything else:

<a data-editable data-name="sbt-toplink" class="button-class" href="https://www.edit_this_target.html"> 
   <span>edit this text</span>
</a>
@anthonyjb
Copy link
Member

Hi @ScotsScripts there's a better approach than this. Use fixtures and set the link to be an editable paragraph, e.g:

<a 
    href="https://www.artstation.com/markvano"
    class="btn" 
    data-ce-tag="p" 
    data-fixture data-name="snippet:header:btn"
    >
    Marko's Artstation
</a>

We use this approach in ContentFlow and snippets a lot, so for example we might have a header snippet or a call to action banner snippet that we insert into the page and we want to have a stylised button where only the text and link (and target blank) options can be changed.

Is this what you're after? If so would still be possible in a refined future release of ContentTools/Flow.

@anthonyjb anthonyjb added the question Further information is requested label Mar 15, 2020
@ScotsScripts
Copy link
Author

I haven't been able to get anything related to data-fixture to work, even your example above doesn't go into edit mode when I click the pencil. Was hoping this could just be made consistent with how other editable areas work.

Or perhaps if it's just difficult to get that working, maybe the most straightforward way of editing the link and link text would be if you were able to enhance the properties dialog box for a link element in a way that the link text and url only were editable. That way the container (button, bar, whatever) would be protected from editing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants