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

Feature request: Allow multiple parameters for one attribute #37

Open
ttlg opened this issue Oct 17, 2018 · 6 comments
Open

Feature request: Allow multiple parameters for one attribute #37

ttlg opened this issue Oct 17, 2018 · 6 comments
Labels
feature New feature or request

Comments

@ttlg
Copy link

ttlg commented Oct 17, 2018

As I am working on an app for web contents, I want multiple parameters for one attributes, e.g. target="_blank" for the link attribute.
Do you have any ideas on how I archive that or have any plan for this feature ?
Thank you.

@pulyaevskiy
Copy link
Contributor

Short answer is that it is currently not supported to have multiple parameters on link attributes.

However if you only need those additional attributes in your HTML and they are static like target="_blank" then nothing stops you from adding those when converting Delta to HTML.

I'd be curious to hear more details on your use case to better understand it though.

@ttlg
Copy link
Author

ttlg commented Oct 20, 2018

Thank you for your reply!

Yes. Your suggestion works if the parameter is static.
I’m thinking to use Zefyr as editor for the blog post client like WordPress, and its better to have capability of handling multiple parameters.

@pulyaevskiy
Copy link
Contributor

Thanks for the details. Technically it is possible, though at this point it would be a breaking change to the way link attribute is stored in Notus currently (probably should be able to handle it gracefully though).

Wondering if you could list all the additional attributes you were thinking links should support, aside from target attribute?

@ttlg ttlg changed the title Feature request: Allow multiple custom values for one attribute Feature request: Allow multiple parameters for one attribute Oct 22, 2018
@ttlg
Copy link
Author

ttlg commented Oct 22, 2018

For the link attribute, I think it has few parameters which should be handle in Zefyr aside from target parameter.
However I need to handle any parameters for HTML attributes.
So instead of adding additional parameters to the attributes, implementing container attribute which stores any parameters would be really helpful for me.
In this way, we can preserve any information to the container attribute regardless of whether ZefyrEditor view will reflect the parameters or not.

@pulyaevskiy pulyaevskiy added the feature New feature or request label Oct 22, 2018
@pulyaevskiy
Copy link
Contributor

OK, I see now.

Not sure if I'm a big fan of arbitrary containers, but I can see how this may be useful. In any case this would be a substantial change to how things work at this point, will require some careful planning and design.

One interesting area that this or similar functionality would open up is the ability to allow users to completely customize the editor appearance and behavior.

@ttlg
Copy link
Author

ttlg commented Oct 24, 2018

True. It might be relate to #30.
I look forward development of the Zefyr.
Thank you for your consideration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants