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

feat: Create anchor target type plugin for xhtml #844

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

jtoloui-ibm
Copy link

Add support for target type in anchor tag xhtml

To support target type in xhtml links

  • Included select option: _blank, _self, _top, _parent
  • When enabled it will replace the link toolbar action and use the recreated version with target type support
  • Enabled attaching of Target value in xhtml.js

@jtoloui-ibm
Copy link
Author

I was struggling to assign an icon to replace the link would you be able to suggest the best way to fix this? For the moment i've just used the format one

@jtoloui-ibm
Copy link
Author

Hey @samclarke, please let me know if this format is okay as a plugin

@jtoloui-ibm
Copy link
Author

Hey @samclarke, hope you're doing well. Was just wondering if this PR is okay for the next minor version for a plugin.

Copy link
Owner

@samclarke samclarke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR. It looks good! Sorry for the delay in reviewing it.

Could you revert the package-lock.json file to the master branch version? The default behaviour of npm install annoyingly rewrites (have to use npm ci to avoid that).

@@ -1195,6 +1195,11 @@
attr(node, 'target', target);
}

if (target === '_self' ||
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be worth adding a check to see if this plugin is loaded as we probably don't want to allow other targets if it isn't.

There isn't a way to check from here as the converters don't have access to have but could check for if this plugin exists:

if (sceditor.plugins.anchortarget ...

@samclarke samclarke added this to the v3.2.0 milestone Oct 12, 2021
@samclarke samclarke modified the milestones: v3.2.0, v3.3.0 Mar 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants