Skip to content

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

Description

@arunkannath

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions