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

Code lines is not completely loading on init #96

Open
mpz opened this issue Jun 19, 2019 · 3 comments
Open

Code lines is not completely loading on init #96

mpz opened this issue Jun 19, 2019 · 3 comments
Labels

Comments

@mpz
Copy link

mpz commented Jun 19, 2019

On loading I have:
image

After pressing Enter or any code changes:

image

Code lines appeared!

Need load lines on init

@mpz
Copy link
Author

mpz commented Jun 19, 2019

my Fix

initFlask(code){
    if(!this.flask){
      this.flask = new CodeFlask('.code', { language: 'js', lineNumbers: true });
      this.flask.onUpdate((code) => {
        this.new_code = code;
      });
    }

      this.flask.updateCode(code);
      this.flask.setLineNumber();   // manualy update lines
  }

@huanglei890714
Copy link

my Fix

initFlask(code){
    if(!this.flask){
      this.flask = new CodeFlask('.code', { language: 'js', lineNumbers: true });
      this.flask.onUpdate((code) => {
        this.new_code = code;
      });
    }

      this.flask.updateCode(code);
      this.flask.setLineNumber();   // manualy update lines
  }

I wrote it like your, but it doesn't work

@huanglei890714
Copy link

huanglei890714 commented Aug 19, 2021

my Fix

initFlask(code){
    if(!this.flask){
      this.flask = new CodeFlask('.code', { language: 'js', lineNumbers: true });
      this.flask.onUpdate((code) => {
        this.new_code = code;
      });
    }

      this.flask.updateCode(code);
      this.flask.setLineNumber();   // manualy update lines
  }

I wrote it like your, but it doesn't work

I solved it, because of the problem of passing parameters,the parameters can only be strings

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

No branches or pull requests

3 participants