markdown-text-editor 0.1.3 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "markdown-text-editor",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "description": "A simple JavaScript Markdown editor plugin with real-time preview, and easy integration.",
5
5
  "main": "./dist/markdown-text-editor.js",
6
6
  "browser": "dist/markdown-text-editor.js",
@@ -27,8 +27,10 @@
27
27
  "markdown",
28
28
  "mde",
29
29
  "markdown js library",
30
+ "markdown js plugin",
30
31
  "editor",
31
32
  "markdown editor",
33
+ "Simple Markdown editor js plugin",
32
34
  "text editor",
33
35
  "markdown preview",
34
36
  "markdown syntax",
@@ -36,10 +38,17 @@
36
38
  "rich text editor",
37
39
  "wysiwyg",
38
40
  "markdown formatting",
41
+ "tailwindcss",
39
42
  "code editor",
40
43
  "editor plugin",
41
44
  "text formatting",
42
- "markdown-text-editor"
45
+ "markdown-text-editor",
46
+ "Tailwind css markdown editor",
47
+ "Tailwind css markdown",
48
+ "WYSIWYG-style markdown editor",
49
+ "Simple Markdown",
50
+ "Responsive markdown js editor",
51
+ "RTL Support markdown editor"
43
52
  ],
44
53
  "author": "Nezanuha",
45
54
  "license": "MIT",
@@ -48,15 +57,14 @@
48
57
  "url": "https://github.com/nezanuha/markdown-text-editor/issues"
49
58
  },
50
59
  "dependencies": {
51
- "@tailwindcss/typography": "~0.5.15",
52
- "marked": "~15.0.4",
53
- "tailwindcss": "~3.4.13"
60
+ "marked": "~15.0.7"
54
61
  },
55
62
  "devDependencies": {
56
63
  "@babel/core": "^7.25.2",
57
64
  "@babel/preset-env": "^7.25.4",
58
- "autoprefixer": "^10.4.20",
59
- "babel-loader": "^9.2.1",
65
+ "@tailwindcss/postcss": "^4.0.9",
66
+ "@tailwindcss/typography": "^0.5.15",
67
+ "babel-loader": "^10.0.0",
60
68
  "css-loader": "^7.1.2",
61
69
  "cssnano": "^7.0.6",
62
70
  "html-webpack-plugin": "^5.6.3",
@@ -65,6 +73,7 @@
65
73
  "postcss-loader": "^8.1.1",
66
74
  "rimraf": "^6.0.1",
67
75
  "style-loader": "^4.0.0",
76
+ "tailwindcss": "^4.0.9",
68
77
  "terser-webpack-plugin": "^5.3.11",
69
78
  "webpack": "^5.95.0",
70
79
  "webpack-cli": "^6.0.1",
@@ -13,7 +13,7 @@ class MakeTool {
13
13
  button.innerHTML = iconHtml; // Pass icon HTML from child classes
14
14
  button.type = 'button';
15
15
  button.title = this.title;
16
- button.className = `markdown-btn ${buttonClass}${buttonClass == 'preview-btn' ? ' sticky right-0 bg-stone-100 dark:bg-stone-900 ' : ' ' }p-2 hover:bg-stone-200 dark:hover:bg-stone-600 rounded duration-300 text-stone-900 dark:text-stone-100`;
16
+ button.className = `markdown-btn ${buttonClass}${buttonClass == 'preview-btn' ? ' sticky right-0 bg-stone-100 dark:bg-stone-900 ' : ' ' }p-2 hover:bg-stone-200 dark:hover:bg-stone-600 rounded-sm duration-300 text-stone-900 dark:text-stone-100`;
17
17
  button.addEventListener('click', () => this.applySyntax()); // Default to 'both', can change in child
18
18
  return button;
19
19
  }
@@ -34,7 +34,7 @@ class PreviewTool extends MakeTool {
34
34
  editorDiv.parentNode.classList.toggle('top-0');
35
35
  editorDiv.parentNode.classList.toggle('inset-x-0');
36
36
  editorDiv.parentNode.classList.toggle('rounded-md');
37
- editorDiv.parentNode.classList.toggle('z-[999]');
37
+ editorDiv.parentNode.classList.toggle('z-999');
38
38
 
39
39
  previewWrapper.classList.toggle('hidden');
40
40
 
@@ -43,7 +43,7 @@ class PreviewTool extends MakeTool {
43
43
  'md:grid',
44
44
  'md:grid-cols-2',
45
45
  'md:divide-x',
46
- 'rtl:md:divide-x-reverse',
46
+ 'md:rtl:divide-x-reverse',
47
47
  'md:divide-stone-300',
48
48
  'dark:md:divide-stone-700'
49
49
  );
@@ -55,7 +55,7 @@ class PreviewTool extends MakeTool {
55
55
  );
56
56
  this.editor.render(); // Re-render content in the preview
57
57
 
58
- editorDiv.querySelector(".textarea-wrapper").querySelector("textarea").classList.remove("!h-[90lvh]");
58
+ editorDiv.querySelector(".textarea-wrapper").querySelector("textarea").classList.remove("h-[90lvh]!");
59
59
 
60
60
  document.querySelector("body").classList.remove('overflow-hidden');
61
61
 
@@ -75,7 +75,7 @@ class PreviewTool extends MakeTool {
75
75
  editorDiv.parentNode.classList.toggle('top-0');
76
76
  editorDiv.parentNode.classList.toggle('inset-x-0');
77
77
  editorDiv.parentNode.classList.toggle('rounded-md');
78
- editorDiv.parentNode.classList.toggle('z-[999]');
78
+ editorDiv.parentNode.classList.toggle('z-999');
79
79
 
80
80
  previewWrapper.classList.toggle('hidden');
81
81
  // Remove grid layout and divide classes from the editor div
@@ -83,7 +83,7 @@ class PreviewTool extends MakeTool {
83
83
  'md:grid',
84
84
  'md:grid-cols-2',
85
85
  'md:divide-x',
86
- 'rtl:md:divide-x-reverse',
86
+ 'md:rtl:divide-x-reverse',
87
87
  'md:divide-stone-300',
88
88
  'dark:md:divide-stone-700'
89
89
  );
@@ -93,7 +93,7 @@ class PreviewTool extends MakeTool {
93
93
  'hidden',
94
94
  'md:block'
95
95
  );
96
- editorDiv.querySelector(".textarea-wrapper").querySelector("textarea").classList.add("!h-[90lvh]");
96
+ editorDiv.querySelector(".textarea-wrapper").querySelector("textarea").classList.add("h-[90lvh]!");
97
97
 
98
98
  document.querySelector("body").classList.add('overflow-hidden');
99
99
 
@@ -4,7 +4,7 @@ class Preview {
4
4
  this.previewContainer = document.createElement('div');
5
5
  this.previewContainer.className = 'preview-wrapper bg-white dark:bg-stone-800 p-2 hidden';
6
6
  this.previewContent = document.createElement('div');
7
- this.previewContent.className = 'preview-content prose prose-sm md:prose-base dark:prose-invert p-1.5 overflow-y-auto h-[90lvh] max-w-max';
7
+ this.previewContent.className = 'preview-content prose prose-sm md:prose-base dark:prose-invert p-1.5 overflow-y-auto h-[90lvh] max-w-full';
8
8
  this.previewContainer.appendChild(this.previewContent);
9
9
  container.appendChild(this.previewContainer);
10
10
  }
@@ -1,3 +1,21 @@
1
- @tailwind base;
2
- @tailwind components;
3
- @tailwind utilities;
1
+ @import 'tailwindcss';
2
+
3
+ @plugin '@tailwindcss/typography';
4
+
5
+ /*
6
+ The default border color has changed to `currentColor` in Tailwind CSS v4,
7
+ so we've added these compatibility styles to make sure everything still
8
+ looks the same as it did with Tailwind CSS v3.
9
+
10
+ If we ever want to remove these styles, we need to add an explicit border
11
+ color utility to any element that depends on these defaults.
12
+ */
13
+ @layer base {
14
+ *,
15
+ ::after,
16
+ ::before,
17
+ ::backdrop,
18
+ ::file-selector-button {
19
+ border-color: var(--color-gray-200, currentColor);
20
+ }
21
+ }