Artifacts Gallery Guilds Search Wiki Login Register

Welcome, Guest. Please login or register. - Thinking of joining?
a Summer day - @769.44 (what is this?)
Activity rating: Four Stars Posts & Arts: 94/1k.beats Random | Recent Posts | Guild Recents
News: ozwomp is requesting your location :ozwomp: [Agree] Guild Events: Happy Pride Month Fibre Artists!

+  MelonLand Forum
|-+  Life & The Web
| |-+  ✁ ∙ Web Crafting
| | |-+  ☔︎ ∙ I need Help!
| | | |-+  KATE editor - how to get document preview working?


« previous next »
Pages: [1] Print Embed
Author Topic: KATE editor - how to get document preview working?  (Read 45 times)
fairyrune
Full Member ⚓︎
***
View Profile WWWArt


we live to make the impossible possible!
⛺︎ My Room
iMood: fairyrune
Matrix: Chat!

Guild Memberships:
Artifacts:
Dino FossilJoined 2025!
« on: a Summer day » Embed

hello everyone!

i'm having issues with the kate editor on linux. i wanted something else aside from phoenix code as they've introduced AI-as-default (kate has AI plugins but they're not installed by default, so it's less offensive to me) and it seems to work well apart from... the document preview plugin.

this is supposed to be a live preview of the document you're editing, but all mine says is "no preview available". i'm just previewing a regular ol HTML file, but nothing...! is there anything i need to do to fix this? i can't find anything online at all...
  :ozwomp:
Logged

☾ "you want to run - i'll run with you" ☼
https://files.catbox.moe/ivdca8.gifhttps://files.catbox.moe/qlgdtd.gifhttps://files.catbox.moe/ji1nvt.gifhttps://files.catbox.moe/9ypmrn.gifhttps://files.catbox.moe/3im96c.gif
ThunderPerfectWitchcraft
Hero Member ⚓︎
*****
View Profile WWWArt


Here be dragons
⛺︎ My Room

Artifacts:
I got robbed by Dan Q on Melonland!Great Posts PacmanThanks for being rad!First 1000 Members!Joined 2023!
« Reply #1 on: a Summer day » Embed

Are you using KDE? (If not, this could be the issue - Kate is very interwoven with KDE, and things might not work out on other DEs). You'd need quite some luck to find somebody here who knows enough about Kate to help you with this, I'm afraid - while it is possible, I'd recommend to get in touch with the Kate support channels.

A text editor that I can recommend a lot is Geany, although this is not what you asked for :).
Logged


Artifact Swap: Spell: Rain Storm (makes the player who holds this immune to fire magic)
Dan Q
Hero Member ⚓︎
*****
View Profile WWWArt


I have no idea what I am doing
⛺︎ My Room
RSS: RSS

Guild Memberships:
Artifacts:
Dan Q Cruisin'I DIDN'T meet Dan Q on Melonland!
« Reply #2 on: a Summer day » Embed

Doesn't work for me either...

I tried this myself and got the same result. I installed Kate and the Document Preview plugin, and discovered that while a Markdown (.md) file was correctly previewed, a HTML (.html) file wasn't.

My understanding is that the Document Preview plugin doesn't come with HTML support. It needs a plugin itself to do this. Apparently...


Quote
For the display the plugin uses that KParts plugin which is currently selected as the preferred one for the MIME type of the document. If there is no KParts plugin for that type, no preview is possible.

So it looks like you need a "KParts plugin" for HTML support.

It's probably that this is integrated with KDE and/or the Konquerer browser. So if you're not using those then it might be difficult or impossible.

I don't know whether such a thing exists or where you'd get it from. But my gut feeling is that this isn't the best way to achieve what you're looking for anyway: I imagine that the HTML preview won't be very good: e.g. it won't support some modern CSS and HTML features (it's hard for the browser manufacturers to keep up, let alone people writing underused editor plugins!) and won't display things quite "like" your browser does.

But maybe an approach like this would work for you...?

If you want live reloading previews... there are tools for that! I just did this (there are lots of other approaches too!):

1. Opened Kate (to edit my HTML files) and my browser, and laid them out side-by-side on my screen.
2. Installed simple-autoreload-server by running npm install simple-autoreload-server (I already have Node installed).
3. In a terminal/prompt, navigated to the directory containing my files and ran simple-autoreload-server
4. Pointed my web browser at http://localhost:8080/

Now, every time I save my HTML file or any other file in the same directory, like images, CSS, JS or whatever then my browser auto-refreshes:



Not only does my approach provide live-reloading as you work, it:

- uses your actual web browser so it renders more like-you'd-expect and provides debugging tools if you want them
- runs over http:// so some kinds of JavaScript work that wouldn't otherwise, and relative URLs work "as you'd expect" when you'd upload to the web
- automatically reloads on any change in the directory, so you can modify your CSS file(s) and it'll reload the pages too!

So yeah: that's how I'd do what I think you're trying to achieve. I think Kate's preview is probably a non-starter.
Logged

https://danq.me/_q26t/badges/dan-q-88x31-lighter.gif https://danq.me/_q26t/badges/dan-q-88x31-peekaboo-scroller.gif https://beige-buttons.danq.dev/beige-buttons-88x31.gif https://embed-html.danq.dev/embed-html-88x31.gif

Artifact Swap: I met Dan Q on Melonland!Polyamorousradio polyDoctor RedactedJoined 2025!
fairyrune
Full Member ⚓︎
***
View Profile WWWArt


we live to make the impossible possible!
⛺︎ My Room
iMood: fairyrune
Matrix: Chat!

Guild Memberships:
Artifacts:
Dino FossilJoined 2025!
« Reply #3 on: a Summer day » Embed

@ThunderPerfectWitchcraft  - honestly it seems that it's not widely used!

what do you specifically like about geany, in any case? i don't think for my purposes, the actual environment matters too much; so long as it lets me edit multiple things at once and view a file tree i'll be okay. i do have geany installed; maybe i'll play with it.

@Dan Q - ahh, this is what phoenix code does for you. if i pop out the preview, it opens in a browser just like that, but i didn't know what to call it! that should work a lot better. so thank you for the walkthrough, appreciate it!



Logged

☾ "you want to run - i'll run with you" ☼
https://files.catbox.moe/ivdca8.gifhttps://files.catbox.moe/qlgdtd.gifhttps://files.catbox.moe/ji1nvt.gifhttps://files.catbox.moe/9ypmrn.gifhttps://files.catbox.moe/3im96c.gif
ThunderPerfectWitchcraft
Hero Member ⚓︎
*****
View Profile WWWArt


Here be dragons
⛺︎ My Room

Artifacts:
I got robbed by Dan Q on Melonland!Great Posts PacmanThanks for being rad!First 1000 Members!Joined 2023!
« Reply #4 on: a Summer day » Embed

what do you specifically like about geany, in any case? i don't think for my purposes, the actual environment matters too much; so long as it lets me edit multiple things at once and view a file tree i'll be okay. i do have geany installed; maybe i'll play with it.

I like about Geany that it is lightweight, stable, and functional :). I use it as a development editor and general text editor for at least a decade, and it never failed me. Also, the whole stuff that puts you off (AI inclusion, etc.) shouldn't occur with it. I believe that it should be also possible to include a thing like what Dan Q has proposed for Kate with it (When i said that it is unlikely that you find somebody who can help you with specific problems in context of rather esoteric software, I reckoned without the Dan Q ;)).
Logged


Artifact Swap: Spell: Rain Storm (makes the player who holds this immune to fire magic)
Pages: [1] Print Embed 
« previous next »
 

Melonking.Net © Always and ever was! SMF 2.0.19 | SMF © 2021 | Privacy Notice | Send Feedback | Supporters ♥ Forum Guide | Rules | RSS | WAP | Mobile


MelonLand Badges and Other Melon Sites!

MelonLand Project! Visit the MelonLand Forum! Support the Forum
Visit Melonking.Net! Visit the Gif Gallery! Pixel Sea TamaNOTchi
MelonLand @000

Minecraft: Online
Join: craft.melonking.net