Toni Michel Caubet
Toni Michel Caubet

Reputation: 20163

tinymce custom implementation - their docAPI could be better

i'm just trying user to be able to insert, <p>, <ul> & <li> and <img>, how can i do it?

their webiste it's too confusing for me...

anyone can help me?

Upvotes: 1

Views: 116

Answers (2)

mu is too short
mu is too short

Reputation: 434585

You want to adjust the theme_advanced_buttons settings:

tinyMCE.init({
    //...
    theme_advanced_buttons1: 'bullist,numlist,image',
    theme_advanced_buttons2: '',
    theme_advanced_buttons3: '',
    theme_advanced_buttons4: '',
    //...
});

AFAIK, you always get paragraphs.

Have a look at these examples for more, there are various examples listed in the right sidebar.

Upvotes: 2

gahooa
gahooa

Reputation: 137252

Here is your answer...

var Editor = tinyMCE.get('YourEditorID');
Editor.focus();
Editor.selection.setContent('<strong>Hello World</strong>');

Note: focus() may not be needed, depending on situation.

Upvotes: 0

Related Questions