CodeFlask icon indicating copy to clipboard operation
CodeFlask copied to clipboard

Code lines is not completely loading on init

Open mpz opened this issue 6 years ago • 3 comments

On loading I have: image

After pressing Enter or any code changes:

image

Code lines appeared!

Need load lines on init

mpz avatar Jun 19 '19 14:06 mpz

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
  }

mpz avatar Jun 19 '19 14:06 mpz

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 avatar Aug 18 '21 09:08 huanglei890714

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

huanglei890714 avatar Aug 19 '21 02:08 huanglei890714