Comments (12)
b6262ae
I'm closing this issue. Fell free to reopen it.
from unreel.
Near the end of the demo you have a slide with code syntax highlight. Is that what you need?
On edit mode:
Formats > Blocks > Pre followed by Formats > Inline > Code
from unreel.
Yeah, but I don't see any option to change language (for highlighting)
from unreel.
That should be automatic. It uses highlight.js, where you can read:
174 languages and 77 styles
automatic language detection
multi-language code highlighting
and a lot of other good stuff.
You really have to finish editing to see how it looks.
from unreel.
I don't know how many lines I have to write to get highlighting works but sometime I just want to write a short code. Furthermore, I don't think auto language detection is good enough, user should be able to choose language.
from unreel.
You aren't doing it right!
Code must be inside <pre><code> tags. With
you get
Automatic detection may fail. You can choose a language by adding a class to code tag, like this
<pre><code class="javascript">
var car = {type:"Fiat", model:"500", color:"white"};
document.getElementById("demo").innerHTML = car.type;
</code></pre>
The language list is here.
Before you ask, there's no way to change highlight style.
from unreel.
Is there any way to insert code without opening 'Source Code' dialog? Unreel is not a text editor (like Vim, Sublime, Atom, etc.), it should not ask user to do so.
from unreel.
Yes. Do
and write or paste the code.
You can go to Source Code to choose the language.
Source Code should be used for special formating, and sometimes to clean the HTML mess you can do without knowing (HTML can be really messy
from unreel.
Thanks.
Still, this is tricky. I guess very few people know this.
Can you just add one menu option (Formats > Blocks > Code)?
from unreel.
I could, but I'm a purist: 1 option -> 1 format.
<pre> and <code> can stand on their own and be useful to someone...
from unreel.
If "pure" means 1 option for 1 html tag, this makes sense
But if 1 option was meant to be 1 visual element, Format > Inline/Block > Code is make symetry
from unreel.
- We don't have to agree, just to understand each other.
- I get your idea, but for now I'm not gonna change formats menu. The one place I wouldn't mind to add a "Syntax Highlight Code Block" would be at "Templates", where you can find other "complex" structures.
- Those 1% that will use syntax highlight like you and me can understand these concepts better than the other 99% that don't need to show their code. After all, syntax highlight is a great "bonus", but seldom used.
- Most important: YOU know how to do it.
- Thank you for using Unreel.
from unreel.
Related Issues (8)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from unreel.