There is no way to refresh the composer's preview except by modifying its content

Đang mở
#3,720 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
javascript, php
Lĩnh vực
frontend

Hướng nghiên cứu

Bắt đầu bằng cách đọc EditorDriverInterface và ComposerState, sau đó theo dõi cách bản xem trước của composer được làm mới sau khi nội dung thay đổi. Công việc hoàn tất khi một extension có thể kích hoạt việc làm mới bản xem trước sau một thao tác lọc không đồng bộ mà không sửa đổi nội dung của composer.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

type/extensibility
Current Behavior

TextFormatter does not allow to use asynchronous calls in the Javascript part of a filter, so I need to refresh the preview once the Promise is resolved (see https://github.com/s9e/TextFormatter/issues/208), but there is currently no way to do this in Flarum.

Steps to Reproduce
  1. In an extension, try to refresh the composer preview
  2. There is no way
Expected Behavior

There should be some kind of function, maybe in EditorDriverInterface, or directly in app.composer (ComposerState).

Screenshots

No response

Environment
  • Flarum version: 1.6.2
  • Website URL: localhost
  • Webserver: PBP built-in web server
  • Hosting environment: local
  • PHP version: 8.1.12 (cli) (built: Nov 10 2022 02:42:46) (NTS)
  • Browser: Mozilla Firefox 108.0
Output of php flarum info
Flarum core 1.6.2
PHP version: 8.1.12
MySQL version: 10.6.11-MariaDB-1
Loaded extensions: Core, date, libxml, openssl, pcre, zlib, filter, hash, json, pcntl, Reflection, SPL, session, standard, sodium, mysqlnd, PDO, xml, calendar, ctype, curl, dom, mbstring, FFI, fileinfo, ftp, gd, gettext, iconv, intl, exif, mysqli, pdo_mysql, pdo_sqlite, Phar, posix, readline, shmop, SimpleXML, sockets, sqlite3, sysvmsg, sysvsem, sysvshm, tokenizer, xmlreader, xmlwriter, xsl, Zend OPcache
+-------------------------+-------------------------+------------------------------------------+
| Flarum Extensions       |                         |                                          |
+-------------------------+-------------------------+------------------------------------------+
| ID                      | Version                 | Commit                                   |
+-------------------------+-------------------------+------------------------------------------+
| flarum-flags            | v1.6.1                  |                                          |
| flarum-tags             | v1.6.1                  |                                          |
| flarum-approval         | v1.6.1                  |                                          |
| ianm-syndication        | dev-master              | b65feab8bc3514fe7e83b1b5d5ce4c9ff07b6b48 |
| flarum-suspend          | v1.6.1                  |                                          |
| flarum-subscriptions    | v1.6.1                  |                                          |
| flarum-sticky           | v1.6.1                  |                                          |
| flarum-statistics       | v1.6.1                  |                                          |
| flarum-mentions         | v1.6.1                  |                                          |
| flarum-markdown         | v1.6.1                  |                                          |
| flarum-lock             | v1.6.1                  |                                          |
| flarum-likes            | v1.6.1                  |                                          |
| flarum-lang-french      | v4.4.0                  |                                          |
| flarum-lang-english     | v1.6.0                  |                                          |
| flarum-emoji            | v1.6.1                  |                                          |
| flarum-bbcode           | v1.6.0                  |                                          |
| club-1-cross-references | dev-feat/text-formatter | 294ec30939e1a89239baae02f74c898bcd27fa5c |
+-------------------------+-------------------------+------------------------------------------+
Base URL: http://localhost:8080
Installation path: /home/nicolas/Source/www/flarum
Queue driver: sync
Session driver: file
Mail driver: smtp
Debug mode: ON

Possible Solution

No response

Additional Context

No response

Ngôn ngữ chính
PHP
Star
6.8k
Fork
891
Merge trung bình
1 ngày 10 giờ
Pull request đã merge (30 ngày)
209

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của flarum/framework

Tất cả issue của flarum/framework

Issue tương tự

Thêm issue về PHP

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.