background
At the beginning, the team was limited by the integration problem of formula editor, and finally adopted UEditor developed by Baidu, which integrates the formula editor plug-in – Kityformula – Editor well. In the current version, the basic function of formula input and output is well supported. With subsequent iterations, in order to conform to the interaction style and function design of the product, the team carried out secondary encapsulation of kityformula-Editor, and finally realized the effect of formula soft keyboard on the Web and Android ends.
features
A, visual
Visually, it tends to have a soft keyboard style. The web side is designed as a pop-up window, while the Android side is designed more like a native keyboard. Android and Web visual styles are supported by default.
Second, the configuration
By default, the device, protocol, and width configurations are passed in through the QUERY of the URL.
Device: Supports style switching between Web and Android
Protocol: Supports iframe, WebView, and Document Custom Event by default. If you want to expand other communication protocols, you can see the files in SRC/Editor /Message to customize the protocols.
The formula soft keyboard supports equal scaling. The default container width is window.innerWidth, which you can limit if you want to customize the width.
Three, functionality,
- Support on and off
- Support common mathematical symbols, English letters and other functions
- Data is exported in Base64 format
Results the preview
The source address
Github.com/SugarTurboS…