what is tinymce code example

Example 1: tinymce

Basic Example 
-------------------------------------------------------------------------
Html -> 



Javascript -> 

tinymce.init({
  selector: 'textarea#basic-example',
  height: 500,
  menubar: false,
  plugins: [
    'advlist autolink lists link image charmap print preview anchor',
    'searchreplace visualblocks code fullscreen',
    'insertdatetime media table paste code help wordcount'
  ],
  toolbar: 'undo redo | formatselect | ' +
  'bold italic backcolor | alignleft aligncenter ' +
  'alignright alignjustify | bullist numlist outdent indent | ' +
  'removeformat | help',
  content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:14px }'
});

Example 2: tinymce.value

// Add a class to all paragraphs in the editor.
tinymce.activeEditor.dom.addClass(tinymce.activeEditor.dom.select('p'), 'someclass');

// Gets the current editors selection as text
tinymce.activeEditor.selection.getContent({format: 'text'});

// Creates a new editor instance
var ed = new tinymce.Editor('textareaid', {
    some_setting: 1
}, tinymce.EditorManager);

ed.render();

Tags:

Misc Example