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

Add anchor button option to profile builder #74

Closed
herbdool opened this issue Jan 25, 2024 · 8 comments · Fixed by #76
Closed

Add anchor button option to profile builder #74

herbdool opened this issue Jan 25, 2024 · 8 comments · Fixed by #76
Labels
status - has pull request This issue has a Pull Request type - feature request New feature or request

Comments

@herbdool
Copy link

herbdool commented Jan 25, 2024

Is it possible to add anchor button as an option with the profile builder?

Looks like it's possible to add an anchor button manually in the profile JSON:

"toolbar": "bold italic blockquote | bullist numlist | backdroplink backdropunlink anchor | visualblocks removeformat fullscreen",
"plugins": "lists backdroplink visualblocks fullscreen autoresize anchor",
@herbdool herbdool added the type - feature request New feature or request label Jan 25, 2024
herbdool added a commit to herbdool/tinymce that referenced this issue Jan 25, 2024
@herbdool herbdool added the status - has pull request This issue has a Pull Request label Jan 25, 2024
@herbdool
Copy link
Author

@indigoxela got a PR, seems to be easier than I thought.

@herbdool
Copy link
Author

Oh, not done. The button is there but not the plugin.

herbdool added a commit to herbdool/tinymce that referenced this issue Jan 25, 2024
@herbdool
Copy link
Author

Fixed.

@indigoxela
Copy link
Member

Yes, there are some plugins not added to the builder - for different reasons.

When I first looked at the anchor plugin, I didn't find that it provides anything that's not already possible via the backdroplink plugin.
But, sure, why not add it. The indicator icon's nice, I guess. Will take a closer look later.

@indigoxela
Copy link
Member

indigoxela commented Jan 26, 2024

Still not a huge fan of that plugin, but I understand, that people may want it.
Initially I thought about coming up with a better alternative, but time flies... and the plugin is OK as-is. 😉

Here's an alternate PR, which also prevents a "responsibility conflict" with the backdroplink plugin. Want to test?

@herbdool
Copy link
Author

I've a client where they are using the CKEditor version of the anchor button right now, and may need it here if we switch them. I figure it's easier to add here than create a separate module.

@herbdool
Copy link
Author

@indigoxela I've tested your PR and it fully works. No conflict.

Out of curiosity I tried to set an anchor with the backdroplink plugin by filling in the Unique Identifier and leaving the href blank. But it disappears. Not sure if that's TinyMCE cleaning up or if I'm doing it wrong. But regardless it's less confusing to have a dedicated button and an icon on the actual anchor. If I find it confusing, then probably so do my clients.

@indigoxela
Copy link
Member

Not sure if that's TinyMCE cleaning up or if I'm doing it wrong.

Ah, right, that was the point...

The trouble adding an empty link (no href value) is partly caused by the core link dialog, partly the backdroplink plugin. 😉

A good reason to add the anchor plugin to the builder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status - has pull request This issue has a Pull Request type - feature request New feature or request
Projects
None yet
2 participants