WO2017166755A1 - 富文本监听方法、装置和电子设备 - Google Patents

富文本监听方法、装置和电子设备 Download PDF

Info

Publication number
WO2017166755A1
WO2017166755A1 PCT/CN2016/100268 CN2016100268W WO2017166755A1 WO 2017166755 A1 WO2017166755 A1 WO 2017166755A1 CN 2016100268 W CN2016100268 W CN 2016100268W WO 2017166755 A1 WO2017166755 A1 WO 2017166755A1
Authority
WO
WIPO (PCT)
Prior art keywords
rich text
change
callback interface
rich
text
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2016/100268
Other languages
English (en)
French (fr)
Inventor
李树鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Le Holdings Beijing Co Ltd
Lemobile Information Technology (Beijing) Co Ltd
Original Assignee
Le Holdings Beijing Co Ltd
Lemobile Information Technology (Beijing) Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Le Holdings Beijing Co Ltd, Lemobile Information Technology (Beijing) Co Ltd filed Critical Le Holdings Beijing Co Ltd
Publication of WO2017166755A1 publication Critical patent/WO2017166755A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting

Definitions

  • the present application relates to the field of computer mobile terminal technologies, and in particular, to a rich text monitoring method, apparatus, and electronic device.
  • the listener in the text editor can play two roles.
  • One of the functions is that the text editor such as the sticky note can automatically save the text when listening to the text change without the user. Manually save after each change; another function is to remind the user that the text has been changed when the text change is monitored, so as to avoid the loss of the content recorded in the text editor such as the note due to the user's misoperation.
  • the technical problem to be solved by the present application is that the existing solution can only perform the plain text of the mobile terminal. Listening, but the rich text file of the mobile terminal is difficult to monitor.
  • the embodiment of the present application provides a rich text listening method, including: setting a total callback interface for a rich text editor; and setting a listener for each object frame in the rich text editor to listen to the Changes in objects in the object frame; feedback of the monitored changes to the total callback interface; and changes in the rich text obtained by the total callback interface.
  • the object is text, picture, audio or video.
  • the rich text editor is a note.
  • the rich text monitoring method of the embodiment of the present application preferably, after the obtaining, by the rich callback method, the change that occurs in the rich text by the total callback interface, the method further includes: notifying the rich text editor to save Rich text before change and rich text after change.
  • the method further includes: reminding the user that the current rich text has changed. .
  • the embodiment of the present application further provides a rich text monitoring device, including: an interface setting unit, configured to set a total callback interface to a rich text editor; and a monitoring setting unit, configured to be used in the rich text editor
  • a rich text monitoring device including: an interface setting unit, configured to set a total callback interface to a rich text editor; and a monitoring setting unit, configured to be used in the rich text editor
  • Each object frame separately sets a listener to monitor a change of the object in each object frame; a feedback unit is configured to feed back the monitored change to the total callback interface; and an acquisition unit is configured to pass the total callback
  • the interface takes changes to the rich text.
  • the object is text, picture, audio or video.
  • the rich text editor is a note.
  • the rich text monitoring device further includes: a saving unit, configured to notify the acquiring unit after acquiring the change of the rich text through the total callback interface The rich text editor saves the rich text before the change and the rich text after the change.
  • the rich text monitoring device further includes: a reminding unit, configured to: after the obtaining unit acquires the change of the rich text through the total callback interface, reminding the user of the current Rich text has changed.
  • An embodiment of the present application further provides an electronic device including at least one processor; and a memory communicably coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor Executing, by the at least one processor, the at least one processor to enable a total callback interface to be set to the rich text editor; and separately setting a listener to each of the object frames in the rich text editor to Monitoring changes in the objects in each of the object frames; feeding back the monitored changes to the total callback interface; and obtaining changes in the rich text through the total callback interface.
  • the object is text, picture, audio or video.
  • the rich text editor is a note.
  • the electronic device preferably, after the obtaining the change of the rich text by the total callback interface, enabling the at least one processor to: notify the rich text editor to save the change Rich text before and rich text after change.
  • the at least one processor is further configured to: remind the user that the current rich text has changed.
  • Embodiments of the present application also provide a non-volatile computer storage medium storing the computer-executable instructions of computer-executable instructions that, when executed by an electronic device, enable an electronic device to access a rich text editor Setting a total callback interface; respectively setting a listener for each object frame in the rich text editor to listen for changes in the objects in each object frame; feeding back the monitored changes to the total callback interface; The total callback interface obtains changes that occur in rich text.
  • the object is text, picture, audio or video.
  • the rich text editor is a note.
  • the storage medium of the embodiment of the present application after the change of the rich text is obtained by the total callback interface, further enables the electronic device to: notify the rich text editor to save the change before Rich text and rich text after the change.
  • the storage medium of the embodiment of the present application after the change of the rich text is obtained by the total callback interface, further enables the electronic device to: remind the user that the current rich text has changed.
  • the embodiment of the present application further provides a computer program product, the computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions, when the program instructions are executed by a computer
  • the computer is caused to perform the method of any of the above.
  • the rich text monitoring method and apparatus respectively set a listener for each object frame in the rich text of the mobile terminal, and feed back the monitored changes to the total callback interface, thereby passing through the total callback interface. It can be known which object frame changes, and the effect of the user is the same as that of an existing text box, thus realizing the monitoring of rich text.
  • FIG. 1 shows a flow chart of a cache management method according to an embodiment of the present application
  • FIG. 2 is a schematic diagram of a cache management apparatus according to an embodiment of the present application.
  • FIG. 3 is a schematic diagram showing the hardware structure of an electronic device according to an embodiment of the present application.
  • connection or integral connection; may be mechanical connection or electrical connection; may be directly connected, may also be indirectly connected through an intermediate medium, or may be internal communication of two components, may be wireless connection, or may be wired connection.
  • connection or integral connection; may be mechanical connection or electrical connection; may be directly connected, may also be indirectly connected through an intermediate medium, or may be internal communication of two components, may be wireless connection, or may be wired connection.
  • the embodiment of the present application provides a rich text monitoring method, which is applicable to mobile terminals such as mobile phones and tablet computers. As shown in FIG. 1 , the method includes the following steps:
  • the objects in the object frame may be, for example, text, pictures, audio, video, and the like.
  • Multiple object frames can be inserted in the rich text editor, and different objects can be added to each object frame, such as adding text in an object frame, adding images in an object frame, and the like.
  • each object frame in the rich text of the mobile terminal is separately set to listen, and the monitored change is fed back to the total callback interface, thereby, by using the total callback interface, it can be known which object frame changes, for The user's experience is the same as that of an existing text box, thus enabling the monitoring of rich text.
  • the rich text monitoring method of the embodiment may further include: after the step S14, the method further includes:
  • the rich text editor is notified to save the rich text before the change and the rich text after the change.
  • the mobile terminal can learn that the rich text changes through the total callback interface, thereby, the rich text editor can be notified to perform automatic saving without the user manually clicking save.
  • the terminal can notify the rich text editor to save the rich text before the change and the rich text after the change, so that the current rich text can be automatically saved, when the user wants to return to the pre-transformation.
  • the version can also be restored to the version before the change.
  • the step S14 may further include:
  • S16 Remind the user that the current rich text has changed. There are many ways to remind you, for example, you can use the pop-up window to remind you, you can also use SMS or voice to remind you, you can also remind in the notification bar and so on. Because sometimes the editing operation for rich text is not intentional by the user, for example, it may be a user's misoperation, or the wrong touch of the mobile terminal into the bag or pocket, resulting in a change in rich text. This kind of change may have a great impact on the user for the note application. For example, the important items or important reminders recorded by the user in the note are deleted by mistake.
  • Each object frame in the rich text editor is set to have a listener, so it can monitor which image, audio, video changes in the object frame, or which line in the object frame changes which line You can tell the user that these changes have occurred in the current rich text to avoid adversely affecting the user.
  • steps S15 and S16 are optional. As a more preferred embodiment, both steps S15 and S16 are performed, which not only reminds the user that the current rich text has changed, but also preserves the rich text before the change and the rich after the change. text.
  • the user finds the change of the current rich text according to the reminder it can be determined whether the change is caused by normal operation or misoperation. When the normal operation is caused, the user can perform no operation, when it is caused by a misoperation, The user can choose to revert to rich text before the saved changes.
  • the embodiment of the present application further provides a rich text monitoring device, which is suitable for mobile terminals such as mobile phones and tablet computers.
  • the device includes:
  • the interface setting unit 21 is configured to set a total callback interface to the rich text editor.
  • the rich text editor can be, for example, a sticky note.
  • the monitor setting unit 22 is configured to separately set a listener for each object frame in the rich text editor to monitor the change of the object in each object frame.
  • the objects in the object frame may be, for example, text, pictures, audio, video, and the like.
  • Multiple object frames can be inserted in the rich text editor, and different objects can be added to each object frame, such as adding text in an object frame, adding images in an object frame, and the like.
  • the feedback unit 23 is configured to feed back the monitored changes to the total callback interface. For example, adding, deleting, or modifying an image in an object frame with a picture, adding which line of text in the object frame with text, adding, deleting, or modifying, etc., all of these changes can be fed back to the total callback interface.
  • the obtaining unit 24 is configured to obtain the change of the rich text through the total callback interface. Thereby, the mobile terminal can obtain the change of each object frame through the total callback interface.
  • each of the object frames in the rich text of the mobile terminal is separately set to listen, and the monitored changes are fed back to the total callback interface, whereby the user passes the total callback interface. It can be known which object frame changes, and the effect of the user is the same as that of an existing text box, thus realizing the monitoring of rich text.
  • the rich text monitoring device may further include:
  • the saving unit 25 is configured to notify the rich text editor to save the rich text before the change and the rich text after the change after the obtaining unit 24 obtains the change of the rich text through the total callback interface.
  • the mobile terminal can learn that the rich text changes through the total callback interface, thereby, the rich text editor can be notified to perform automatic saving without the user manually clicking save.
  • the terminal can notify the rich text editor to save the rich text before the change and the rich text after the change, so that the current rich text can be automatically saved, when the user wants to return to the pre-transformation.
  • the version can also be restored to the version before the change.
  • the rich text monitoring device may further include:
  • the reminding unit 26 is configured to remind the user that the current rich text has changed after the obtaining unit 24 obtains the change of the rich text through the total callback interface.
  • There are many ways to remind you for example, you can use the pop-up window to remind you, you can also use SMS or voice to remind you, you can also remind in the notification bar and so on.
  • the editing operation for rich text is not intentional by the user, for example, it may be a user's misoperation, or the wrong touch of the mobile terminal into the bag or pocket, resulting in a change in rich text. This kind of change may have a great impact on the user for the note application. For example, the important items or important reminders recorded by the user in the note are deleted by mistake.
  • each object frame in the rich text editor is separately provided with a listener, it is possible to monitor which image frame, audio, video changes in the object frame, or which line in the object frame changes which line. This can inform the user that these changes have occurred in the current rich text, avoiding adverse effects on the user.
  • Both the saving unit 25 and the reminding unit 26 are present, which not only reminds the user that the current rich text has changed, but also preserves the rich text before the change and the rich text after the change.
  • the user finds the change of the current rich text according to the reminder it can be determined whether the change is caused by normal operation or misoperation.
  • the normal operation is caused, the user can perform no operation, when it is caused by a misoperation, The user can choose to revert to rich text before the saved changes.
  • the present application also provides an electronic device including at least one processor 810; and a memory 800 communicably coupled to the at least one processor 810; wherein the memory 800 is stored with the At least one processor 810 executing instructions that are executed by the at least one processor 810 to enable the at least one processor 810 to set a total callback interface to the rich text editor; to the rich text editor
  • Each of the object frames respectively sets a listener to listen for changes in the objects in each of the object frames; feeds the monitored changes back to the total callback interface; and obtains changes in the rich text through the total callback interface.
  • the object is text, picture, audio or video.
  • the rich text editor is a note.
  • the at least one processor is further configured to: notify the rich text editor to save the change before Rich text and rich text after the change.
  • the at least one processor is further enabled to: remind the user that the current rich text has changed.
  • Embodiments of the present application also provide a non-volatile computer storage medium storing the computer-executable instructions of computer-executable instructions that, when executed by an electronic device, enable an electronic device to access a rich text editor Setting a total callback interface; respectively setting a listener for each object frame in the rich text editor to monitor changes of objects in each object frame; The monitored changes are fed back to the total callback interface; the changes that occur in the rich text are obtained through the total callback interface.
  • the object is text, picture, audio or video.
  • the rich text editor is a note.
  • the storage medium of the embodiment preferably, after the obtaining the change of the rich text by the total callback interface, further enabling the electronic device to: notify the rich text editor to save the change before Rich text and rich text after the change.
  • the storage medium of the embodiment after the change of the rich text is obtained by the total callback interface, further enables the electronic device to: remind the user that the current rich text has changed.
  • the embodiment of the present application further provides a computer program product, the computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions, when the program instructions are executed by a computer
  • the computer is caused to perform the method described in the above embodiments.
  • embodiments of the present application can be provided as a method, system, or computer program product.
  • the present application can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment in combination of software and hardware.
  • the application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
  • the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

一种富文本监听方法、装置和电子设备,涉及计算机移动终端技术领域,其中所述方法包括:对富文本编辑器设置总回调接口(S11);对所述富文本编辑器中的每个对象框分别设置监听,以监听所述每个对象框中的对象的变化(S12);将监听到的变化反馈给所述总回调接口(S13);通过所述总回调接口获取富文本所发生的变化(S15);提醒用户当前富文本已发生变化(S16)。由此,通过总回调接口就可以知道是哪个对象框发生变化,实现了对富文本的监听。

Description

富文本监听方法、装置和电子设备
交叉引用
本申请为在2016年04月01日提交中国专利局、申请号为201610204108.1、发明名称为“富文本监听方法和装置”的中国专利申请的继续申请,本申请要求在2016年04月01日提交中国专利局、申请号为201610204108.1、发明名称为“富文本监听方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及计算机移动终端技术领域,具体涉及一种富文本监听方法、装置和电子设备。
背景技术
在移动互联网时代,手机等移动终端在人们生活中的应用越来越广泛。人们也习惯于在移动终端上进行文本编辑,例如在便签应用内进行文本编辑以便可以对重要事项进行提醒。
通常需要在文本编辑器内设置监听,以监听文本的改动,这样例如可以起到两个作用,作用之一是便于便签等文本编辑器在监听到文本改动时自动对文本进行保存,而无需用户在每次改动后手动保存;另一作用是,当监听到文本改动时可以提醒用户文本已改动,避免因用户误操作而使便签等文本编辑器内记载的内容丢失。
当前移动终端内越来越多地采用富文本编辑器以满足用户的个性化需求,然而现有方案仅能对移动终端的纯文本进行监听,而对移动终端的可以进行图文混排编辑的富文本文件却难以实现监听。
发明内容
本申请要解决的技术问题在于现有方案仅能对移动终端的纯文本进行 监听,而对移动终端的富文本文件却难以实现监听。
为此,本申请实施例提供了一种富文本监听方法,包括:对富文本编辑器设置总回调接口;对所述富文本编辑器中的每个对象框分别设置监听,以监听所述每个对象框中的对象的变化;将监听到的变化反馈给所述总回调接口;通过所述总回调接口获取富文本所发生的变化。
本申请实施例所述的富文本监听方法,优选地,所述对象是文本、图片、音频或视频。
本申请实施例所述的富文本监听方法,优选地,所述富文本编辑器是便签。
本申请实施例所述的富文本监听方法,优选地,所述富文本监听方法在所述通过所述总回调接口获取富文本所发生的变化之后,还包括:通知所述富文本编辑器保存变化前的富文本和变化后的富文本。
本申请实施例所述的富文本监听方法,优选地,所述富文本监听方法在所述通过所述总回调接口获取富文本所发生的变化之后,还包括:提醒用户当前富文本已发生变化。
相应地,本申请实施例还提供了一种富文本监听装置,包括:接口设置单元,用于对富文本编辑器设置总回调接口;监听设置单元,用于对所述富文本编辑器中的每个对象框分别设置监听,以监听所述每个对象框中的对象的变化;反馈单元,用于将监听到的变化反馈给所述总回调接口;获取单元,用于通过所述总回调接口获取富文本所发生的变化。
本申请实施例所述的富文本监听装置,优选地,所述对象是文本、图片、音频或视频。
本申请实施例所述的富文本监听装置,优选地,所述富文本编辑器是便签。
本申请实施例所述的富文本监听装置,优选地,所述富文本监听装置还包括:保存单元,用于在所述获取单元通过总回调接口获取富文本所发生的变化之后,通知所述富文本编辑器保存变化前的富文本和变化后的富文本。
本申请实施例所述的富文本监听装置,优选地,所述富文本监听装置还包括:提醒单元,用于在所述获取单元通过总回调接口获取富文本所发生的变化之后,提醒用户当前富文本已发生变化。
本申请实施例还提供了一种电子设备,包括至少一个处理器;以及,与所述至少一个处理器通信连接的存储器;其中,所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够对富文本编辑器设置总回调接口;对所述富文本编辑器中的每个对象框分别设置监听,以监听所述每个对象框中的对象的变化;将监听到的变化反馈给所述总回调接口;通过所述总回调接口获取富文本所发生的变化。
本申请实施例所述的电子设备,优选地,所述对象是文本、图片、音频或视频。
本申请实施例所述的电子设备,优选地,所述富文本编辑器是便签。
本申请实施例所述的电子设备,优选地,在所述通过所述总回调接口获取富文本所发生的变化之后,使所述至少一个处理器还能够:通知所述富文本编辑器保存变化前的富文本和变化后的富文本。
本申请实施例所述的电子设备,优选地,在所述通过所述总回调接口获取富文本所发生的变化之后,使所述至少一个处理器还能够:提醒用户当前富文本已发生变化。
本申请实施例还提供了一种非易失性计算机存储介质,所述存储介质存储有计算机可执行指令的所述计算机可执行指令,当由电子设备执行时使得电子设备能够对富文本编辑器设置总回调接口;对所述富文本编辑器中的每个对象框分别设置监听,以监听所述每个对象框中的对象的变化;将监听到的变化反馈给所述总回调接口;通过所述总回调接口获取富文本所发生的变化。
本申请实施例所述的存储介质,优选地,所述对象是文本、图片、音频或视频。
本申请实施例所述的存储介质,优选地,所述富文本编辑器是便签。
本申请实施例所述的存储介质,优选地,在所述通过所述总回调接口获取富文本所发生的变化之后,还使得所述电子设备还能够:通知所述富文本编辑器保存变化前的富文本和变化后的富文本。
本申请实施例所述的存储介质,优选地,在所述通过所述总回调接口获取富文本所发生的变化之后,还使得所述电子设备还能够:提醒用户当前富文本已发生变化。
本申请实施例还提出了一种计算机程序产品,所述计算机程序产品包括存储在非暂态计算机可读存储介质上的计算机程序,所述计算机程序包括程序指令,当所述程序指令被计算机执行时,使所述计算机执行上述任一所述的方法。
本申请实施例所提供的富文本监听方法和装置,对移动终端的富文本中的每个对象框分别设置监听,并将监听到的变化反馈给总回调接口,由此,通过总回调接口就可以知道是哪个对象框发生变化,对于用户的使用体验而言就和现有的一个文本框的效果一样,从而实现了对富文本的监听。
附图说明
为了更清楚地说明本申请具体实施方式或现有技术中的技术方案,下面将对具体实施方式或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施方式,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1示出了根据本申请实施例的缓存管理方法的流程图;
图2示出了根据本申请实施例的缓存管理装置的示意图;
图3示出了根据本申请实施例中电子设备的硬件结构示意图。
具体实施方式
下面将结合附图对本申请的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得 的所有其他实施例,都属于本申请保护的范围。
在本申请的描述中,需要说明的是,术语“中心”、“上”、“下”、“左”、“右”、“竖直”、“水平”、“内”、“外”等指示的方位或位置关系为基于附图所示的方位或位置关系,仅是为了便于描述本申请和简化描述,而不是指示或暗示所指的装置或元件必须具有特定的方位、以特定的方位构造和操作,因此不能理解为对本申请的限制。此外,术语“第一”、“第二”、“第三”仅用于描述目的,而不能理解为指示或暗示相对重要性。
在本申请的描述中,需要说明的是,除非另有明确的规定和限定,术语“安装”、“相连”、“连接”应做广义理解,例如,可以是固定连接,也可以是可拆卸连接,或一体地连接;可以是机械连接,也可以是电连接;可以是直接相连,也可以通过中间媒介间接相连,还可以是两个元件内部的连通,可以是无线连接,也可以是有线连接。对于本领域的普通技术人员而言,可以具体情况理解上述术语在本申请中的具体含义。
此外,下面所描述的本申请不同实施方式中所涉及的技术特征只要彼此之间未构成冲突就可以相互结合。
实施例1
本申请实施例提供了一种富文本监听方法,适用于手机、平板电脑等移动终端,如图1所示,该方法包括如下步骤:
S11.对富文本编辑器设置总回调接口。在这里,富文本编辑器例如可以是便签。
S12.对富文本编辑器中的每个对象框分别设置监听,以监听每个对象框中的对象的变化。在这里,对象框中的对象例如可以是文本、图片、音频、视频等。富文本编辑器中可以插入多个对象框,每个对象框内可以加入不同对象,例如一个对象框内加入文本,一个对象框内加入图片等。
S13.将监听到的变化反馈给总回调接口。例如加入有图片的对象框内图片的增加、删除或修改,加入有文本的对象框内哪一行哪几个文字的增加、删除或修改等,所有这些变化都可以被反馈到总回调接口。
S14.通过总回调接口获取富文本所发生的变化。由此,移动终端就可以通过总回调接口获取各个对象框所发生的变化。
通过上述步骤,对移动终端的富文本中的每个对象框分别设置监听,并将监听到的变化反馈给总回调接口,由此,通过总回调接口就可以知道是哪个对象框发生变化,对于用户的使用体验而言就和现有的一个文本框的效果一样,从而实现了对富文本的监听。
本实施例所述的富文本监听方法,优选地,在上述步骤S14之后还可以包括:
S15.通知富文本编辑器保存变化前的富文本和变化后的富文本。移动终端通过总回调接口可以获知富文本发生变化,由此,可以通知富文本编辑器进行自动保存,而无需用户手动点击保存。例如,用户在手机等移动终端内进行富文本编辑,可能在编辑的过程中出现来电或接收到短信等情况中断,用户可能会切换到其他界面进行处理,为了保留用户所做的编辑工作,移动终端在通过总回调接口获知到富文本发生变化后,可以通知富文本编辑器保存变化前的富文本和变化后的富文本,这样可以自动保存当前的富文本,当用户希望回到变换前的版本时,也可以恢复到变化前的版本。
本实施例所述的富文本监听方法,优选地,在上述步骤S14还可以包括:
S16.提醒用户当前富文本已发生变化。提醒的方式可以有多种,例如可以用弹窗的方式提醒,也可以以短信或语音的方式提醒,还可以在通知栏内提醒等等。因为有时候对于富文本的编辑操作并非用户有意为之,例如可能是用户误操作,或者是将移动终端装入包内或口袋内的误触碰,从而导致富文本发生变化。这种变化对于便签应用来说,对于用户的影响可能很大,比如用户在便签内记录的重要事项或重要提醒被误删除了。由于 富文本编辑器中的每个对象框分别设置有监听,所以能够监听到是哪个对象框内的图片、音频、视频发生变化,或者是哪个对象框内的哪行哪几个字发生变化,从而可以告知用户当前富文本发生了这些变化,避免对用户造成不利影响。
上述步骤S15和S16是可选的,作为更为优选地实施方式,步骤S15和S16都执行,这样既提醒了用户当前富文本已发生变化,又保存了变化前的富文本和变化后的富文本。当用户根据提醒发现当前富文本发生的变化后,就可以判断出该变化是正常操作还是误操作所导致的,当是正常操作导致时,用户可以不做任何操作,当是误操作导致时,用户可以选择恢复到已保存的变化前的富文本。
实施例2
相应地,本申请实施例还提供了一种富文本监听装置,适用于手机、平板电脑等移动终端,如图2所示,该装置包括:
接口设置单元21,用于对富文本编辑器设置总回调接口。在这里,富文本编辑器例如可以是便签。
监听设置单元22,用于对富文本编辑器中的每个对象框分别设置监听,以监听每个对象框中的对象的变化。在这里,对象框中的对象例如可以是文本、图片、音频、视频等。富文本编辑器中可以插入多个对象框,每个对象框内可以加入不同对象,例如一个对象框内加入文本,一个对象框内加入图片等。
反馈单元23,用于将监听到的变化反馈给总回调接口。例如加入有图片的对象框内图片的增加、删除或修改,加入有文本的对象框内哪一行哪几个文字的增加、删除或修改等,所有这些变化都可以被反馈到总回调接口。
获取单元24,用于通过总回调接口获取富文本所发生的变化。由此,移动终端就可以通过总回调接口获取各个对象框所发生的变化。
通过上述各个单元,对移动终端的富文本中的每个对象框分别设置监听,并将监听到的变化反馈给总回调接口,由此,用户通过总回调接口就 可以知道是哪个对象框发生变化,对于用户的使用体验而言就和现有的一个文本框的效果一样,从而实现了对富文本的监听。
本实施例所述的富文本监听装置,优选地,上述富文本监听装置还可以包括:
保存单元25,用于在获取单元24通过总回调接口获取富文本所发生的变化之后,通知富文本编辑器保存变化前的富文本和变化后的富文本。移动终端通过总回调接口可以获知富文本发生变化,由此,可以通知富文本编辑器进行自动保存,而无需用户手动点击保存。例如,用户在手机等移动终端内进行富文本编辑,可能在编辑的过程中出现来电或接收到短信等情况中断,用户可能会切换到其他界面进行处理,为了保留用户所做的编辑工作,移动终端在通过总回调接口获知到富文本发生变化后,可以通知富文本编辑器保存变化前的富文本和变化后的富文本,这样可以自动保存当前的富文本,当用户希望回到变换前的版本时,也可以恢复到变化前的版本。
本实施例所述的富文本监听装置,优选地,上述富文本监听装置还可以包括:
提醒单元26,用于在获取单元24通过总回调接口获取富文本所发生的变化之后,提醒用户当前富文本已发生变化。提醒的方式可以有多种,例如可以用弹窗的方式提醒,也可以以短信或语音的方式提醒,还可以在通知栏内提醒等等。因为有时候对于富文本的编辑操作并非用户有意为之,例如可能是用户误操作,或者是将移动终端装入包内或口袋内的误触碰,从而导致富文本发生变化。这种变化对于便签应用来说,对于用户的影响可能很大,比如用户在便签内记录的重要事项或重要提醒被误删除了。由于富文本编辑器中的每个对象框分别设置有监听,所以能够监听到是哪个对象框内的图片、音频、视频发生变化,或者是哪个对象框内的哪行哪几个字发生变化,从而可以告知用户当前富文本发生了这些变化,避免对用户造成不利影响。
上述保存单元25和提醒单元26是可选的,作为更为优选地实施方式, 保存单元25和提醒单元26都存在,这样既提醒了用户当前富文本已发生变化,又保存了变化前的富文本和变化后的富文本。当用户根据提醒发现当前富文本发生的变化后,就可以判断出该变化是正常操作还是误操作所导致的,当是正常操作导致时,用户可以不做任何操作,当是误操作导致时,用户可以选择恢复到已保存的变化前的富文本。
实施例3
如图所示,本申请还提供了一种电子设备,包括至少一个处理器810;以及,与所述至少一个处理器810通信连接的存储器800;其中,所述存储器800存储有可被所述至少一个处理器810执行的指令,所述指令被所述至少一个处理器810执行,以使所述至少一个处理器810能够对富文本编辑器设置总回调接口;对所述富文本编辑器中的每个对象框分别设置监听,以监听所述每个对象框中的对象的变化;将监听到的变化反馈给所述总回调接口;通过所述总回调接口获取富文本所发生的变化。
本实施例的所述电子设备,优选地,所述对象是文本、图片、音频或视频。
本实施例的所述电子设备,优选地,所述富文本编辑器是便签。
本实施例的所述电子设备,优选地,在所述通过所述总回调接口获取富文本所发生的变化之后,使所述至少一个处理器还能够:通知所述富文本编辑器保存变化前的富文本和变化后的富文本。
本实施例的所述电子设备,优选地,在所述通过所述总回调接口获取富文本所发生的变化之后,使所述至少一个处理器还能够:提醒用户当前富文本已发生变化。
实施例4
本申请实施例还提供了一种非易失性计算机存储介质,所述存储介质存储有计算机可执行指令的所述计算机可执行指令,当由电子设备执行时使得电子设备能够对富文本编辑器设置总回调接口;对所述富文本编辑器中的每个对象框分别设置监听,以监听所述每个对象框中的对象的变化; 将监听到的变化反馈给所述总回调接口;通过所述总回调接口获取富文本所发生的变化。
本实施例所述的存储介质,优选地,所述对象是文本、图片、音频或视频。
本实施例所述的存储介质,优选地,所述富文本编辑器是便签。
本实施例所述的存储介质,优选地,在所述通过所述总回调接口获取富文本所发生的变化之后,还使得所述电子设备还能够:通知所述富文本编辑器保存变化前的富文本和变化后的富文本。
本实施例所述的存储介质,优选地,在所述通过所述总回调接口获取富文本所发生的变化之后,还使得所述电子设备还能够:提醒用户当前富文本已发生变化。
实施例5
本申请实施例还提供了一种计算机程序产品,所述计算机程序产品包括存储在非暂态计算机可读存储介质上的计算机程序,所述计算机程序包括程序指令,当所述程序指令被计算机执行时,使所述计算机执行上述实施例所述的方法。本领域内的技术人员还应理解,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本申请是参照根据本申请实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的,应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产 生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
显然,上述实施例仅仅是为清楚地说明所作的举例,而并非对实施方式的限定。对于所属领域的普通技术人员来说,在上述说明的基础上还可以做出其它不同形式的变化或变动。这里无需也无法对所有的实施方式予以穷举。而由此所引伸出的显而易见的变化或变动仍处于本发明创造的保护范围之中。

Claims (21)

  1. 一种富文本监听方法,其特征在于,包括:
    对富文本编辑器设置总回调接口;
    对所述富文本编辑器中的每个对象框分别设置监听,以监听所述每个对象框中的对象的变化;
    将监听到的变化反馈给所述总回调接口;
    通过所述总回调接口获取富文本所发生的变化。
  2. 根据权利要求1所述的富文本监听方法,其特征在于,所述对象是文本、图片、音频或视频。
  3. 根据权利要求1所述的富文本监听方法,其特征在于,所述富文本编辑器是便签。
  4. 根据权利要求1所述的富文本监听方法,其特征在于,在所述通过所述总回调接口获取富文本所发生的变化之后,还包括:
    通知所述富文本编辑器保存变化前的富文本和变化后的富文本。
  5. 根据权利要求1-4中任一项所述的富文本监听方法,其特征在于,在所述通过所述总回调接口获取富文本所发生的变化之后,还包括:
    提醒用户当前富文本已发生变化。
  6. 一种富文本监听装置,其特征在于,包括:
    接口设置单元,用于对富文本编辑器设置总回调接口;
    监听设置单元,用于对所述富文本编辑器中的每个对象框分别设置监听,以监听所述每个对象框中的对象的变化;
    反馈单元,用于将监听到的变化反馈给所述总回调接口;
    获取单元,用于通过所述总回调接口获取富文本所发生的变化。
  7. 根据权利要求6所述的富文本监听装置,其特征在于,所述对象是文本、图片、音频或视频。
  8. 根据权利要求6所述的富文本监听装置,其特征在于,所述富文本编辑器是便签。
  9. 根据权利要求6所述的富文本监听装置,其特征在于,还包括:
    保存单元,用于在所述获取单元通过总回调接口获取富文本所发生的变化之后,通知所述富文本编辑器保存变化前的富文本和变化后的富文本。
  10. 根据权利要求6-9中任一项所述的富文本监听装置,其特征在于,还包括:
    提醒单元,用于在所述获取单元通过总回调接口获取富文本所发生的变化之后,提醒用户当前富文本已发生变化。
  11. 一种电子设备,其特征在于包括至少一个处理器;以及,与所述至少一个处理器通信连接的存储器;其中,所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够
    对富文本编辑器设置总回调接口;
    对所述富文本编辑器中的每个对象框分别设置监听,以监听所述每个对象框中的对象的变化;
    将监听到的变化反馈给所述总回调接口;
    通过所述总回调接口获取富文本所发生的变化。
  12. 根据权利要求11所述的电子设备,其特征在于,所述对象是文本、图片、音频或视频。
  13. 根据权利要求11所述的电子设备,其特征在于,所述富文本编辑器是便签。
  14. 根据权利要求11所述的电子设备,其特征在于,在所述通过所述总回调接口获取富文本所发生的变化之后,使所述至少一个处理器还能够:
    通知所述富文本编辑器保存变化前的富文本和变化后的富文本。
  15. 根据权利要求11-14中任一项所述的电子设备,其特征在于,在所述通过所述总回调接口获取富文本所发生的变化之后,使所述至少一个处理器还能够:
    提醒用户当前富文本已发生变化。
  16. 一种非易失性计算机存储介质,其特征在于:所述存储介质存储有计算机可执行指令的所述计算机可执行指令,当由电子设备执行时使得电子设备能够:
    对富文本编辑器设置总回调接口;
    对所述富文本编辑器中的每个对象框分别设置监听,以监听所述每个对象框中的对象的变化;
    将监听到的变化反馈给所述总回调接口;
    通过所述总回调接口获取富文本所发生的变化。
  17. 根据权利要求16所述的存储介质,其特征在于,所述对象是文本、图片、音频或视频。
  18. 根据权利要求16所述的存储介质,其特征在于,所述富文本编辑器是便签。
  19. 根据权利要求16所述的存储介质,其特征在于,在所述通过所述总回调接口获取富文本所发生的变化之后,还使得所述电子设备还能够:
    通知所述富文本编辑器保存变化前的富文本和变化后的富文本。
  20. 根据权利要求16-19中任一项所述的存储介质,其特征在于,在所述通过所述总回调接口获取富文本所发生的变化之后,还使得所述电子设备还能够:
    提醒用户当前富文本已发生变化。
  21. 一种计算机程序产品,所述计算机程序产品包括存储在非暂态计算机可读存储介质上的计算机程序,所述计算机程序包括程序指令,其特征在于,当所述程序指令被计算机执行时,使所述计算机执行上述任一权利要求所述的方法。
PCT/CN2016/100268 2016-04-01 2016-09-27 富文本监听方法、装置和电子设备 Ceased WO2017166755A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610204108.1 2016-04-01
CN201610204108.1A CN105843789A (zh) 2016-04-01 2016-04-01 富文本监听方法和装置

Publications (1)

Publication Number Publication Date
WO2017166755A1 true WO2017166755A1 (zh) 2017-10-05

Family

ID=56597750

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/100268 Ceased WO2017166755A1 (zh) 2016-04-01 2016-09-27 富文本监听方法、装置和电子设备

Country Status (2)

Country Link
CN (1) CN105843789A (zh)
WO (1) WO2017166755A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115470760A (zh) * 2022-09-20 2022-12-13 用友网络科技股份有限公司 富文本编辑器的构建方法、装置、存储介质和电子设备

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105843789A (zh) * 2016-04-01 2016-08-10 乐视控股(北京)有限公司 富文本监听方法和装置
CN108363499B (zh) * 2018-01-31 2022-01-28 维沃移动通信有限公司 一种文本恢复方法及移动终端
CN110929000A (zh) * 2018-08-30 2020-03-27 北京国双科技有限公司 内容数据处理方法、装置及富文本编辑器
CN111381898B (zh) * 2018-12-28 2023-12-22 北京字节跳动网络技术有限公司 一种接口调用方法、装置、移动终端及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102915328A (zh) * 2012-09-04 2013-02-06 新浪网技术(中国)有限公司 编辑富文本的方法及富文本编辑器
CN103279559A (zh) * 2013-06-13 2013-09-04 北京神鹰城讯科技有限公司 基于安卓系统的富文本编辑方法及富文本编辑器
CN103809952A (zh) * 2012-11-14 2014-05-21 腾讯科技(深圳)有限公司 一种网络平台展示富文本消息的方法和装置
CN105843789A (zh) * 2016-04-01 2016-08-10 乐视控股(北京)有限公司 富文本监听方法和装置

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101248405B (zh) * 2005-04-29 2010-09-15 微软公司 使用并发域的多线程化
US20090013245A1 (en) * 2007-04-27 2009-01-08 Bea Systems, Inc. Enterprise web application constructor xml editor framework
CN102880460B (zh) * 2012-08-15 2016-08-17 小米科技有限责任公司 一种便签内容的解析方法和装置
CN103279453B (zh) * 2013-05-31 2016-08-17 小米科技有限责任公司 文件处理方法及装置
JP6097835B2 (ja) * 2013-06-09 2017-03-15 アップル インコーポレイテッド 複数のページを有するフォルダを管理するためのデバイス、方法、及びグラフィカルユーザインタフェース
CN105101078B (zh) * 2015-06-30 2019-09-27 小米科技有限责任公司 信息提醒方法、终端及服务器

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102915328A (zh) * 2012-09-04 2013-02-06 新浪网技术(中国)有限公司 编辑富文本的方法及富文本编辑器
CN103809952A (zh) * 2012-11-14 2014-05-21 腾讯科技(深圳)有限公司 一种网络平台展示富文本消息的方法和装置
CN103279559A (zh) * 2013-06-13 2013-09-04 北京神鹰城讯科技有限公司 基于安卓系统的富文本编辑方法及富文本编辑器
CN105843789A (zh) * 2016-04-01 2016-08-10 乐视控股(北京)有限公司 富文本监听方法和装置

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115470760A (zh) * 2022-09-20 2022-12-13 用友网络科技股份有限公司 富文本编辑器的构建方法、装置、存储介质和电子设备

Also Published As

Publication number Publication date
CN105843789A (zh) 2016-08-10

Similar Documents

Publication Publication Date Title
CN107580140A (zh) 消息提醒方法、装置、设备及存储介质
CN107122135A (zh) 数据处理方法及装置
CN105389507A (zh) 监控系统分区文件的方法及装置
CN105159672A (zh) 远程协助方法和客户端
CN105808305B (zh) 静态资源的加载方法和装置
US10798536B2 (en) Method, system, and device for processing system call in voice call
CN104683568A (zh) 信息提醒方法和装置
KR20160034839A (ko) 파일 백업 방법, 장치, 프로그램 및 기록매체
WO2016150104A1 (zh) 应用主题的加载方法及装置
WO2017177596A1 (zh) 应用的状态信息显示方法及装置
CN106791092A (zh) 联系人的搜索方法及装置
CN107636541A (zh) 用投射闹钟或闹钟加内容提示唤醒
RU2599955C2 (ru) Способ и устройство для отображения сообщения
US20180253322A1 (en) Electronic device and mode switching method thereof
CN106231093A (zh) 闹钟提醒方法及装置
JP2017107529A (ja) 情報処理システム、端末装置及びプログラム
US20140222951A1 (en) Apparatus and method for syncing device notifications
KR101763272B1 (ko) 안내 방법, 장치, 프로그램 및 기록매체
WO2017166611A1 (zh) 一种媒体文件删除方法、装置和电子设备
CN104092831A (zh) 一种在手机锁屏上显示内容的系统和方法
JP2015106904A (ja) 端末装置、制御方法、及びプログラム
CN106201738B (zh) 系统广播调用方法及装置
WO2017166753A1 (zh) 一种手机声音模式自动切换的方法、装置和电子设备
CN106919679A (zh) 应用于分布式文件系统的日志重演方法、装置及终端
CN105930266A (zh) 网页调试方法及装置

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16896525

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 16896525

Country of ref document: EP

Kind code of ref document: A1