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

fragment instance issue #10

Open
martinhearn opened this issue Jul 13, 2016 · 16 comments
Open

fragment instance issue #10

martinhearn opened this issue Jul 13, 2016 · 16 comments

Comments

@martinhearn
Copy link

Hi

Trying this component I get the following error:

Attribute ":model.sync" is ignored on component <vue-html-editor> because the component is a fragment instance

I'm using Vue 1.0.26.

What am I doing wrong?

Thanks!

Martin

@mocheaz
Copy link

mocheaz commented Jul 28, 2016

Any update for this?

@liujunyang
Copy link

bug still here

@Haixing-Hu
Copy link
Owner

@martinhearn Could you please paste the code snippet? I can not reproduce the bug on the demo page. I have already upgrade to Vue.js v1.0.26.

@Remo
Copy link

Remo commented Aug 9, 2016

@Haixing-Hu when I look at the demo available here http://haixing-hu.github.io/vue-html-editor/demo.html I see that you are using Vue.js v0.12.16. I'm using Vue.js v1.0.26. The numbers are similar, but your version is very old.

@Remo
Copy link

Remo commented Aug 9, 2016

@Haixing-Hu I've seen that you updated vue.js in the repo, I guess I've been looking at the wrong thing. I still get the problem above though. Here's what I've did:

npm install vue vue-html-editor
npm install -g browserify

app.js

Vue = require('vue');
Vue.component('vue-html-editor', require("vue-html-editor"));

new Vue({
    el: "#app",
    data: {},
});

index.html

<!DOCTYPE html>
<html lang="en">
    <body>
    <div id="app">
        <vue-html-editor model="{{@ text}}"></vue-html-editor>
        <div style="margin-top:40px">
            <div> The HTML contents are as follows:</div>
            <div>{{{text}}}</div>
        </div>
    </div>
    <script src="index.js"></script>
</body>

Create index.js

browserify app.js > index.js

@jioll
Copy link

jioll commented Aug 11, 2016

@Haixing-Hu 上面提到实例片问题段貌似因为vue版本较新导致?

@woshihaoren
Copy link

woshihaoren commented Aug 12, 2016

@Haixing-Hu
Use vue init initialization project
vue init webpack test
replace default's App component

<template>
  <div id="app">
<editor name="html-editor" :model.sync="text"></editor>
  <div style="margin-top:40px">
    <div> The HTML contents are as follows:</div>
    <hr>
    <div >{{{text}}}</div>
  </div>
  </div>
</template>

<script>
import Hello from './components/Hello'
import editor from 'vue-html-editor'

export default {
  components: {
    Hello,
    editor
  }
}
</script>

console

vue.common.js?1090:1019[Vue warn]: Attributes "name", ":model.sync" are ignored on component because the component is a fragment instance: http://vuejs.org/guide/components.html#Fragment-Instance

@Chalkin
Copy link

Chalkin commented Aug 15, 2016

Have the same issue while using laravel + spark + browserify. Can't use webpack here.

working with vue.js 1.0.26

@Wifsimster
Copy link

Same problem here with current version and webpack.

@goldfinch
Copy link

the same problem, Vue 1.0.26

@freevital
Copy link

Same problem with webpack.

@thats4shaw
Copy link

Facing the same issue with Laravel + Spark + Browserify.

@amitavroy
Copy link

same problem even when I am trying inside vue cli webpack template.

@ada012
Copy link

ada012 commented Oct 10, 2016

@Haixing-Hu @timfeid

Is there any answer? I changed all the template:
"<textarea class='form-control' :name='name'></textarea>"
to
"<div><textarea class='form-control'", :name='name'></textarea></div>"
Or is it wrong?

@roarkmccolgan
Copy link

Hi,

I also have this issue, adding the div in the template does not help,
Using Browserify

@ewerkema
Copy link

The solution by @timfeid with copying the vue-html-editor.js file to your local environment worked for me:

"Interesting, for some reason I was able to get this working by just copying vue-html-editor.js to my local. Using require('vue-html-editor') fails, but using require('./vue-html-editor') works without the div there as well."

It would be great if this issue could be solved!

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