Giter Club home page Giter Club logo

Comments (6)

bcreation avatar bcreation commented on July 21, 2024 5

@Ronak-maker I found the event name.
<jodit-editor ref="jodit" v-model="content" :config="config" @input="updateContent" />

from jodit-vue.

Ronak-maker avatar Ronak-maker commented on July 21, 2024 1

Hello @WendellAdriel ,
I could not find a solution from the jodit event. Then I used the on-change event of the textbox with the help of javascript.

from jodit-vue.

WendellAdriel avatar WendellAdriel commented on July 21, 2024

Hello @Ronak-maker.
I think I understood what you need and I can think on some ways.
It would be better to have a working example for me to check, but did you try setting up a watcher for the model of the editor?

TEMPLATE

<jodit-editor v-model="myText" />

WATCHER

export default {
  // YOUR CODE HERE...
  watch: {
    myText(newValue) {
      // TRIGGER EVENT
    }
  }
}

from jodit-vue.

Ronak-maker avatar Ronak-maker commented on July 21, 2024

Hey, @WendellAdriel
Thanks for the reply.

I am updating myText on page load and page refresh. so, whenever the page is load and refresh, the change event is fire. I need to change event fire when the user actually enters text in the textbox.

from jodit-vue.

WendellAdriel avatar WendellAdriel commented on July 21, 2024

Ok @Ronak-maker, so even with the fire from the editor itself you'll have an issue with this.
The myText is a data, computed, props?

Because what I can think of is when you initialize your component, on the created lifecycle, you can create a "backup variable" that will host the myText and when you set a watcher for myText you compare this with the "backup variable" and if the content is different, then you execute your code and if the content is the same, you just ignore it.

Just note that this "backup variable" cannot be reactive/linked with the original myText, this variable needs to be set up once and changed only on the created lifecycle for this to work.

from jodit-vue.

WendellAdriel avatar WendellAdriel commented on July 21, 2024

@Ronak-maker I saw that you closed the issue, but did you find a solution for your problem?

from jodit-vue.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.