[x] convert selected text node (only) into link with typed in url (no object browser support needed) and synchronize admniUi
[x] convert multiple selected nodes (selection might contain non-text nodes like <b>, <em> etc.) into link
[ ] clicking on folder icon on the left side on input field should open up sidebar to choose the link
[x] UI should match quanta (as much as possible)
Toolbar fix
This PR also includes some fixes for the below edge cases:
The toolbar is added before the frontend re-renders, causing it to disappear. The solution is to add the toolbar after the re-render using a timeout, but this introduces a slight visual delay
what is happening is that
after clicking on a block 'selectBlock' is called and then this do all the other stuff, then it adds nodeIds in the json data (if text block with richtext enable) and then
it sends this to both adminUI (parent) and also itself (window) and as you can see in the code we got onEditChange which takes a callback as an args and calls this callback with updated data when the message of type 'FORM_DATA' is triggered and so
f7 frontend is then gets the updated data but before that data will re-render the blocks, our 'selectBlock' calls the 'creatQuantaToolbar' method and adds the toolbar but then html is re-rendered by this framework and it removes this toolbar added by hydrajs
so what we can do is that we add toolbar only when the data is sent to the frontend and we are sure that the html is re-rendered and then after this we add the toolbar so now it will not get removed, i did this by setting a 0 timeout so adding toolbar goes to another cycle but this adds up a visual delay of toolbar appearing
Fixes #35
This PR should :
<b>, <em>
etc.) into linkToolbar fix
This PR also includes some fixes for the below edge cases: The toolbar is added before the frontend re-renders, causing it to disappear. The solution is to add the toolbar after the re-render using a timeout, but this introduces a slight visual delay
what is happening is that
so what we can do is that we add toolbar only when the data is sent to the frontend and we are sure that the html is re-rendered and then after this we add the toolbar so now it will not get removed, i did this by setting a 0 timeout so adding toolbar goes to another cycle but this adds up a visual delay of toolbar appearing