Skip to content

Commit

Permalink
update formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
fsbraun committed Dec 21, 2024
1 parent 3e49b88 commit 6dd9e50
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 528 deletions.
2 changes: 1 addition & 1 deletion djangocms_text/static/djangocms_text/css/cms.text.css
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ dialog.cms-form-dialog {
margin: unset;
left: auto;
transform: translate(-50%, -50%);
min-width: 200px;
min-width: 240px;
padding: 10px 15px;
background-color: var(--dca-white);
border: 1px solid var(--dca-gray-light);
Expand Down
511 changes: 0 additions & 511 deletions djangocms_text/static/djangocms_text_ckeditor/js/cms.ckeditor.js

This file was deleted.

2 changes: 0 additions & 2 deletions djangocms_text/static/djangocms_text_ckeditor/js/post.js

This file was deleted.

2 changes: 0 additions & 2 deletions djangocms_text/static/djangocms_text_ckeditor/js/pre.js

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"bugs": {
"url": "https://github.com/django-cms/djangocms-text/issues"
},
"homepage": "https://github.com/django-cms/djangocms-text-rte",
"homepage": "https://github.com/django-cms/djangocms-text",
"devDependencies": {
"@babel/core": "^7.26.0",
"@babel/preset-env": "^7.26.0",
Expand Down
5 changes: 5 additions & 0 deletions private/js/cms.ckeditor4.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/

/* eslint-env es6 */
/* jshint esversion: 6 */
/* global document, window, console */


import './ckeditor4_plugins/cmsdialog/plugin';
import './ckeditor4_plugins/cmsplugins/plugin';
import './ckeditor4_plugins/cmsresize/plugin';
Expand Down
1 change: 1 addition & 0 deletions private/js/cms.dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/* jshint esversion: 6 */
/* global document, window, console */


class CmsDialog {
/**
* Constructor for creating an instance of the class showing a django CMS modal in a
Expand Down
16 changes: 8 additions & 8 deletions private/js/cms.tiptap.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import CmsDynLink from './tiptap_plugins/cms.dynlink';
import Placeholder from '@tiptap/extension-placeholder';
import Subscript from '@tiptap/extension-subscript';
import Superscript from '@tiptap/extension-superscript';
import Table from '@tiptap/extension-table'
import TableCell from '@tiptap/extension-table-cell'
import TableHeader from '@tiptap/extension-table-header'
import TableRow from '@tiptap/extension-table-row'
import Table from '@tiptap/extension-table';
import TableCell from '@tiptap/extension-table-cell';
import TableHeader from '@tiptap/extension-table-header';
import TableRow from '@tiptap/extension-table-row';
import { TextAlign, TextAlignOptions } from '@tiptap/extension-text-align';
import { CmsPluginNode, CmsBlockPluginNode } from './tiptap_plugins/cms.plugin';
import TiptapToolbar from "./tiptap_plugins/cms.tiptap.toolbar";
Expand All @@ -24,10 +24,10 @@ import CmsBalloonToolbar from "./tiptap_plugins/cms.balloon-toolbar";
import FormExtension from "./tiptap_plugins/cms.formextension";

import { formToHtml, populateForm } from './cms.dialog';
import LinkField from "./cms.linkfield";
import LinkField from './cms.linkfield';

import "../css/cms.tiptap.css";
import "../css/cms.linkfield.css";
import '../css/cms.tiptap.css';
import '../css/cms.linkfield.css';


class CMSTipTapPlugin {
Expand Down Expand Up @@ -122,7 +122,7 @@ class CMSTipTapPlugin {
save_callback: save_callback,
settings: settings,
});
el.addEventListener('blur', ({editor, event}) => {
el.addEventListener('focusout', ({editor, event}) => {
this._blurEditor(editor, event);
});
editor.on('update', ({editor}) => {
Expand Down
8 changes: 6 additions & 2 deletions private/js/tiptap_plugins/cms.styles.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-env es6 */
/* jshint esversion: 6 */
/* eslint-env es11 */
/* jshint esversion: 11 */
/* global document, window, console */


Expand All @@ -8,21 +8,25 @@ import {Mark, mergeAttributes,} from '@tiptap/core';

const _markElement = {
addOptions() {
'use strict';
return {
HTMLAttributes: {},
};
},
parseHTML() {
'use strict';
return [
{
tag: this.name.toLowerCase()
},
];
},
renderHTML({ HTMLAttributes }) {
'use strict';
return [this.name.toLowerCase(), mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
},
addCommands() {
'use strict';
let commands = {};

commands[`set${this.name}`] = () => ({ commands }) => {
Expand Down
2 changes: 1 addition & 1 deletion private/js/tiptap_plugins/cms.tiptap.toolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/* jshint esversion: 6 */
/* global document, window, console */

"use strict";
'use strict';


const TiptapToolbar = {
Expand Down

0 comments on commit 6dd9e50

Please sign in to comment.