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

How to put some default text in one specific TinyMCE editor? #85

Open
arunkannath opened this issue Oct 24, 2017 · 1 comment
Open

How to put some default text in one specific TinyMCE editor? #85

arunkannath opened this issue Oct 24, 2017 · 1 comment

Comments

@arunkannath
Copy link

Tried below code:
onActivate={e=>initialiseValue(e,this.props.value)} //props.value has def text

function initialiseValue(e,val){
if(val!=""&&val!=undefined){

   e.target.setContent(e.target.getContent()+val);
}
}

The problem here is, everytime I click on tinyMCE editor field, it is putting the value over and over. I want the value to be added at first time while loading and not anymore after that. Tried onLoadContent, but it didn't fire setContent() method. Please help.

@omarchehab98
Copy link

content prop

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

2 participants