mirror of
https://github.com/flarum/framework.git
synced 2025-02-21 04:31:57 +08:00
Fix live preview
This commit is contained in:
parent
78050e8c4e
commit
8d67e6dcf5
@ -70,3 +70,5 @@ app.initializers.add('flarum-mentions', function() {
|
||||
// Remove post mentions when rendering post previews.
|
||||
getPlainContent.removeSelectors.push('a.PostMention');
|
||||
});
|
||||
|
||||
export * from './utils/textFormatter';
|
||||
|
@ -65,7 +65,7 @@ class FormatPostMentions
|
||||
|
||||
$tag->filterChain
|
||||
->prepend([static::class, 'addId'])
|
||||
->setJS('function(tag) { return System.get("flarum/mentions/utils/textFormatter").filterPostMentions(tag); }');
|
||||
->setJS('function(tag) { return flarum.extensions["flarum-mentions"].filterPostMentions(tag); }');
|
||||
|
||||
$configurator->Preg->match('/\B@(?<username>[a-z0-9_-]+)#(?<id>\d+)/i', $tagName);
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ class FormatUserMentions
|
||||
|
||||
$tag->template = '<a href="{$PROFILE_URL}{@username}" class="UserMention">@<xsl:value-of select="@displayname"/></a>';
|
||||
$tag->filterChain->prepend([static::class, 'addId'])
|
||||
->setJS('function(tag) { return System.get("flarum/mentions/utils/textFormatter").filterUserMentions(tag); }');
|
||||
->setJS('function(tag) { return flarum.extensions["flarum-mentions"].filterUserMentions(tag); }');
|
||||
|
||||
$configurator->Preg->match('/\B@(?<username>[a-z0-9_-]+)(?!#)/i', $tagName);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user