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

Great project, have a few questions #13

Open
jay2success opened this issue Feb 15, 2021 · 3 comments
Open

Great project, have a few questions #13

jay2success opened this issue Feb 15, 2021 · 3 comments

Comments

@jay2success
Copy link

jay2success commented Feb 15, 2021

Hi,

Thanks for great project, i have few questions:

  1. how to show toolbar when item selected? i checked the source code and it seems no event to attach when node is selected. I try to do the following, maybe there is better way?

<div> <div v-show="isSelected"> <div id="toolbar-options" class="hidden"> <a href="#" ><i class="fa fa-plane"></i></a> <a href="#" ><i class="fa fa-car"></i></a> <a href="#" ><i class="fa fa-bicycle"></i></a> </div> </div> <Editor></Editor> </div>

  1. How to set rules when the node is droppable into some node? I try to use canMoveIn but its not working

rules: { canMoveIn: (node) => node.parent.componentName == 'Row' //only allow inside Row }

  1. Is there event when node being dropped so we can do something, example show popup to enter some value. In my case i want to drop Column element but i want user to enter how many columns they want. Then use that value as props for the Column element.

  2. Its great project, just missing few important things like events, toolbar, and rules.

Thanks for your help.

@yoychen
Copy link
Owner

yoychen commented May 9, 2021

hi,

Thanks for your asking.

  1. In the current version of v-craft, when a node is selected, it will have the class name cf-node-selected. You can use this class name to determine if the node is selected. isSelected props is a great solution. Thanks for the suggestion.
  2. Could you provide more information to reproduce it, like using CodeSanbox.
  3. Sorry, there are no such events in the current version of v-craft. Thanks for your suggestion, I also think this feature is useful.

@Nehasoni988
Copy link

Hello,

It's indeed a great project but I also have a few questions according to my requirement.
I want to create a newspaper builder on my website. A newspaper builder format would be exactly as it is displayed in this demo.

My questions are-

  1. Do I need to create the structure like this demo by myself after installing the v-craft? Because I read in the documentation that after installing the v-craft, we need to create the builder by ourselves using v-craft's features.
  2. I have seen that export data is a JSON of the Vue data structure. If I want to download this builder in a PDF or JPG, would it be possible by that?
  3. I also saw an issue in this demo once we remove all elements and the canvas is empty then a new element can not be added.

It would be great if you can answer these questions.

@jermsam
Copy link

jermsam commented Apr 3, 2023

Hello. Is this compatible with vue 3?

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

No branches or pull requests

4 participants