mirror of
https://github.com/anyproto/anytype-ts.git
synced 2025-06-09 09:35:02 +09:00
github gist embed url
This commit is contained in:
parent
fe49c64521
commit
27b2e11219
4 changed files with 6 additions and 3 deletions
4
dist/embed/iframe.html
vendored
4
dist/embed/iframe.html
vendored
|
@ -21,7 +21,9 @@
|
|||
iframe { margin: 0px !important; display: inline-block !important; }
|
||||
|
||||
.twitter-tweet, .instagram-media { margin: 0px !important; display: inline-flex !important; }
|
||||
.gist-file { margin: 0px !important; }
|
||||
.gist-file { margin: 0px 0px 16px 0px !important; }
|
||||
.gist-file:last-child { margin-bottom: 0px !important; }
|
||||
|
||||
.cp_embed_iframe { border: 0px !important; height: auto; aspect-ratio: 16/9; }
|
||||
|
||||
html.align1 .twitter-tweet, body.align1 .instagram-media { justify-content: center; }
|
||||
|
|
|
@ -69,7 +69,7 @@ const ViewCalendar = observer(class ViewCalendar extends React.Component<I.ViewC
|
|||
|
||||
<div className="side right">
|
||||
<Icon className="arrow left" onClick={() => this.onArrow(-1)} />
|
||||
<div className="btn" onClick={this.onToday}>{translate('menuCalendarToday')}</div>
|
||||
<div className="btn" onClick={this.onToday}>{translate('commonToday')}</div>
|
||||
<Icon className="arrow right" onClick={() => this.onArrow(1)} />
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -644,7 +644,7 @@ const BlockEmbed = observer(class BlockEmbed extends React.Component<I.BlockComp
|
|||
};
|
||||
|
||||
if (block.isEmbedGithubGist()) {
|
||||
allowScript = !!text.match(/src="https:\/\/gist.github.com([^"]+)"/);
|
||||
allowScript = !!text.match(/(?:src=")?(https:\/\/gist.github.com(?:[^"]+))"?/);
|
||||
};
|
||||
|
||||
if (block.isEmbedSketchfab() && text.match(/<(iframe|script)/)) {
|
||||
|
|
|
@ -12,6 +12,7 @@ DOMAINS[I.EmbedProcessor.Telegram] = [ 't.me' ];
|
|||
DOMAINS[I.EmbedProcessor.Codepen] = [ 'codepen.io' ];
|
||||
DOMAINS[I.EmbedProcessor.Bilibili] = [ 'bilibili.com', 'b23.tv'];
|
||||
DOMAINS[I.EmbedProcessor.Kroki] = [ 'kroki.io' ];
|
||||
DOMAINS[I.EmbedProcessor.GithubGist] = [ 'gist.github.com' ];
|
||||
|
||||
const IFRAME_PARAM = 'frameborder="0" scrolling="no" allowfullscreen';
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue