Comments (2)
It's not clear to me what it is you're trying to do or why you need an async call in the filter. I don't consider this a bug at the moment, it seems more like feature.
Can you please explain your use case.
from framework.
I don't consider this a bug at the moment, it seems more like feature.
Sorry you're right, this is not exactly a bug request. But as it was a technical request for the extension API, the bug tracker seemed more adequate.
It's not clear to me what it is you're trying to do or why you need an async call in the filter.
Can you please explain your use case.
I am writing an extension that modifies the content of CommentPosts. Among other features, it replaces bare links to discussions into a link that contains the title of the discussion. For now this is done in the frontend.
To make the modifications in the backend instead, and to get a preview of the modifications while writing a post, I figured that I needed to add a TextFormatter configuration (club-1/flarum-ext-cross-references#4).
As explained in s9e/TextFormatter#208, I need to make an asynchronous call in the Javascript part of the filter, in order to fetch the title of the discussion from the API (using app.store.find()
). But TextFormatter filters only works synchronously, so I was pointed to refreshing the preview once the Promise resolves.
This is indeed working, as I tried to modify the content of the composer using app.composer.editor.insertAt()
to trigger a refresh. But I would need to refresh the preview without editing the content of the composer.
From what I see here (ligne 40) there seem to be no way to trigger a refresh with an unchanged content:
from framework.
Related Issues (20)
- `DiscussionTaggedPost` might show "deleted" when tag is secondary
- Forum not working in IE11 HOT 1
- Provide a ForumPage (or something like that) that contains the sidebar can inherit from HOT 7
- bug happens when replying again HOT 1
- Search drivers HOT 2
- typo in js part of sticky plugin HOT 5
- Missing Component Exports
- DispatchEventsTrait causes error when event does not have "actor" attribute due to PHP 8.2 deprecation HOT 4
- Setting permissions on mobile does not display correctly on mobile
- PostRepository::getIndexForNumber() walks 2 time the posts table to get offset HOT 6
- Code blocks are hard to read in dark mode HOT 2
- [1.x] `Conditional` extender instantiates the extenders array even when the conditional is false
- Support Invokable Classes in Console Extender's schedule method
- Akismet False Positives Triggered by Flag Removal
- Empty settings don't return default values HOT 13
- Content max limit is incorrect HOT 2
- [2.x] `LogoutController` permits open redirects
- Height of Modals on Mobile Inconsistent
- fttb slow response time
- Invisible buttons when making primary color #ffffff
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 framework.