Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
<!DOCTYPE html>
<html>
<head>
  <script src="/js/tinymce/tinymce.min.js" referrerpolicy="origin"></script>
  <script>
  	tinymce.init({
  		selector:'textarea',
  		menubar: '',
  		toolbar: '',
  		skin: 'oxide-dark',
  		content_css: 'dark'
  	});
  	
  </script>
</head>
<body>
  <textarea cols=80 rows=20 style="background-color:orange;">Chun Kang is genius !!!</textarea>
</body>
</html>

...

Code Block
<!DOCTYPE html>
<html>
<head>
  <script src="/js/tinymce/tinymce.min.js" referrerpolicy="origin"></script>
  <script>
  	tinymce.init({
  		selector:'textarea',
  		plugins: "nonbreaking",
  		menubar: '',
  		toolbar: '',
  		skin: 'oxide-dark',
  		content_css: 'dark',
  		nonbreaking_force_tab: true
  	});
  	
  </script>
</head>
<body>
  <textarea>Chun Kang is genius !!!</textarea>
</body>
</html>

...

You can force inserting <br> tag instead of <p> tag when you press enter by foreced_root_block=false

Code Block
<!DOCTYPE html>
<html>
<head>
  <script src="/js/tinymce/tinymce.min.js" referrerpolicy="origin"></script>
  <script>
    tinymce.init({
        selector:'textarea',
        plugins: 'nonbreaking',
        nonbreaking_force_tab: true,
        forced_root_block: false
    });
     
  </script>
</head>
<body>
  <textarea>Chun Kang is genius !!!</textarea>
</body>
</html>


Complete set of TinyMCE option for coding testing just like Sublime Editor

Code Block
<!DOCTYPE html>
<html>
<head>
  <script src="/js/tinymce/tinymce.min.js" referrerpolicy="origin"></script>
  <script>
    tinymce.init({
        selector:'textarea',
        plugins: 'nonbreaking',
        menubar: '',
        toolbar: '',
        skin: 'oxide-dark',
        content_css: 'dark',
        nonbreaking_force_tab: true,
        forced_root_block: false
    });
     
  </script>
</head>
<body>
  <textarea>Chun Kang is genius !!!</textarea>
</body>
</html>

...