Angular-Ckeditor Palette

I am currently in the process of integrating a custom toolbar into my Angular-Ckeditor setup.

Here are the details:
angular: 1.5.8
angular-ckeditor : 1.0.3
ckeditor: 4.7.1

It seems that the angular-ckeditor has not received updates in the past 9 months, which makes me suspect that it may not fully support colored text and backgrounds. However, I am uncertain about this.

This is how the editorOptions are configured:

app.service('EditorOptions', function() {
 this.basic = {
 toolbar: [
      { name: 'clipboard', items: ['Undo', 'Redo' ] },
      { name: 'editing', items: [ 'Find', 'Replace', '-', 'SelectAll', '-', 'Scayt' ] },
      { name: 'basicstyles', items: [ 'Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript'] },
      { name: 'paragraph', items: [ 'NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Blockquote', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'] },
      { name: 'insert', items: [ 'Image',  'Table', 'HorizontalRule', 'Smiley', 'SpecialChar'] },
      '/',
      { name: 'styles', items: [ 'Styles', 'Format', 'Font', 'FontSize' ] },
      { name: 'colors', items: [ 'TextColor', 'BGColor' ] },
      { name: 'tools', items: [ 'Maximize'] }
  ]...

A script is called from the frontend:

<script src="https://cdnjs.cloudflare.com/ajax/libs/ckeditor/4.7.1/ckeditor.js"></script>

In the controller:

$scope.editorOptions = angular.merge({}, EditorOptions.basic, {
              on: {
                blur: function() {
                    $scope.updateNode($scope.node);
                }
              }
            });

Finally, here is the form code:

    <textarea ckeditor="editorOptions" ng-model="node.body"></textarea>

I am facing an issue where the toolbar configurations for colors are not displaying. All other toolbar groups render correctly. Can anyone provide insight into why this might be happening?

Answer №1

Solution: incorporating the necessary plugin

toolbarGroups: [
  { name: 'clipboard', groups: [ 'clipboard', 'undo' ] },
  { name: 'insert', groups: [ 'insert' ] },
  { name: 'forms', groups: [ 'forms' ] },
  //{ name: 'document', groups: [ 'mode', 'document', 'doctools' ] },
  { name: 'others', groups: [ 'others' ] },
  { name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] },
  { name: 'tools', groups: [ 'tools' ] },
  '/',
  { name: 'links', groups: [ 'links' ] },
  { name: 'editing', groups: [ 'find', 'selection', 'spellchecker', 'editing' ] },
  { name: 'paragraph', groups: [ 'indent', 'list', 'blocks', 'align', 'bidi', 'paragraph' ] },
  { name: 'colors', groups: [ 'colors' ] },
  { name: 'styles', groups: [ 'styles' ] },
  // { name: 'about', groups: [ 'about' ] }
],
removeButtons: 'About,Source,Anchor,Cut,Copy,Paste,PasteText,PasteFromWord,Font',
format_tags: 'p;h1;h2;h3;pre',
removeDialogTabs: 'image:advanced;link:advanced',
linkShowTargetTab: false,
extraPlugins: 'colorbutton'

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

"Create a Vue element containing a trio of buttons each displaying a distinct numeral

I am currently dealing with a component that generates three items (boxes) each containing three buttons (created using v-for). The issue I am facing is that when I click on a button, all the numbers inside the buttons change simultaneously. I want to be a ...

Console error caused by uncontrolled input in React Hooks

A cautionary message: Changing an uncontrolled text input to a controlled one is not recommended. Stick to using either controlled or uncontrolled input elements throughout the component's lifecycle. import React, { useEffect, useState } ...

Transferring the value of a TextBox to another TextBox in ASP.NET across multiple rows

I have around 10 rows where I need to duplicate the value of one TextBox into another. A specific ID can be assigned to the first TextBox to achieve this, but I am seeking a more general function that can copy TextBox values in each row in ASP.NET. This i ...

Implementing a FadeOut effect for the clicked link

When clicking on each link, I want the same link to fadeOut() after clicking on the ok button in the myalert() function. If clicked on cancel, it should not fadeOut(). How can I achieve this using the myalert() function? For example: http://jsfiddle.net/M ...

Unable to fetch information from the local host using an AJAX request and PHP script

I'm having trouble retrieving the <p> elements echoed in my PHP script. I need a solution that allows me to style these <p> nodes using a JavaScript function without refreshing the page. Can someone help me with this issue? Here is my PHP ...

Properly setting up event handling for a file input and Material UI Button

In my attempt to create a customized form using material UI elements, I am facing an issue. The form allows users to upload files and add notes for each option, which are stored in an array in the component's state. Here is a simplified version of th ...

Need a jQuery function that updates the 'id' after clicking on a specific div? Here's how to do it!

I need help simplifying my current situation. Step 1: I want to increment the variable "count" by 1 every time a specific div is clicked. Step 2: After updating "count", I want to utilize it in another function. This function involves copying the value f ...

Iterate through a JavaScript grid and display the items

I am attempting to iterate through a JavaScript table, aiming to display the elements located between two selections made by the user. Here is an example of the table structure: if the user selects IDs 2 and 5, the loop should display rows 3 and 4. I trie ...

The Mean stack application is throwing an error message: "user.comparePassword is not

This section contains my user models in the file named "user.js". var mongoose = require('mongoose'); var bcrypt = require('bcryptjs'); let emailLengthChecker = (email) => { if (!email) { return false; } else { if (emai ...

Encountering npm error code ERR_SOCKET_TIMEOUT while attempting to generate a React application

Every time I attempt to create a React app using the command: npx create-react-app chat-app I encounter this error message: Error I have attempted various solutions in an effort to resolve the error: To check if I am behind a proxy, I ran the following ...

Encountered an error while running npm run dev on a NextJS application due to an

Upon running the npm run dev command, the next app is displaying an error message: $→mmoLD;%g?wŷ↓▬ovH0a5*ؒl͛Siy☺rO7%L]%∟hk ^ SyntaxError: Invalid or unexpected token at wrapSafe (internal/modules/cjs/loader.js:988:16) at Module._comp ...

Is it possible to invoke an AngularJs service by clicking a button?

Recently, I've been working on some AngularJS code involving a service and controller. angular.module('myModule', []).service("AttendanceService", function ($http) { this.getdata = function () { return $http({ ...

Using jQuery Datatables within an AngularJS application

After using the following code successfully, I realized that I want the data in the tbody to come from ng-repeat instead of dt-options. Is there a way to convert an existing angular table into datatables? Angular Module:- var app = angular.module(&a ...

Instructions for including packages in .vue files

Within the script section of my .vue file, I have the following code: <script> import get from 'lodash.get'; ... </script> Despite trying to import lodash.get, I keep encountering an error message stating ReferenceError: ge ...

Encourage the client to maintain active listening throughout the entire conversation, rather than just listening once

Currently, I have an MQTT client setup using AngularJS and the Node.js MQTT module. The setup includes a basic switch that publishes topics to an MQTT broker whenever the status of the switch changes. The HTML code related to this functionality looks like ...

Submit form data to MongoDB upon submission

In my node express setup, I have integrated functionality to store values entered in checkboxes and text areas into a MongoDB database. Initially, users could calculate a score by clicking a button associated with checkboxes, and then post the information ...

angular directive for star ratings without any stars filled

Is there a way to adjust the angular star rating directive so that no star is filled upon loading? Here's the directive code: responseController.directive('starRating', function(){ return { restrict: 'EA', templat ...

Leverage external JavaScript to retrieve information from an XML file

I currently have a large amount of JavaScript code within my HTML file (1500 lines), and I am looking to relocate some portions of it to another JS file. My goal is to create a single file for importing data, and I am exploring the best approach to achieve ...

The shadows in Three Js are functioning correctly, although there are a few shadow lines visible below my model

I am currently in the process of modifying a three.js scene, despite having little experience with javascript and three.js. After successfully adding a shadow to my GLTF model, I noticed some yellow and red lines beneath the model that I cannot identify or ...

Having trouble viewing a dynamically adjusting Angular NVD3 graph embedded in bootstrap

I have been utilizing the NVD3 library along with bootstrap 3.0 for my project. I have two divs with the classes "col-md-6 col-sm-12" positioned side by side. My goal is to showcase charts in both of these divs. To ensure that the charts are displayed corr ...