9

I'm new at joomla and currently using Joomla version 3.6. Is there a way to set the tinymce editor to use div tag as a default instead of paragraph? Any answer would be appreciated, Thanks a lot.

Mr Peach
  • 1,364
  • 1
  • 12
  • 20

1 Answers1

18

You have to init tinymce with forced-root-block: 'div'.

tinymce.init({
  // ...
  forced_root_block : 'div'
});

If you set this option to false it will never produce p tags on enter, or, automatically it will instead produce br elements and Shift+Enter will produce a p. — documentation

Marvin
  • 9,164
  • 3
  • 26
  • 44