chuangcaleb / obsidian-fountain-editor Goto Github PK
View Code? Open in Web Editor NEWObsidian plugin for formatting Fountain screenplay syntax in the editor
Home Page: https://obsidian.md/plugins?id=fountain-editor
License: MIT License
Obsidian plugin for formatting Fountain screenplay syntax in the editor
Home Page: https://obsidian.md/plugins?id=fountain-editor
License: MIT License
When iterating thorough line-by-line,
if the first line is a triple-hyphen frontmatter opening,
then skip parsing until we hit the next triple-hyphen
Steps to reproduce the behavior:
Setting, if live margins, to display: none
for whitespace characters
If a characher has an accent in their name, it is not detected as a character.
If a character's name is written in cap locks, but contains an accent (ex: ÉTIENNE), it will not be centered as well as the subsequent dialogue.
write :
ÉTIENNE
Hello, my name is Étienne.
and you will see the problem.
v1.1.1
v1.5.3
In the sample image on the GitHub page, the "regular" markdown text (not fountain syntax) is shown in default font while the fountain text is in courier.
In my file, all body text is rendered in courier.
Expect body text that is not fountain syntax to be rendered in default font.
no special steps needed.
No response
No response
Describe the task
Preprocess CSS stylesheets for dx
Actually we don't need to have a full build pipeline for js since we already are using esbuild.
Blockers
Expected behavior
To build and attach the binaries on each new tag created.
Probably create with GitHub Actions?
Configuration setting for left-aligned or live margins (borrowing the term from Highland 2)
In Live Preview, when inactiv-ating a line with a certain type of embed, the Fountain formatting stops working. There seems to be no way to bring the formatting back, until you close and reopen the note.
Embed types that don't break
Embed types that break:
When opening the file again, formatting works — but when making that embed line active and then inactive again, formatting breaks.
The Fountain-formatting should persist in a fountain-configured note, no matter what the text content may be
cssclasses: fountain
to a notev1.1.1
v1.4.16
Turn Fountain page breaks into hr's.
However, Obsidian's Codemirror extension does some funny things to replace the hr with a Decoration.widget completely. Let's try to hook into their existing logic, rather than coding a brand new one from scratch.
Dual Dialogue in Live Preview
There are Conflicts between Obsidian-flavored Markdown vs Fountain.
For the > Centred Text <
and > Forced Transition
Fountain token, Obsidian's standard blockquote token is still detected (since it is a >
character that starts a line) and so there are unwanted/conflicting HTML classes being applied (these being cm-formatting-quote cm-formatting-quote-1 cm-quote cm-quote-1
as seen in the screenshot below).
Then Fountain's _Underlined Text_
and /* Boneyard */
tokens conflict with Obsidian's native _Italicised Text_
and * Leading-Asterisk Italicised Text
formatting tokens.
There are at least two ways to solve this:
This is the strategy used for this plugin so far: Obsidian-Fountain-Editor is a superset of Obsidian-flavoured Markdown, so we just add styles on top of existing markdown styles. This is good, because we don't need to reinvent inline boldface, section headings, etc. so it makes sense to continue with this
But when it comes to conflicts where we want Obsidian's regular Markdown to be suppressed (like asterisk italicising), we will have to undo those applied HTML classes.
This may be a lot of funky coding with CodeMirror (which is really complex) and may leave a problematically-HTML-structured CodeMirror document (think weird excessive nested span
elements)
The other option is to modify the standard markdown processor to prevent triggering certain markdown styles like underscore-italicising, so that our plugin can swoop in and cleanly format underscore-wrapped-text as underlined text.
This is definitely trickier as I don't know of a way to disable core behaviour, much less disable it only for particular documents (remember, other notes should get Obsidian's native markdown formatting as normal). And they probably use some lesser-known efficient low-level parser (like Lezer) (I'm using simple regex!) that may also be locked behind closed-source.
But this definitely is the superior long-term strategy, since (1) it makes for a cleaner HTML DOM, which means cleaner CSS targeting (2) finer-tuned CodeMirror control; especially if there's an API to easily + directly style certain tokens, then that also instantly fixes #11.
Handle styling for mobile. Make sure utility classes fountain-left and fountain-center don't affect using :not(is-mobile).
Write documentation for details and tips using Fountain with the Longform plugin.
Within actions and Dialogue in fountain one can write inline notes using the same syntax that obsidian uses for links (see https://fountain.io/syntax/#notes). I use this a lot in my fountain files. I just tried renaming one of them to .md
adding the property and opening it in obsidian. This mostly works great but all notes become links, which is undesirable imho.
I would expect notes to be rendered in a different font than normal but more indicative of a comment/note than of a link and of course to not create a note when clicked (indeed it should not be a click target).
Ideally the same syntax within a synopsis should indeed produce a link as usual.
1.1.4
1.5.12
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.