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
Draft js link uses ObjectBrowser #1223
Conversation
@tisto @sneridagh the problem with portalUrl is that old implementation of this widget sent the complete url and serializer/deserializer in restapi branch (for resolveuid) manage urls with portal_url in it. If we decide a standard, i can fix the backend |
…aft-js-link-objbrw
…aft-js-link-objbrw
@giuliaghisini one thing I notice is that when choosing an item from the right sidebar the link overlay shows the full URL (e.g. "HTTP://localhost:8080/Plone/news"): This could be confusing for the user because the backend URL is displayed which might not make sense to the editor. Would it be possible to show the full path instead (e.g. "/news")? The second thing I am wondering about is what do we store internally? When the editor chooses from the right sidebar we should store an internal link without the full URL, right? Is that converted internally after the user hits the "->" icon? |
@giuliaghisini one other minor thing. We should disable autocomplete (autocomplete=off) on the link overlay. |
@tisto the links are stored internally (in Plone) as resolveuids and then serialized to Volto as absolute links. |
@tiberiuichim I get that. Though, for the user, this might be very confusing. Editors might have no idea what "localhost" means here. |
@giuliaghisini please rebase, then I will do a final review and merge. We discussed the localhost issue and it could be that this just happens when using localhost. :) |
done! thanks! |
@giuliaghisini thanks! one other question that crossed my mind: how does this behave when you have a RichText field with a text in the sidebar? We do this a lot in our projects. If the sidebar contains the Link, how do we open another sidebar with the content browser? |
another sidebar come'up and overlays the sidebar. When users select's the link, the sidebar contains the ObjectBrowser disappears and user could continue editing the text |
Added objectBrowser to select a link in draft-js.
Now the widget stores in draft-js structure the link without portalUrl. Do you think it may be right or do you prefer to save the portalUrl in draft-js structure on DB?
Sorry, i committed all buildout files of /api folder for a mistake