Closed aaronduce closed 3 years ago
You need to manually import the CSS, this is correct.
Can you provide screenshots of the problem with the preview you are experiencing?
Any errors in your console?
None
Very strange, it removed all the markdown syntax but does not render the HTML correctly, try to make sure webpack doesn't remove any vital code from the package like marked
.
If you put a normal h1 element outside the editor, does that render correctly?
Yes the normal h1 has no issues - i will try checking webpack as soon as i can
Re my previous message: normal h1 doesnt work actually. Seems that tailwind overwrites the original styling. I will look into this but seems to conflict.
The preview window relies on the standard browser styling of elements, combined with whatever marked
adds.
Sorted - it seems if you are using Tailwind, it conflicts as default styling is overridden in favour of utility classes.
To get around this, you would need to:
npm install @tailwindcss/typography
tailwind.config.js
file:
plugins: [
require('@tailwindcss/forms'),
require('@tailwindcss/line-clamp'),
require('@tailwindcss/typography'),
],
<article class="prose max-w-none">
<!-- textarea..... -->
</article>
Describe your question Please describe your question in as much detail as possible.
Using webpack to bundle all my js and packages. Have to include css manually otherwise it is not working on the page. Also the preview is not working after all is imported? Am I doing something wrong or is there another prerequisite I don't have?
admin.js
dependencies