DEV Community

Samson Adesanoye
Samson Adesanoye

Posted on


How to use TinyMCE In Your Custom Voyager View

TinyMCE is an online rich-text editor released as open-source software, its website describe it as the most advanced WYSIWYG HTML editor designed to simplify website content creation. It has the ability to convert HTML textarea fields or other HTML elements to editor instances. It is the default textarea fields editor used in Voyager (The Missing Laravel Admin).

Here are the steps in including TinyMCE in your custom voyager view:

  1. Create textarea field add the class richTextBox to the textarea. i.e
<textarea  class="form-control richTextBox" name="body" required>
{!!  old('body') !!}
Enter fullscreen mode Exit fullscreen mode

Here is an example commit to voyager source code where TinyMCE was implemented and you can draw some ideas from it.

  1. Customize the minimum height of TinyMCE: The default minimum height of TinyMCE in Voyager is 600 in height, and it is represented with the min_height variable.
var additionalConfig = {
      min_height: 100,

$.extend(additionalConfig, {!! json_encode($options->tinymceOptions ?? '{}') !!})

Enter fullscreen mode Exit fullscreen mode


List of possible key and value

Latest comments (0)

An Animated Guide to Node.js Event Loop

Node.js doesn’t stop from running other operations because of Libuv, a C++ library responsible for the event loop and asynchronously handling tasks such as network requests, DNS resolution, file system operations, data encryption, etc.

What happens under the hood when Node.js works on tasks such as database queries? We will explore it by following this piece of code step by step.