@font-face { font-family:'customfont'; src: url('data:application/octet-stream;charset=utf-8;base64 ...
.tc-tiddler-frame input.tc-edit-texteditor,
.tc-tiddler-frame textarea.tc-edit-texteditor,
.tc-tiddler-frame iframe.tc-edit-texteditor {
padding: 3px 3px 3px 3px;
border: 1px solid <<colour tiddler-editor-border>>;
background-color: <<colour tiddler-editor-background>>;
line-height: 1.3em;
-webkit-appearance: none;
font-family: {{$:/themes/tiddlywiki/vanilla/settings/editorfontfamily}};
}
Actually, I can't use the hotkeys when I disable the bar. Is there a way around this?
Also, is there a way to extra just the directory tree functionality from your left+top bar plugin? I want a site navigation tool with a tree structure.
On 28 Jan 2018, at 19:06, Ton Gerner <ton.g...@gmail.com> wrote:To be honest I do not have an explanation why it does not work with the iframe editor.
Maybe someone else can help you.
The reason that custom fonts doesn’t work with the editor toolbar is because of the way that it creates the textarea element within an embedded iframe (this is done so that the selection in the textarea isn’t lost when the user clicks on a toolbar button and the textarea loses focus).The iframe doesn’t inherit any of the styles in the main document, so the code actually creates a hidden textarea and then reads back the styles, and then applies them to the textarea in the iframe. That means that any formatting applied to the textarea will be faithfully reproduced within the iframe. However, it only works for CSS properties applied directly to the textarea; it doesn’t transfer fonts, animations or other resources that can be defined in CSS.
We could update things so that special stylesheets identified by a new system tag such as $:/tags/Stylesheet/FramedEditor would be automatically inserted within the iframe.
\define register-font(family,title,style,weight)
@font-face {
font-family: "$family$";
font-style: $style$;
font-weight: $weight$;
src: url(<<datauri "$title$">>) format("woff");
}
\end
\rules only filteredtranscludeinline transcludeinline macrodef macrocallinline
/*
** Fonts
*/
<<register-font "Lato" "$:/_fonts/lato-black-webfont.woff" "normal" "900">>
<<register-font "Lato" "$:/_fonts/lato-blackitalic-webfont.woff" "italic" "900">>
<<register-font "Lato" "$:/_fonts/lato-bold-webfont.woff" "normal" "700">>
<<register-font "Lato" "$:/_fonts/lato-bolditalic-webfont.woff" "italic" "700">>
<<register-font "Lato" "$:/_fonts/lato-hairline-webfont.woff" "normal" "100">>
<<register-font "Lato" "$:/_fonts/lato-hairlineitalic-webfont.woff" "italic" "100">>
<<register-font "Lato" "$:/_fonts/lato-italic-webfont.woff" "italic" "400">>
<<register-font "Lato" "$:/_fonts/lato-light-webfont.woff" "normal" "300">>
<<register-font "Lato" "$:/_fonts/lato-lightitalic-webfont.woff" "italic" "300">>
<<register-font "Lato" "$:/_fonts/lato-regular-webfont.woff" "normal" "400">>
thank you Charlie and Jeremy! yes: mine is a font-face.
the problem is: I love fonts! I use different fonts for different wiki, they embody the "soul" of the wiki (and I'd like to have the same font whether desktop or mobile, viewing or editing). that's why until now i used the edit widget for editing. but this means: no toolbar, and it can be annoying, especially on mobile.
anyhow: thanks again for this priceless tool!
m.
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/8d9cfc25-648b-47a9-94c4-0c76e4cb2f4an%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/ef4285b2-9217-4c82-88b6-f93e01c44a23n%40googlegroups.com.