Skip to content

Feat/iframe resize to content height #36

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

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 36 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ you can write in HTML file or even a markdown file.
</script>
```


### Scope

You can customize scope by passing an object to the scope property.
Expand Down Expand Up @@ -179,6 +178,42 @@ new Vue({
</div>
```

### Custom layout

You can provide a custom layout for vuep to render the editor and preview in.
Add a div with the attribute `vuep-preview` and one with `vuep-editor` so vuep knows where to render these components.

```html
<div id="app">
<vuep :value="value">
<div class="custom-layout">
<h2>My custom preview</h2>
<div class="custom-preview" vuep-preview></div>
<h2>My custom editor</h2>
<div class="custom-editor" vuep-editor></div>
</div>
</vuep>
</div>
```

### Code example iframe

Vuep can render the code example inside an iframe. This is useful for testing components with elements set to `position: fixed`.

```html
<div id="app">
<vuep :value="value" iframe></vuep>
</div>
```

Vuep can fit the iframe to its content by setting `fit-iframe`.

```html
<div id="app">
<vuep :value="value" iframe fit-iframe></vuep>
</div>
```

## Inspired

- https://facebook.github.io/react/
Expand Down
Loading