[go: up one dir, main page]

CN116151189A - Text format setting method and device and electronic equipment - Google Patents

Text format setting method and device and electronic equipment Download PDF

Info

Publication number
CN116151189A
CN116151189A CN202310208420.8A CN202310208420A CN116151189A CN 116151189 A CN116151189 A CN 116151189A CN 202310208420 A CN202310208420 A CN 202310208420A CN 116151189 A CN116151189 A CN 116151189A
Authority
CN
China
Prior art keywords
format
text
target text
content
setting window
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.)
Pending
Application number
CN202310208420.8A
Other languages
Chinese (zh)
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.)
Beijing Zitiao Network Technology Co Ltd
Original Assignee
Beijing Zitiao Network Technology 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 Beijing Zitiao Network Technology Co Ltd filed Critical Beijing Zitiao Network Technology Co Ltd
Priority to CN202310208420.8A priority Critical patent/CN116151189A/en
Publication of CN116151189A publication Critical patent/CN116151189A/en
Priority to PCT/CN2024/077906 priority patent/WO2024179342A1/en
Pending 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/103Formatting, i.e. changing of presentation of documents
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range

Landscapes

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

Abstract

本公开实施例提供一种文本格式设置方法、装置及电子设备,该方法包括:在文档显示界面中显示文本内容和格式设置窗口;确定用户在格式设置窗口设置的目标文本格式;响应于接收到对所述文本内容的多次选择操作,将所述目标文本格式应用到每一次选择操作对应的目标文本,由于在文本内容之外提供了单独的格式设置窗口,因此使得文本格式设置过程独立于文本。文本格式编辑过程不会影响文本内容的原有格式。此外还提高了批量格式化的效率。

Figure 202310208420

Embodiments of the present disclosure provide a text format setting method, device, and electronic equipment, the method including: displaying text content and a format setting window in the document display interface; determining the target text format set by the user in the format setting window; responding to receiving For multiple selection operations on the text content, the target text format is applied to the target text corresponding to each selection operation. Since a separate format setting window is provided outside the text content, the text format setting process is independent of the text. The text format editing process will not affect the original format of the text content. In addition, the efficiency of batch formatting has been improved.

Figure 202310208420

Description

文本格式设置方法、装置及电子设备Text format setting method, device and electronic device

技术领域technical field

本公开实施例涉及计算机技术领域,尤其涉及一种文本格式设置方法、装置及电子设备。Embodiments of the present disclosure relate to the field of computer technology, and in particular, to a text format setting method, device, and electronic equipment.

背景技术Background technique

用户可以使用文档编辑应用编辑文本。在文本编辑好后或者在文本编辑过程中,用户可以设置或调整文本格式,例如设置文本的字体、字号、颜色、对齐等。Users can edit text using document editing apps. After the text is edited or during the text editing process, the user can set or adjust the text format, such as setting the font, font size, color, alignment, etc. of the text.

在文本内容较多的时候,用户希望对文本内容中的多处文本进行批量格式化。目前的文档编辑应用提供了批量格式化工件例如格式刷,可以使用格式刷对文本内容中的多个段落进行批量格式化。When there is a lot of text content, the user wishes to perform batch formatting on multiple texts in the text content. Current document editing applications provide batch formatting artifacts such as Format Painter, which can be used to batch format multiple paragraphs in text content.

在一些应用场景中,使用现有的批量化格式工具对文本进行批量格式化时存在操作不便捷导致的效率偏低的问题。In some application scenarios, there is a problem of low efficiency caused by inconvenient operation when using existing batch formatting tools to batch format text.

发明内容Contents of the invention

本公开实施例提供一种文本格式设置方法、装置及电子设备,以克服相关技术中批量化格式工具对文本进行批量格式化存在的效率偏低的问题。Embodiments of the present disclosure provide a text format setting method, device, and electronic device to overcome the problem of low efficiency in batch formatting of text by a batch format tool in the related art.

第一方面,本公开实施例提供一种文本格式设置方法,该方法包括:In a first aspect, an embodiment of the present disclosure provides a method for setting a text format, the method including:

在文档显示界面中显示文本内容和格式设置窗口;Display the text content and format setting window in the document display interface;

确定用户在格式设置窗口设置的目标文本格式;Determine the target text format set by the user in the format setting window;

响应于接收到对所述文本内容的多次选择操作,将所述目标文本格式应用到每一次选择操作对应的目标文本。In response to receiving multiple selection operations on the text content, the target text format is applied to the target text corresponding to each selection operation.

第二方面,本公开实施例提供一种文本格式设置装置,包括:In a second aspect, an embodiment of the present disclosure provides a text formatting device, including:

显示单元,用于在文档显示界面中显示文本内容和格式设置窗口;a display unit, configured to display text content and a format setting window in the document display interface;

确定单元,用于确定用户在格式设置窗口设置的目标文本格式;Determination unit, used to determine the target text format set by the user in the format setting window;

应用单元,用于响应于接收到对所述文本内容的多次选择操作,将所述目标文本格式应用到每一次选择操作对应的目标文本。The application unit is configured to, in response to receiving multiple selection operations on the text content, apply the target text format to the target text corresponding to each selection operation.

第三方面,本公开实施例提供一种电子设备,包括:处理器和存储器;所述存储器存储计算机执行指令;所述处理器执行所述存储器存储的计算机执行指令,使得所述至少一个处理器执行如上第一方面以及第一方面各种可能涉及的文本格式设置方法。In a third aspect, an embodiment of the present disclosure provides an electronic device, including: a processor and a memory; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory, so that the at least one processor Execute the above first aspect and various text formatting methods that may be involved in the first aspect.

第四方面,本公开实施例提供一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机执行指令,当处理器执行所述计算机执行指令时,实现如上第一方面以及第一方面各种可能涉及的文本格式设置方法。In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, where computer-executable instructions are stored in the computer-readable storage medium, and when the processor executes the computer-executable instructions, the above first aspect and the first Various text formatting methods that may be involved in aspects.

第五方面,本公开实施例提供一种计算机程序产品,包括计算机程序,所述计算机程序被处理器执行时实现如上第一方面以及第一方面各种可能涉及的文本格式设置方法。In a fifth aspect, an embodiment of the present disclosure provides a computer program product, including a computer program. When the computer program is executed by a processor, the above first aspect and various text formatting methods that may be involved in the first aspect are implemented.

本实施例提供的文本格式设置方法、装置及电子设备,通过在文档显示界面中显示文本内容和格式设置窗口;确定用户在格式设置窗口设置的目标文本格式;响应于接收到对所述文本内容的多次选择操作,将所述目标文本格式应用到每一次选择操作对应的目标文本,由于在文本内容外提供了单独的格式设置窗口,因此使得文本格式设置过程独立于文本内容。文本格式编辑过程不会影响文本内容的原有格式。此外,可以将在格式设置窗口设置的目标文本格式应用到多次选择操作各自指示的目标文本,无需在一次操作结束后再次对格式设置窗口执行任何操作,就可以再次通过选择操作对文档中的其他文本应用目标文本格式,提高了文本批量格式化的效率。The text format setting method, device and electronic equipment provided by this embodiment display the text content and the format setting window in the document display interface; determine the target text format set by the user in the format setting window; For multiple selection operations, the target text format is applied to the target text corresponding to each selection operation. Since a separate format setting window is provided outside the text content, the text format setting process is independent of the text content. The text format editing process will not affect the original format of the text content. In addition, the target text format set in the formatting window can be applied to the target text indicated by each of the multiple selection operations, and it is not necessary to perform any operations on the formatting window again after one operation is completed. The target text format is applied to other texts, which improves the efficiency of text batch formatting.

附图说明Description of drawings

为了更清楚地说明本公开实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本公开的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description These are some embodiments of the present disclosure. Those skilled in the art can also obtain other drawings based on these drawings without any creative effort.

图1为本公开实施例提供的一种文本格式设置方法的流程示意图一;FIG. 1 is a first schematic flowchart of a method for setting a text format provided by an embodiment of the present disclosure;

图2为本公开实施例提供的一种文本格式设置方法的流程示意图二;FIG. 2 is a second schematic flow diagram of a method for setting a text format provided by an embodiment of the present disclosure;

图3A为一个文档显示界面示意图;FIG. 3A is a schematic diagram of a document display interface;

图3B为一个文档显示界面示意图;FIG. 3B is a schematic diagram of a document display interface;

图4为本公开实施例提供的一种文本格式设置方法的流程示意图三;FIG. 4 is a third schematic flowchart of a method for setting a text format provided by an embodiment of the present disclosure;

图5为格式设置窗口的一个示意图;Fig. 5 is a schematic diagram of the format setting window;

图6为格式设置窗口的一个示意图;Fig. 6 is a schematic diagram of the format setting window;

图7为本公开实施例提供的一种文本格式设置装置的结构框图;FIG. 7 is a structural block diagram of a text formatting device provided by an embodiment of the present disclosure;

图8为本公开实施例提供的电子设备的硬件结构示意图。FIG. 8 is a schematic diagram of a hardware structure of an electronic device provided by an embodiment of the present disclosure.

具体实施方式Detailed ways

为使本公开实施例的目的、技术方案和优点更加清楚,下面将结合本公开实施例中的附图,对本公开实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本公开一部分实施例,而不是全部的实施例。基于本公开中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本公开保护的范围。In order to make the purpose, technical solutions and advantages of the embodiments of the present disclosure clearer, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments It is a part of the embodiments of the present disclosure, but not all of them. Based on the embodiments in the present disclosure, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present disclosure.

目前对文本进行批量设置格式的工具有格式刷。对文本进行批量格式设置依赖格式刷功能。使用格式刷时,用户需要从正文中吸取目标文本格式后,再对需要进行批量格式化的文本使用格式刷。Currently, the tool for batch formatting text is Format Painter. Batch formatting of text relies on the Format Painter feature. When using the Format Painter, the user needs to absorb the target text format from the text, and then use the Format Painter on the text that needs to be formatted in batches.

使用格式刷进行批量格式设置,需要在正文中设置格式。也就是说需要从正文中选取部分文本,对该部分文本进行格式设置,例如加底色、加粗、设置文字颜色、设置字号或者字体等。在上述格式设置过程中,将会改变该部分文本的原本格式。在设置格式的过程中对该部分文本设置了部分格式,如果在设置格式过程中放弃了格式设置,需要再取消上述部分格式在该部分文本的应用。如果用户忘记了取消上述应用将会在文本内容中有这些部分格式遗留,给用户带来了不便。To use the Format Painter for batch formatting, you need to set the format in the text. That is to say, it is necessary to select part of the text from the text, and perform formatting on the part of the text, such as adding background color, bolding, setting text color, setting font size or font, etc. During the above format setting process, the original format of this part of the text will be changed. Part of the format is set for this part of the text during the format setting process. If the format setting is abandoned during the format setting process, the application of the above part of the format to the part of the text needs to be cancelled. If the user forgets to cancel the above application, these partial formats will remain in the text content, which brings inconvenience to the user.

另外,在使用格式刷进行批量格式设置的时候,用户需要先选中编辑好了格式的文本,然后对格式刷标识执行点击操作从编辑好格式的文本中吸取格式。在吸取了格式后,由用户从文本内容中选择一些文本再按下按键后,可以将上述吸取的格式应用到这些文本中。但是如果还需要对上述文本内容的其他文本继续使用上述编辑好的格式,就需要再次选中编辑好格式的文本,然后再利用格式刷吸取格式,再选中其他文本来应用上述吸取的格式。这样一来,对文本进行批量格式化的效率不高。In addition, when using the Format Painter for batch formatting, the user needs to select the edited formatted text first, and then perform a click operation on the Format Painter icon to extract the format from the edited formatted text. After the format is extracted, the user selects some texts from the text content and presses a button, and the above-mentioned extracted format can be applied to these texts. But if you need to continue to use the above edited format for other texts in the above text content, you need to select the edited formatted text again, then use the format brush to absorb the format, and then select other texts to apply the above absorbed format. This makes it inefficient to batch format text.

为了改善上述问题,本公开提供的方案,在文档中显示独立于文本内容的格式设置窗口,用户可以在格式设置窗口设置目标文本格式,在设置好目标文本格式后,用户可以利用至少一次选择操作将目标文本格式应用到至少一次选择操作各自指示的目标文本。由于格式设置窗口独立于文本内容,用户在格式设置窗口设置格式的过程不会影响文本内容的格式,因此不会产生由于格式设置放弃而产生的格式设置过程中的格式遗留。此外,在设置了目标文本格式后,可以由用户的至少一次选择操作将目标文本格式应用到文本内容的多个目标文本,提高了批量格式化的效率。另外还丰富了批量格式化工具。In order to improve the above problems, the solution provided by this disclosure displays a format setting window independent of the text content in the document, and the user can set the target text format in the format setting window. After setting the target text format, the user can use at least one selection operation Applies target text formatting to the target text indicated by each of at least one selection operation. Since the format setting window is independent of the text content, the process of setting the format in the format setting window by the user will not affect the format of the text content, so there will be no format legacy in the format setting process due to the abandonment of the format setting. In addition, after the target text format is set, the target text format can be applied to multiple target texts of the text content by at least one selection operation by the user, which improves the efficiency of batch formatting. In addition, batch formatting tools have been enriched.

请参考图1,图1为本公开实施例提供的一种文本格式设置方法的流程示意图一。该方法包括:Please refer to FIG. 1 . FIG. 1 is a first schematic flowchart of a text format setting method provided by an embodiment of the present disclosure. The method includes:

本公开中的文本格式设置方法的执行主体可以是任意电子设备,包括终端设备,或者为终端设备提供服务的服务器等。The subject of execution of the text format setting method in the present disclosure may be any electronic device, including a terminal device, or a server that provides services for the terminal device.

S101:在文档显示界面中显示文本内容和格式设置窗口。S101: Display text content and a format setting window in the document display interface.

这里的文档页面可以是在线文档页面,也可以是离线文档页面。The documentation page here can be an online documentation page or an offline documentation page.

上述文档页面中的文本内容可以实时编辑的,也可以是历史编辑的。The text content in the above document page can be edited in real time or historically.

上述文本内容可以包括文字、符号、数字、字母等。The above text content may include words, symbols, numbers, letters and the like.

在一些应用场景中,上述格式设置窗口可以是浮窗形式或弹窗形式的窗口。在这些应用场景中,上述格式设置窗口可以设置在文本内容的上方。In some application scenarios, the format setting window may be a window in the form of a floating window or a pop-up window. In these application scenarios, the format setting window can be set above the text content.

在一些实施例中,上述格式设置窗口可以设置在文本内容的一侧。也即在文档显示界面中并排显示文本内容和格式设置窗口。In some embodiments, the above format setting window may be set on one side of the text content. That is, the text content and the format setting window are displayed side by side in the document display interface.

在一个示例中,上述格式设置窗口可以显示在文本内容的右侧。如图2所示的格式设置窗口202设置在文本内容201的右侧。In one example, the above-mentioned formatting window may be displayed on the right side of the text content. The format setting window 202 shown in FIG. 2 is set on the right side of the text content 201 .

在一个示例中,上述格式设置窗口还可以显示在文本内容的左侧。In an example, the above-mentioned formatting window can also be displayed on the left side of the text content.

在这些实施例中,用户可以在文档显示界面中无遮挡地同时浏览文本内容和格式设置窗口。In these embodiments, the user can simultaneously browse the text content and the format setting window without being blocked in the document display interface.

S102:确定用户在格式设置窗口设置的目标文本格式。S102: Determine the target text format set by the user in the format setting window.

在一些实施例中,用户可以利用文档编辑应用自身携带的工具栏中的格式项来在格式设置窗口设置目标文本格式。In some embodiments, the user can use the format item in the toolbar of the document editing application to set the target text format in the format setting window.

在一个示例中,用户可以在格式设置窗口输入参考文本,然后在参考文本上应用工具栏中选择的格式。In one example, the user can enter reference text in the formatting window, and then apply the formatting selected in the toolbar to the reference text.

在一个示例中,上述格式设置窗口中可以显示默认参考文本。用户可以对这些参考文本应用选择的格式。In one example, default reference text may be displayed in the formatting window described above. Users can apply formatting of choice to these reference texts.

例如可以选中格式设置窗口中的文本,再点击文档显示界面携带的工具栏中的一个格式项,将该格式项应用到上述文本。通过多次操作,可以将不同的格式项对应的格式依次应用到上述文本。在检测到格式设置操作结束,可以将上述不同格式的组合作为目标文本格式。For example, the text in the format setting window can be selected, and then a format item in the toolbar carried by the document display interface can be clicked to apply the format item to the above text. Through multiple operations, formats corresponding to different format items can be applied to the above text in sequence. After detecting the end of the format setting operation, a combination of the above-mentioned different formats can be used as the target text format.

作为一种实现方式,可以在格式设置窗口中设置用于指示格式设置操作完成的控件。用户可以触发该控件。当执行主体接收到用户对该控件的触发操作时,可以视为格式设置操作结束。As an implementation, a control may be set in the formatting window to indicate completion of the formatting operation. User can trigger this control. When the execution body receives the user's trigger operation on the control, it can be regarded as the end of the format setting operation.

作为另外一种实现方式,在用户在格式设置窗口中编辑格式的过程中,对于任意一次格式设置操作,上述执行主体将该次格式设置操作之前设置的格式以及本次设置操作设置的格式进行组合。在检测到用户对文本内容执行选择操作时,可以将用户对文本内容执行选择操作之前的组合格式作为目标文本格式。As another implementation, when the user edits the format in the format setting window, for any format setting operation, the above-mentioned executive body will combine the format set before the second format setting operation and the format set by this setting operation . When it is detected that the user performs a selection operation on the text content, the combined format before the user performs the selection operation on the text content may be used as the target text format.

在用户在格式设置窗口设置目标文本格式的过程中,不会改变文本内容的格式。When the user sets the format of the target text in the format setting window, the format of the text content will not be changed.

S103:响应于接收到对文本内容的多次选择操作,将目标文本格式应用到每一次选择操作对应的目标文本。S103: In response to receiving multiple selection operations on the text content, apply the target text format to the target text corresponding to each selection operation.

用户在格式设置窗口设置了目标文本格式之后,可以从文本内容中选择待应用该目标文本格式的目标文本。After setting the target text format in the format setting window, the user can select the target text to which the target text format is to be applied from the text content.

在一个示例中,用户可以对文本内容执行多次选择操作。每次选择操作选择一部分文本内容,可以该将次选择操作选择的文本作为该次选择操作的目标文本。在本次选择操作结束后,可以将目标文本格式应用到上述目标文本。In one example, a user can perform multiple selection operations on text content. Each selection operation selects a part of the text content, and the text selected by the selection operation can be used as the target text of the selection operation. After this selection operation is finished, the target text format can be applied to the above target text.

可以理解的是,用户也可以执行一次选择操作选择待应用该目标文本格式的全部文本作为目标文本。检测到用户的该次选择操作结束后,将目标文本格式应用到上述该次选择操作选择的目标文本。It can be understood that the user may also perform a selection operation to select all texts to which the target text format is to be applied as the target text. After detecting that the selection operation by the user is completed, the target text format is applied to the target text selected by the selection operation.

在一些实施例中,上述步骤S103包括:响应于接收到对文本内容中的第一内容的选择操作,将第一内容的格式变更为目标文本格式;以及响应于接收到对上述文本内容中的第二内容的选择操作,将第二内容的格式变更为目标文本格式。In some embodiments, the above step S103 includes: in response to receiving a selection operation on the first content in the text content, changing the format of the first content to the target text format; and in response to receiving the selection operation on the above text content The selection operation of the second content changes the format of the second content to the target text format.

在这些实施例中,上述第一内容和第二内容可以分别是文本内容的组成部分。在一些应用场景中,第一内容和第二内容之间可以无重叠内容。In these embodiments, the above-mentioned first content and second content may be components of text content respectively. In some application scenarios, there may be no overlapping content between the first content and the second content.

也就是说,在步骤S102中确定了目标文本格式之后,用户可以通过多次选择操作来分别选定待应用目标文本格式的部分内容,进而在选定了上述部分内容之后,可以自动将目标文本格式应用到各次选择操作分别所选定的部分内容。That is to say, after the target text format is determined in step S102, the user can respectively select part of the content to be applied with the target text format through multiple selection operations, and then after the above part of content is selected, the target text can be automatically Formatting is applied to selected portions of each selection operation.

示意性地,用户在第一次选择操作中选择了第一内容A,上述执行主体可以将上述目标文本格式应用到上述第一内容A。在用户执行了第一次选择操作之后,可以紧接着执行第二次选择操作,在第二次选择操作中选择了第二内容B,上述执行主体可以将上述目标文本格式应用到第二内容B。Schematically, the user selects the first content A in the first selection operation, and the execution subject may apply the target text format to the first content A. After the user performs the first selection operation, the second selection operation can be performed immediately, and the second content B is selected in the second selection operation, and the above-mentioned execution subject can apply the above-mentioned target text format to the second content B .

在这些实施例中,在设置了目标文本格式之后,用户可以通过对文本内容中的不同内容分别执行选择操作,进而将目标文本格式应用到上述不同内容上,从而可以简化通过多次选择操作选择不同文本内容来应用同一目标文本格式的操作。In these embodiments, after setting the target text format, the user can perform selection operations on different contents in the text content, and then apply the target text format to the above-mentioned different contents, thereby simplifying the selection through multiple selection operations. Different text content to apply the same target text formatting operation.

在一些实施例中,上述步骤S103还包括:在显示格式设置窗口的同时,接收对文本内容的多次选择操作,并将目标文本格式应用到每一次选择操作对应的目标文本。In some embodiments, the above step S103 further includes: while displaying the format setting window, receiving multiple selection operations on the text content, and applying the target text format to the target text corresponding to each selection operation.

在这些实施例中,在格式设置窗口中设置了目标文本格式之后,文档显示界面可以继续显示格式设置窗口。然后用户可以在文档内容中执行内容选择操作。In these embodiments, after the target text format is set in the format setting window, the document display interface may continue to display the format setting window. Users can then perform content selection operations within the document content.

也就是说,在文档显示界面中显示格式设置窗口和文档内容的同时,可以根据接收到的用户对文档内容的多次选择操作,分别将目标文本格式依次应用到各次选择操作分被选中的内容。That is to say, while displaying the format setting window and the document content in the document display interface, the target text format can be applied to the selected documents in turn according to the multiple selection operations received by the user on the document content. content.

在这些实施例中,通过在文档显示界面中同时显示格式设置窗口和文档内容时,根据接收到的对文档内容执行的多次选择操作,将目标文本格式应用到各次选择操作分别对应的部分文本内容,从而用户可以对照检查对部分文本内容应用的格式是否与格式设置窗口设置的目标文本格式相同,有利于用户对所选择的内容应用的格式的准确性进行确认。In these embodiments, when the format setting window and the document content are simultaneously displayed in the document display interface, according to the received multiple selection operations performed on the document content, the target text format is applied to the parts corresponding to each selection operation text content, so that the user can check whether the format applied to part of the text content is the same as the target text format set in the format setting window, which is helpful for the user to confirm the accuracy of the format applied to the selected content.

也就是说,在用户在格式设置窗口设置完目标文本格式之后,可以通过多次选择操作将目标文本格式应用到多个目标文本。在每次对目标文本进行选择操作以应用上述目标文本格式之前,无需对格式设置窗口执行任何操作。简化了用户通过多次操作将同一目标文本格式应用到不同目标文本的操作。That is to say, after the user finishes setting the target text format in the format setting window, the target text format can be applied to multiple target texts through multiple selection operations. There is no need to do anything with the formatting window before each selection operation on the target text to apply the above target text formatting. It simplifies the operation for users to apply the same target text formatting to different target texts through multiple operations.

本实施例中,在文档显示界面中显示文本内容和格式设置窗口;确定用户在格式设置窗口设置的目标文本格式;根据接收到的对文本内容执行的至少一次选择操作,将目标文本格式应用到各选择操作分别指示的目标文本。由于在文本内容之外提供了单独的格式设置窗口,因此使得文本格式设置过程独立于文本。文本格式编辑过程不会影响文本内容的原有格式。此外,可以将在格式设置窗口设置的目标文本格式应用到多次选择操作各自指示的目标文本,无需在一次操作结束后再次对格式设置窗口执行任何操作,就可以再次通过选择操作对文档中的其他文本应用目标文本格式,提高了批量格式化的效率。In this embodiment, the text content and the format setting window are displayed in the document display interface; the target text format set by the user in the format setting window is determined; according to at least one selection operation received on the text content, the target text format is applied to The target text indicated by each selection operation. Makes the text formatting process independent of the text by providing a separate formatting window outside of the text content. The text format editing process will not affect the original format of the text content. In addition, the target text format set in the formatting window can be applied to the target text indicated by each of the multiple selection operations, and it is not necessary to perform any operations on the formatting window again after one operation is completed. The target text format is applied to other text, which improves the efficiency of batch formatting.

请参考图2,图2为本公开实施例提供的一种文本格式设置方法的流程示意图二。该方法包括:Please refer to FIG. 2 . FIG. 2 is a second schematic flowchart of a text format setting method provided by an embodiment of the present disclosure. The method includes:

S201:在文档显示界面中显示文本内容;文档显示界面中包括第一控件。S201: Display text content on a document display interface; the document display interface includes a first control.

S202:响应于检测到对第一控件执行的触发操作,在文档显示界面中显示格式设置窗口。S202: In response to detecting a trigger operation performed on the first control, display a format setting window on the document display interface.

下面结合图3A和图3B进行说明。图3A是一个文档显示界面示意图;图3B是有一个文档显示界面示意图。The following description will be made in conjunction with FIG. 3A and FIG. 3B . FIG. 3A is a schematic diagram of a document display interface; FIG. 3B is a schematic diagram of a document display interface.

如图3A所示,文档显示界面301显示文本内容“XX…XX”,这里的“X”指代任意文字、符号和字母。文档显示界面中可以显示第一控件302。第一控件302可以包括任意文字、符号或字母。第一控件可以为用于指示显示格式设置窗口的控件。As shown in FIG. 3A , the document display interface 301 displays text content "XX...XX", where "X" refers to any text, symbol and letter. A first control 302 may be displayed in the document display interface. The first control 302 may include any text, symbol or letter. The first control may be a control for instructing to display a formatting window.

用户在需要进行格式设置时,可以对第一控件302执行触发操作,例如点击、触控等操作。当检测到用户对上述第一控件302执行了触发操作之后,如图3B所示,可以在文档显示界面301中显示格式设置窗口304。同时文档显示界面301中还显示文本内容303。在一些应用场景中,格式设置窗口与文本内容无交叠。When the user needs to set the format, he can perform a trigger operation on the first control 302, such as click, touch and other operations. After it is detected that the user performs a trigger operation on the first control 302 , as shown in FIG. 3B , a format setting window 304 may be displayed on the document display interface 301 . At the same time, text content 303 is also displayed on the document display interface 301 . In some application scenarios, the formatting window does not overlap with the text content.

可以理解的是,当在文本内容的一侧显示格式设置窗口时,在文档显示界面中触发显示了格式设置窗口之后,原来在文档显示界面中的文本内容显示区域可以变窄,从而使得可以在文档显示界面并排显示上述文本内容和格式设置窗口。It can be understood that when the format setting window is displayed on one side of the text content, after the format setting window is triggered to be displayed in the document display interface, the original text content display area in the document display interface can be narrowed, so that it can be displayed in the document display interface. The document display interface displays the above-mentioned text content and the formatting window side by side.

用户可以在所显示的格式设置窗口设置目标文本格式。The user can format the target text in the displayed formatting window.

S203:确定用户在格式设置窗口设置的目标文本格式。S203: Determine the target text format set by the user in the format setting window.

S204:响应于接收到对文本内容的多次选择操作,将目标文本格式应用到每一次选择操作对应的目标文本。S204: In response to receiving multiple selection operations on the text content, apply the target text format to the target text corresponding to each selection operation.

步骤S203和S204的具体实施可以参考图1所示实施例的相关部分,此处不赘述。For specific implementation of steps S203 and S204, reference may be made to relevant parts of the embodiment shown in FIG. 1 , and details are not described here.

S205:格式设置窗口还包括用于关闭格式设置窗口的第二控件;响应于接收到对第二控件执行的触发操作,在文档显示界面中隐藏格式设置窗口。S205: The format setting window further includes a second control for closing the format setting window; in response to receiving a trigger operation performed on the second control, the format setting window is hidden in the document display interface.

请参考图3B,格式设置窗口304中可以显示第二控件305。第二控件的标识可以包括任意文字、符号和/或字母等。第二控件可以为用于指示隐藏上述格式设置窗口的控件。Referring to FIG. 3B , a second control 305 may be displayed in the format setting window 304 . The identifier of the second control may include any text, symbol and/or letter, etc. The second control may be a control for instructing to hide the format setting window.

用户可以对第二控件执行触发操作,例如点击或触控等操作,从而在文档显示界面隐藏格式设置窗口。The user can perform a trigger operation on the second control, such as clicking or touching, so as to hide the format setting window on the document display interface.

在文档显示界面隐藏格式设置窗口之后,可以调整上述文本内容的显示区域,使得文本内容的显示区域适应整个文档显示界面。After the format setting window is hidden in the document display interface, the display area of the above text content may be adjusted so that the display area of the text content fits the entire document display interface.

与图1所示实施例相比,本实施例提供的文本格式设置方法,突出了格式设置窗口的显示与隐藏。因此,在文档显示界面中用户可以根据需要调取格式设置窗口来设置目标文本格式,并在文本内容中应用目标文本格式。在目标文本格式设置完成之后,可以隐藏上述格式设置窗口,使文本界面整体显示文本内容。也即上述格式设置窗口可以由用户根据需要进行显示与隐藏,可以改善用户体验。Compared with the embodiment shown in FIG. 1 , the text format setting method provided by this embodiment highlights the display and hiding of the format setting window. Therefore, in the document display interface, the user can invoke the format setting window as required to set the target text format, and apply the target text format to the text content. After the format setting of the target text is completed, the above format setting window can be hidden so that the text interface displays the text content as a whole. That is, the above format setting window can be displayed and hidden by the user according to needs, which can improve user experience.

请参考图4,图4为本公开实施例提供的一种文本格式设置方法的流程示意图三。该方法包括:Please refer to FIG. 4 . FIG. 4 is a third schematic flowchart of a text format setting method provided by an embodiment of the present disclosure. The method includes:

S401:在文档显示界面中显示文本内容和格式设置窗口;格式设置窗口包括:选择格式区域和预览格式区域,选择格式区域包括多个格式选项,预览格式区域用于展示用户选择的格式选项在文本上的应用效果。S401: Display text content and a format setting window in the document display interface; the format setting window includes: a selection format area and a preview format area, the selection format area includes multiple format options, and the preview format area is used to display the format options selected by the user in the text effect on the application.

下面结合图5进行说明,图5示出了格式设置窗口的一个示意图。如图5所示,格式设置窗口包括选择格式区域501和/或预览格式区域502。The following description will be made in conjunction with FIG. 5 , which shows a schematic diagram of the format setting window. As shown in FIG. 5 , the format setting window includes a format selection area 501 and/or a format preview area 502 .

选择格式区域501中可以包括多个格式选项。例如用于将文本设置为正文的格式选项“T”,用于将文本设置为一级标题的格式选项“H1”,用于将文本设置为二级标题的格式选项“H2”,用于将文本设置为三级标题的格式选项“H3”,用于将文本设置为n级标题的格式选项“Hn”,用于将文本设置为有序列表的格式选项504,用于将文本设置为无序列表的格式选项505,用于将文本进行加粗显示格式选项“B”,用于将文本设置为斜体的格式选项“I”,用于为文本设置下划线的格式选项506等等。此处描述以及图5中所示的格式选项仅为格式选项的示例性说明,并非格式选项的穷举式说明。Multiple format options may be included in the select format area 501 . For example, the formatting option "T" for setting text as body text, the formatting option "H1" for setting text as a first-level heading, the formatting option "H2" for setting text as a second-level heading, and the formatting option "H2" for setting text as a second-level heading. Formatting option "H3" for text as a level 3 heading, formatting option "Hn" for text as an n-level heading, formatting option 504 for text as an ordered list The format option 505 for the sequence table, the format option "B" for bolding the text, the format option "I" for italicizing the text, the format option 506 for underlining the text, and so on. The format options described here and shown in FIG. 5 are only exemplary descriptions of the format options, and are not exhaustive descriptions of the format options.

用户可以在选择格式区域选择一个格式选项,对应地,上述预览格式区域中的文本中可以显示用户选择的格式选项对应的格式的显示效果。The user can select a format option in the format selection area, and correspondingly, the display effect of the format corresponding to the format option selected by the user can be displayed in the text in the preview format area.

例如图5中所示,当用户点击为文本添加删除线的格式选项507后,预览格式区域502中显示的文本可以应用删除线。For example, as shown in FIG. 5 , after the user clicks the format option 507 of adding a strikethrough to the text, the text displayed in the preview format area 502 can have a strikethrough applied.

此外,上述格式设置窗口中还显示格式设置窗口标识503,格式设置窗口标识如图5中的“批量设置格式”。In addition, a format setting window logo 503 is also displayed in the above format setting window, and the format setting window logo is shown as "batch format setting" in FIG. 5 .

通过在格式设置窗口中提供选择格式区域,并在选择格式区域中提供多个格式选项供用户选择使用,从而为用户设置目标文本格式提供了方便,可以提高用户设置目标文本格式的效率。另外在格式设置窗口中提供了预览格式区域,用户可以在预览格式区域中浏览所选择的格式的应用效果,实现了在用户将目标文本格式应用在文本内容中之前,就可以预览到目标文本格式在文本中的应用效果,从而在用户确定出目标文本格式之前,文本内容中的格式不受影响。有利于实现格式设置与文本内容显示的相互独立性。避免产生由于在文本内容中进行目标文本格式设置的过程中带来的格式遗留。By providing a format selection area in the format setting window and providing multiple format options for the user to choose from in the format selection area, it is convenient for the user to set the target text format, and the efficiency of the user in setting the target text format can be improved. In addition, the preview format area is provided in the format setting window, and the user can browse the application effect of the selected format in the preview format area, so that the user can preview the target text format before applying the target text format to the text content Applies effects to text so that the formatting in the text content is not affected until the user determines the target text formatting. It is beneficial to realize the mutual independence of format setting and text content display. Avoid the format legacy caused by the process of setting the target text format in the text content.

S402:根据先后接收到的用户对选择格式区域的至少一个格式选项执行的触发操作,确定目标文本格式。S402: Determine the target text format according to successively received trigger operations performed by the user on at least one format option in the format selection area.

S403:在预览格式区域展示用户选择的格式选项在文本上的应用效果。S403: Display the application effect of the format option selected by the user on the text in the format preview area.

用户可以每一次对一个格式选项执行触发操作,从而选择该次格式选项对应的格式作为目标文本格式的组成部分。The user can perform a trigger operation on a format option each time, so as to select the format corresponding to the sub-format option as a component of the target text format.

需要理解的是,目标文本格式可以包括单个格式,也可以包括多个格式组合而成的组合格式。It should be understood that the target text format may include a single format, or a combined format formed by combining multiple formats.

可以根据用户多次对不同格式选项执行的触发操作来确定目标文本格式。The target text format can be determined based on multiple user trigger actions on different formatting options.

若用户对一个格式选项执行了偶数次触发操作,则该格式选项对应格式将不被确定为目标文本格式的组成部分。若用户对一个格式选项执行了奇数次触发操作,则将该格式选项对应格式确定为目标文本格式的组成部分。If the user performs an even number of trigger operations on a format option, the format corresponding to the format option will not be determined as a component of the target text format. If the user performs an odd number of trigger operations on a format option, the format corresponding to the format option is determined as a component of the target text format.

可以将用户多次触发操作分别对应的不同格式选项分别指示的格式进行组合,得到目标文本格式。The formats indicated by the different format options corresponding to the user's multiple trigger operations may be combined to obtain the target text format.

若至少一个格式选项包括不同类别的格式选项,将至少一个格式选项各自对应的格式进行组合,得到目标文本格式。If at least one format option includes format options of different categories, the formats corresponding to at least one format option are combined to obtain the target text format.

在一些实施例中,若用户多次触发操作对应同一类别的格式,则将用户最后一次触发操作对应的该类别的格式作为目标文本格式的组成部分。In some embodiments, if the user triggers the operation multiple times and corresponds to the same category of formats, the format of the category corresponding to the user's last trigger operation is used as a component of the target text format.

示意性地,若用户先后对格式选项“H1”和格式选项“H2”执行了触发操作,则将格式选项“H2”对应的格式“二级标题”作为目标文本格式的组成部分。Schematically, if the user successively executes trigger operations on the format option "H1" and the format option "H2", the format "secondary title" corresponding to the format option "H2" is used as a component of the target text format.

示意性地,若至少一个格式选项包括“T”、“B”和应用背景色的格式选项,则将“T”格式选项指示的正文格式、“B”格式选项指示的加粗格式以及应用背景色格式的组合,得到目标文本格式。Schematically, if at least one formatting option includes "T", "B" and the formatting option of applying background color, the text format indicated by the "T" formatting option, the bold formatting indicated by the "B" formatting option, and the applying background color combination of color formats to get the target text format.

可以理解的是,用户每对一个格式选项执行触发操作,可以在预览格式区域显示该触发操作对应的格式应用效果。例如将该次对应的格式与历史效果叠加应用在预设区域的文本上。It can be understood that, each time the user performs a trigger operation on a format option, the format application effect corresponding to the trigger operation may be displayed in the preview format area. For example, the corresponding formatting and historical effects are superimposed and applied to the text in the preset area.

在这些实施例中,通过由用户触发的不同类别的格式来确定目标文本格式,可以使得用户在将各个格式应用到文本内容之前,结合预览区域的格式预览效果确定用户需要的目标文本格式。可以改善用户体验。In these embodiments, the target text format is determined by different types of formats triggered by the user, so that the user can determine the target text format required by the user in combination with the format preview effect in the preview area before applying each format to the text content. Can improve user experience.

在一些实施例中,若一格式选项被触发后,在选择格式区域中,突出显示该格式选项。In some embodiments, if a format option is triggered, the format option is highlighted in the format selection area.

示意性地,上述突出显示该格式选项,包括增加该格式选项的显示区域的面积。Schematically, the aforementioned highlighting of the format option includes increasing the area of the display area of the format option.

示意性地,上述突出显示该格式选项,包括将该格式选项的标识的显示颜色设置为与其他未被触发的格式选项的标识不同的显示颜色。Schematically, the aforementioned highlighting of the format option includes setting the display color of the identifier of the format option to a different display color from the identifiers of other untriggered format options.

在这些实施例中,通过突出显示被触发的格式选项,可以使得用户了解哪些格式已经被应用为目标文本格式的组成部分。便于用户确定是否继续使用其他格式或者修订已经应用的格式。In these embodiments, by highlighting the triggered formatting options, the user may be made aware of which formatting has been applied as part of the target text formatting. Allows the user to determine whether to continue using another format or to revise a format that has already been applied.

在一些实施例中,若一格式选项被触发后,将该格式选项的背景色显示为与未被触发的其他格式选项的背景色不同的颜色。In some embodiments, if a format option is triggered, the background color of the format option is displayed as a color different from the background colors of other format options that are not triggered.

示意性地,在选择格式区域中,未被选择的格式选项的背景色显示为第一颜色。被触发的格式选项的背景色显示为第二颜色。Schematically, in the format selection area, the background color of the unselected format options is displayed as the first color. The background color of the triggered formatting option is displayed as the second color.

这里第一颜色和第二颜色可以不同的颜色。第一颜色和第二颜色可以为各种颜色。Here the first color and the second color may be different colors. The first color and the second color may be various colors.

示意性地,格式选项“B”在被触发操作触发之前,格式选项“B”的背景色显示为灰色或白色。在被触发后,格式选项“B”的背景色显示为黄色。Schematically, before the format option "B" is triggered by the trigger operation, the background color of the format option "B" is displayed as gray or white. When triggered, the format option "B" has a yellow background color.

在这些实施例中,通过将该格式选项的背景色显示为与未被触发的其他格式选项的背景色不同的颜色,使得用户可以通过背景色快速了解哪些格式已经被选择,哪些还没有被选择。便于用户确定是否继续使用其他格式或者修订已经应用的格式。有利于提高目标文本格式的设置效率。In these embodiments, by displaying the background color of the format option as a different color from the background colors of other format options that have not been triggered, the user can quickly understand which formats have been selected and which have not been selected through the background color . Allows the user to determine whether to continue using another format or to revise a format that has already been applied. It is beneficial to improve the setting efficiency of the target text format.

S404:响应于接收到对文本内容的多次选择操作,将目标文本格式应用到每一次选择操作对应的目标文本。S404: In response to receiving multiple selection operations on the text content, apply the target text format to the target text corresponding to each selection operation.

步骤S404的具体实施可以参考图1所示的步骤S103,此处不赘述。For the specific implementation of step S404, reference may be made to step S103 shown in FIG. 1 , which will not be repeated here.

与图1所示实施例相比,本实施例提供的文本格式设置方法,突出了根据格式设置窗口提供的格式选项设置目标文本格式,并提供目标文本格式的预览效果。提高了用户在格式设置窗口中设置目标文本格式的效率,有利于提高在文本内容中应用目标文本格式的效率。Compared with the embodiment shown in FIG. 1 , the text format setting method provided by this embodiment highlights the setting of the target text format according to the format options provided in the format setting window, and provides a preview effect of the target text format. The efficiency of setting the target text format in the format setting window is improved, which is beneficial to improve the efficiency of applying the target text format in the text content.

在图1、图2和图4所示的文本格式设置方法的一些可选的实现方式中,格式设置窗口还包括用于指示应用格式的格式应用开关;以及In some optional implementations of the text format setting methods shown in FIG. 1, FIG. 2 and FIG. 4, the format setting window further includes a format application switch for indicating the application format; and

图1中的步骤S103、图2中的步骤S204以及图4中的步骤S404,可以包括:Step S103 in FIG. 1, step S204 in FIG. 2 and step S404 in FIG. 4 may include:

响应于检测到格式应用开关处于打开状态,根据用户对文本内容执行的至少一次选择操作,将目标文本格式应用到各选择操作分别指示的目标文本In response to detecting that the format application switch is in an open state, according to at least one selection operation performed by the user on the text content, applying the target text format to the target text respectively indicated by each selection operation

请参考图6,图6为格式设置窗口一个示意图。在格式设置窗口中,包括格式应用开关601。用户通过在选择格式区域对格式选项执行触发操作来选择格式,和在预览格式区域浏览格式应用效果的互相配合下,最后确定目标文本格式。在设置了目标文本格式之后,可以打开应用开关,也即将应用开关设置为打开状态。在应用开关打开状态下,用户可以对文本内容中的文本应用目标文本格式。Please refer to FIG. 6, which is a schematic diagram of the format setting window. In the format setting window, a format application switch 601 is included. The user selects the format by performing a trigger operation on the format option in the format selection area, and cooperates with browsing the application effect of the format in the format preview area to finally determine the target text format. After the target text format is set, the application switch can be turned on, that is, the application switch is set to an on state. When the apply switch is turned on, the user can apply the target text format to the text in the text content.

可以理解的是,用户可以在对格式选项执行触发操作之前打开上述格式应用开关,也可以在用户设置完目标文本格式之后打开上述格式应用开关。It can be understood that, the user may turn on the above-mentioned format application switch before performing a trigger operation on the format option, or may turn on the above-mentioned format application switch after the user finishes setting the target text format.

在应用开关处于打开状态时,用户可以对文本内容执行选择操作,从而将目标文本格式应用于选择操作指示的目标文本。When the apply switch is on, the user can perform a selection operation on the text content, thereby applying the target text formatting to the target text indicated by the selection operation.

可以理解的是,用户还可以关闭应用开关。也就是说,将应用开关设置为关闭状态。当应用开关处于关闭状态时,用户无法对文本内容中的任意文本应用格式设置窗口中的格式。It is understandable that the user can also turn off the application switch. That is, set the app switch to off. When the Apply switch is off, users cannot apply formatting in the formatting window to any text in the text content.

在这些实施例中,通过在格式设置窗口中设置格式应用开关,由用户对该应用开关进行操作来打开或关闭应用开关,进而控制是否在文本内容中应用目标文本格式。有利于实现目标文本格式应用的可控性,可以改善用户体验。In these embodiments, by setting a format application switch in the format setting window, the user operates the application switch to turn on or off the application switch, thereby controlling whether to apply the target text format to the text content. It is beneficial to realize the controllability of the application of the target text format, and can improve the user experience.

对应于上文实施例的文本格式设置方法,图7为本公开实施例提供的文本格式设置装置的结构框图。为了便于说明,仅示出了与本公开实施例相关的部分。参照图7,装置70包括:显示单元701、确定单元702和应用单元703。其中:Corresponding to the text format setting method in the above embodiments, FIG. 7 is a structural block diagram of a text format setting device provided in an embodiment of the present disclosure. For ease of description, only the parts related to the embodiments of the present disclosure are shown. Referring to FIG. 7 , the device 70 includes: a display unit 701 , a determination unit 702 and an application unit 703 . in:

显示单元701,用于在文档显示界面中显示文本内容和格式设置窗口;A display unit 701, configured to display text content and a format setting window in the document display interface;

确定单元702,用于确定用户在格式设置窗口设置的目标文本格式;A determining unit 702, configured to determine the target text format set by the user in the format setting window;

应用单元703,用于响应于接收到对文本内容的多次选择操作,将目标文本格式应用到每一次选择操作对应的目标文本。The application unit 703 is configured to apply the target text format to the target text corresponding to each selection operation in response to receiving multiple selection operations on the text content.

在本公开的一些实施例中,格式设置窗口设置在文本内容一侧。In some embodiments of the present disclosure, the format setting window is set on the side of the text content.

在本公开的一些实施例中,显示单元701进一步用于:In some embodiments of the present disclosure, the display unit 701 is further used for:

在文档显示界面中显示文本内容;文档显示界面中包括第一控件;Display text content in the document display interface; the document display interface includes a first control;

响应于检测到对第一控件执行的触发操作,在文档显示界面中显示格式设置窗口。In response to detecting a trigger operation performed on the first control, a format setting window is displayed in the document display interface.

在本公开的一些实施例中,格式设置窗口包括:选择格式区域和/或预览格式区域,其中:In some embodiments of the present disclosure, the formatting window includes: a selection format area and/or a preview format area, wherein:

选择格式区域包括多个格式选项;The Select Format area includes several formatting options;

预览格式区域用于展示用户选择的格式选项在文本上的应用效果。The preview formatting area is used to show the effect of the formatting options selected by the user on the text.

在本公开的一些实施例中,显示单元701进一步用于:In some embodiments of the present disclosure, the display unit 701 is further used for:

若一格式选项被触发后,在选择格式区域中,突出显示该格式选项。If a format option is triggered, highlight the format option in the format selection area.

在本公开的一些实施例中,显示单元701进一步用于:将该格式选项的背景色显示为与未被触发的其他格式选项的背景色不同的颜色。在本公开的一些实施例中,格式设置窗口还包括用于关闭格式设置窗口的第二控件;显示单元701进一步用于:响应于接收到对第二控件执行的触发操作,在文档显示界面中隐藏格式设置窗口。In some embodiments of the present disclosure, the display unit 701 is further configured to: display the background color of the format option as a color different from the background colors of other format options that are not triggered. In some embodiments of the present disclosure, the format setting window further includes a second control for closing the format setting window; the display unit 701 is further configured to: in response to receiving a trigger operation performed on the second control, in the document display interface Hides the formatting window.

在本公开的一些实施例中,确定单元702进一步用于:根据先后接收到的用户对选择格式区域的至少一个格式选项执行的触发操作,确定目标文本格式。In some embodiments of the present disclosure, the determining unit 702 is further configured to: determine the target text format according to successively received trigger operations performed by the user on at least one format option in the format selection area.

在本公开的一些实施例中,确定单元702进一步用于:若至少一个格式选项包括不同类别的格式选项,将至少一个格式选项各自对应的格式进行组合,得到目标文本格式。In some embodiments of the present disclosure, the determining unit 702 is further configured to: if at least one format option includes format options of different categories, combine the formats corresponding to each of the at least one format option to obtain the target text format.

在本公开的一些实施例中,装置70还包括显示单元(图中未示出),显示单元用于:在预览格式区域显示显示目标文本格式的应用效果。In some embodiments of the present disclosure, the device 70 further includes a display unit (not shown in the figure), and the display unit is configured to: display the application effect of the target text format in the preview format area.

在本公开的一些实施例中,格式设置窗口还包括用于指示应用格式的格式应用开关;应用单元703进一步用于:In some embodiments of the present disclosure, the format setting window further includes a format application switch for indicating the application format; the application unit 703 is further used to:

响应于检测到格式应用开关处于打开状态,根据接收到的对文本内容执行的至少一次选择操作,将目标文本格式应用到各选择操作分别指示的目标文本。In response to detecting that the format application switch is in an open state, according to at least one received selection operation performed on the text content, the target text format is applied to the target text respectively indicated by each selection operation.

在本公开的一些实施例中,应用单元703进一步用于:响应于接收到对文本内容中的第一内容的选择操作,将第一内容的格式变更为目标文本格式;以及,响应于接收到对文本内容中的第二内容的选择操作,将第二内容的格式变更为目标文本格式。In some embodiments of the present disclosure, the application unit 703 is further configured to: change the format of the first content to the target text format in response to receiving a selection operation on the first content in the text content; and, in response to receiving The selection operation on the second content in the text content changes the format of the second content to the target text format.

在本公开的一些实施例中,应用单元703进一步用于:在显示格式设置窗口的同时,接收对文本内容的多次选择操作,并将目标文本格式应用到每一次选择操作对应的目标文本。In some embodiments of the present disclosure, the application unit 703 is further configured to: receive multiple selection operations on text content while displaying the format setting window, and apply the target text format to the target text corresponding to each selection operation.

为了实现上述实施例,本公开实施例还提供了一种电子设备。In order to realize the foregoing embodiments, the embodiments of the present disclosure further provide an electronic device.

参考图8,其示出了适于用来实现本公开实施例的电子设备800的结构示意图,该电子设备800可以为各种终端设备、服务器。其中,终端设备可以包括但不限于诸如移动电话、笔记本电脑、数字广播接收器、个人数字助理(Personal Digital Assistant,简称PDA)、平板电脑(Portable Android Device,简称PAD)、便携式多媒体播放器(PortableMedia Player,简称PMP)、车载终端(例如车载导航终端)等等的移动终端以及诸如数字TV、台式计算机等等的固定终端。等。图8示出的电子设备仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。Referring to FIG. 8 , it shows a schematic structural diagram of an electronic device 800 suitable for implementing the embodiments of the present disclosure. The electronic device 800 may be various terminal devices and servers. Wherein, the terminal equipment may include but not limited to mobile phones, notebook computers, digital broadcast receivers, personal digital assistants (Personal Digital Assistant, PDA for short), tablet computers (Portable Android Device, PAD for short), portable multimedia players (PortableMedia Player, PMP for short), mobile terminals such as vehicle-mounted terminals (such as vehicle-mounted navigation terminals), and fixed terminals such as digital TVs and desktop computers. wait. The electronic device shown in FIG. 8 is only an example, and should not limit the functions and scope of use of the embodiments of the present disclosure.

如图8所示,电子设备800可以包括处理装置(例如中央处理器、图形处理器等)801,其可以根据存储在只读存储器(Read Only Memory,简称ROM)802中的程序或者从存储装置808加载到随机访问存储器(Random Access Memory,简称RAM)803中的程序而执行各种适当的动作和处理。在RAM 803中,还存储有电子设备800操作所需的各种程序和数据。处理装置801、ROM 802以及RAM 803通过总线804彼此相连。输入/输出(I/O)接口805也连接至总线804。As shown in FIG. 8, an electronic device 800 may include a processing device (such as a central processing unit, a graphics processing unit, etc.) 801, which may be stored in a program in a read-only memory (Read Only Memory, ROM for short) 802 or from a storage device. 808 is loaded into a random access memory (Random Access Memory, RAM for short) 803 to execute various appropriate actions and processes. In the RAM 803, various programs and data necessary for the operation of the electronic device 800 are also stored. The processing device 801 , ROM 802 , and RAM 803 are connected to each other through a bus 804 . An input/output (I/O) interface 805 is also connected to the bus 804 .

通常,以下装置可以连接至I/O接口805:包括例如触摸屏、触摸板、键盘、鼠标、摄像头、麦克风、加速度计、陀螺仪等的输入装置806;包括例如液晶显示器(Liquid CrystalDisplay,简称LCD)、扬声器、振动器等的输出装置807;包括例如磁带、硬盘等的存储装置808;以及通信装置809。通信装置809可以允许电子设备800与其他设备进行无线或有线通信以交换数据。虽然图8示出了具有各种装置的电子设备800,但是应理解的是,并不要求实施或具备所有示出的装置。可以替代地实施或具备更多或更少的装置。Generally, the following devices can be connected to the I/O interface 805: input devices 806 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; including, for example, a liquid crystal display (Liquid Crystal Display, LCD for short) , an output device 807 such as a speaker, a vibrator, etc.; a storage device 808 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 809. The communication means 809 may allow the electronic device 800 to communicate with other devices wirelessly or by wire to exchange data. While FIG. 8 shows electronic device 800 having various means, it is to be understood that implementing or having all of the means shown is not a requirement. More or fewer means may alternatively be implemented or provided.

特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信装置809从网络上被下载和安装,或者从存储装置808被安装,或者从ROM802被安装。在该计算机程序被处理装置801执行时,执行本公开实施例的方法中限定的上述功能。In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer-readable medium, where the computer program includes program codes for executing the methods shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via communication means 809 , or from storage means 808 , or from ROM 802 . When the computer program is executed by the processing device 801, the above-mentioned functions defined in the methods of the embodiments of the present disclosure are performed.

需要说明的是,本公开上述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、RF(射频)等等,或者上述的任意合适的组合。It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, electrical connections with one or more wires, portable computer diskettes, hard disks, random access memory (RAM), read-only memory (ROM), erasable Programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present disclosure, however, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave carrying computer-readable program code therein. Such propagated data signals may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which can transmit, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device . Program code embodied on a computer readable medium may be transmitted by any appropriate medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

上述计算机可读介质可以是上述电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。The above-mentioned computer-readable medium may be included in the above-mentioned electronic device, or may exist independently without being incorporated into the electronic device.

上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该电子设备执行时,使得该电子设备执行上述实施例所示的方法。The above-mentioned computer-readable medium carries one or more programs, and when the above-mentioned one or more programs are executed by the electronic device, the electronic device is made to execute the methods shown in the above-mentioned embodiments.

可以以一种或多种程序设计语言或其组合来编写用于执行本公开的操作的计算机程序代码,上述程序设计语言包括面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LocalArea Network,简称LAN)或广域网(Wide Area Network,简称WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。Computer program code for carrying out the operations of the present disclosure can be written in one or more programming languages, or combinations thereof, including object-oriented programming languages—such as Java, Smalltalk, C++, and conventional Procedural Programming Language - such as "C" or a similar programming language. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In cases involving a remote computer, the remote computer can be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or it can be connected to an external computer (e.g. using an Internet Service Provider to connect via the Internet).

附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, program segment, or portion of code that contains one or more logical functions for implementing specified executable instructions. It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved. It should also be noted that each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented by a dedicated hardware-based system that performs the specified functions or operations , or may be implemented by a combination of dedicated hardware and computer instructions.

描述于本公开实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方式来实现。其中,单元的名称在某种情况下并不构成对该单元本身的限定,例如,显示单元还可以被描述为“在文档显示界面中显示文本内容和格式设置窗口的单元”。The units involved in the embodiments described in the present disclosure may be implemented by software or by hardware. Wherein, the name of the unit does not constitute a limitation on the unit itself under certain circumstances, for example, the display unit can also be described as “a unit that displays text content and a format setting window in the document display interface”.

本文中以上描述的功能可以至少部分地由一个或多个硬件逻辑部件来执行。例如,非限制性地,可以使用的示范类型的硬件逻辑部件包括:现场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准产品(ASSP)、片上系统(SOC)、复杂可编程逻辑设备(CPLD)等等。The functions described herein above may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), System on Chips (SOCs), Complex Programmable Logical device (CPLD) and so on.

在本公开的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media would include one or more wire-based electrical connections, portable computer discs, hard drives, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, compact disk read only memory (CD-ROM), optical storage, magnetic storage, or any suitable combination of the foregoing.

第一方面,根据本公开的一个或多个实施例,提供了一种文本格式设置方法,包括:In a first aspect, according to one or more embodiments of the present disclosure, a text formatting method is provided, including:

在文档显示界面中显示文本内容和格式设置窗口;Display the text content and format setting window in the document display interface;

确定用户在格式设置窗口设置的目标文本格式;Determine the target text format set by the user in the format setting window;

响应于接收到对文本内容的多次选择操作,将目标文本格式应用到每一次选择操作对应的目标文本。In response to receiving multiple selection operations on the text content, the target text format is applied to the target text corresponding to each selection operation.

根据本公开的一个或多个实施例,格式设置窗口设置在文本内容一侧。According to one or more embodiments of the present disclosure, the format setting window is set on one side of the text content.

根据本公开的一个或多个实施例,在文档显示界面中显示文本内容和格式设置窗口,包括:According to one or more embodiments of the present disclosure, displaying text content and a format setting window in the document display interface includes:

在文档显示界面中显示文本内容;文档显示界面中包括第一控件;Display text content in the document display interface; the document display interface includes a first control;

响应于检测到对第一控件执行的触发操作,在文档显示界面中显示格式设置窗口。In response to detecting a trigger operation performed on the first control, a format setting window is displayed in the document display interface.

根据本公开的一个或多个实施例,格式设置窗口包括:选择格式区域和/或预览格式区域,其中:According to one or more embodiments of the present disclosure, the formatting window includes: a selection format area and/or a preview format area, wherein:

选择格式区域包括多个格式选项;The Select Format area includes several formatting options;

预览格式区域用于展示用户选择的格式选项在文本上的应用效果。The preview formatting area is used to show the effect of the formatting options selected by the user on the text.

根据本公开的一个或多个实施例,该方法还包括:若一格式选项被触发后,在选择格式区域中,突出显示该格式选项。According to one or more embodiments of the present disclosure, the method further includes: if a format option is triggered, highlighting the format option in the format selection area.

根据本公开的一个或多个实施例,突出显示该格式选项包括:According to one or more embodiments of the present disclosure, highlighting the formatting options includes:

将该格式选项的背景色显示为与未被触发的其他格式选项的背景色不同的颜色。根据本公开的一个或多个实施例,格式设置窗口还包括用于关闭格式设置窗口的第二控件;Displays the background color of this formatting option as a different color than the background color of other formatting options that are not triggered. According to one or more embodiments of the present disclosure, the formatting window further includes a second control for closing the formatting window;

以及该方法还包括:and the method also includes:

响应于接收到对第二控件执行的触发操作,在文档显示界面中隐藏格式设置窗口。In response to receiving the trigger operation performed on the second control, the formatting window is hidden in the document display interface.

根据本公开的一个或多个实施例,确定用户在格式设置窗口中设置的目标文本格式,包括:According to one or more embodiments of the present disclosure, determining the target text format set by the user in the format setting window includes:

根据先后接收到的用户对至少一个格式选项执行的触发操作,确定目标文本格式。Determine the target text format according to successively received trigger operations performed by the user on at least one format option.

根据本公开的一个或多个实施例,根据先后接收到的用户对至少一个格式选项执行的触发操作,确定目标文本格式,包括:According to one or more embodiments of the present disclosure, the target text format is determined according to successively received trigger operations performed by the user on at least one format option, including:

若至少一个格式选项包括不同类别的格式选项,将至少一个格式选项各自对应的格式进行组合,得到目标文本格式。If at least one format option includes format options of different categories, the formats corresponding to at least one format option are combined to obtain the target text format.

根据本公开的一个或多个实施例,该方法还包括:在预览格式区域显示显示目标文本格式的应用效果。According to one or more embodiments of the present disclosure, the method further includes: displaying an application effect of the target text format in the preview format area.

根据本公开的一个或多个实施例,格式设置窗口还包括格式应用开关;以及According to one or more embodiments of the present disclosure, the format setting window further includes a format application switch; and

根据接收到的对文档中的文本执行的选择操作,将目标文本格式应用到选择操作指示的目标文本,包括:Applies the target text formatting to the target text indicated by the selection operation according to the received selection operation performed on the text in the document, including:

响应于检测到格式应用开关处于打开状态,根据接收到的对文本内容执行的至少一次选择操作,将目标文本格式应用到各选择操作分别指示的目标文本。In response to detecting that the format application switch is in an open state, according to at least one received selection operation performed on the text content, the target text format is applied to the target text respectively indicated by each selection operation.

根据本公开的一个或多个实施例,响应于接收到对文本内容的多次选择操作,将目标文本格式应用到每一次选择操作对应的目标文本,包括:According to one or more embodiments of the present disclosure, in response to receiving multiple selection operations on the text content, applying the target text format to the target text corresponding to each selection operation includes:

响应于接收到对文本内容中的第一内容的选择操作,将第一内容的格式变更为目标文本格式;以及,响应于接收到对文本内容中的第二内容的选择操作,将第二内容的格式变更为目标文本格式。In response to receiving a selection operation on the first content in the text content, changing the format of the first content to a target text format; and in response to receiving a selection operation on the second content in the text content, changing the format of the second content to The format of is changed to the target text format.

根据本公开的一个或多个实施例,响应于接收到对文本内容的多次选择操作,将目标文本格式应用到每一次选择操作对应的目标文本,包括:According to one or more embodiments of the present disclosure, in response to receiving multiple selection operations on the text content, applying the target text format to the target text corresponding to each selection operation includes:

在显示格式设置窗口的同时,接收对文本内容的多次选择操作,并将目标文本格式应用到每一次选择操作对应的目标文本。While displaying the format setting window, multiple selection operations on the text content are received, and the target text format is applied to the target text corresponding to each selection operation.

第二方面,根据本公开的一个或多个实施例,提供了一种文本格式设置装置,包括:In a second aspect, according to one or more embodiments of the present disclosure, a text formatting device is provided, including:

显示单元,用于在文档显示界面中显示文本内容和格式设置窗口;a display unit, configured to display text content and a format setting window in the document display interface;

确定单元,用于确定用户在格式设置窗口设置的目标文本格式;Determination unit, used to determine the target text format set by the user in the format setting window;

应用单元,用于响应于接收到对文本内容的多次选择操作,将目标文本格式应用到每一次选择操作对应的目标文本。The application unit is configured to apply the target text format to the target text corresponding to each selection operation in response to receiving multiple selection operations on the text content.

根据本公开的一个或多个实施例,格式设置窗口设置在文本内容一侧。According to one or more embodiments of the present disclosure, the format setting window is set on one side of the text content.

根据本公开的一个或多个实施例,显示单元进一步用于:According to one or more embodiments of the present disclosure, the display unit is further used for:

在文档显示界面中显示文本内容;文档显示界面中包括第一控件;Display text content in the document display interface; the document display interface includes a first control;

响应于检测到对第一控件执行的触发操作,在文档显示界面中显示格式设置窗口。In response to detecting a trigger operation performed on the first control, a format setting window is displayed in the document display interface.

根据本公开的一个或多个实施例,格式设置窗口包括:选择格式区域和/或预览格式区域,其中:According to one or more embodiments of the present disclosure, the formatting window includes: a selection format area and/or a preview format area, wherein:

选择格式区域包括多个格式选项;The Select Format area includes several formatting options;

预览格式区域用于展示用户选择的格式选项在文本上的应用效果。The preview formatting area is used to show the effect of the formatting options selected by the user on the text.

根据本公开的一个或多个实施例,显示单元进一步用于:According to one or more embodiments of the present disclosure, the display unit is further used for:

若一格式选项被触发后,在选择格式区域中,突出显示该格式选项。If a format option is triggered, highlight the format option in the format selection area.

根据本公开的一个或多个实施例,显示单元进一步用于:将该格式选项的背景色显示为与未被触发的其他格式选项的背景色不同的颜色。根据本公开的一个或多个实施例,格式设置窗口还包括用于关闭格式设置窗口的第二控件;显示单元进一步用于:响应于接收到对第二控件执行的触发操作,在文档显示界面中隐藏格式设置窗口。According to one or more embodiments of the present disclosure, the display unit is further configured to: display the background color of the format option as a color different from the background colors of other format options that are not triggered. According to one or more embodiments of the present disclosure, the format setting window further includes a second control for closing the format setting window; the display unit is further configured to: in response to receiving a trigger operation performed on the second control, display the document on the document display interface to hide the formatting window.

根据本公开的一个或多个实施例,确定单元进一步用于:根据先后接收到的用户对选择格式区域的至少一个格式选项执行的触发操作,确定目标文本格式。According to one or more embodiments of the present disclosure, the determining unit is further configured to: determine the target text format according to successively received trigger operations performed by the user on at least one format option in the format selection area.

根据本公开的一个或多个实施例,确定单元进一步用于:若至少一个格式选项包括不同类别的格式选项,将至少一个格式选项各自对应的格式进行组合,得到目标文本格式。According to one or more embodiments of the present disclosure, the determining unit is further configured to: if at least one format option includes format options of different categories, combine formats corresponding to each of the at least one format option to obtain a target text format.

根据本公开的一个或多个实施例,该装置还包括显示单元,显示单元用于:在预览格式区域显示显示目标文本格式的应用效果。According to one or more embodiments of the present disclosure, the device further includes a display unit configured to: display an application effect of the target text format in the preview format area.

根据本公开的一个或多个实施例,格式设置窗口还包括用于指示应用格式的格式应用开关;应用单元进一步用于:According to one or more embodiments of the present disclosure, the format setting window further includes a format application switch for indicating the application format; the application unit is further used for:

响应于检测到格式应用开关处于打开状态,根据接收到的对文本内容执行的至少一次选择操作,将目标文本格式应用到各选择操作分别指示的目标文本。In response to detecting that the format application switch is in an open state, according to at least one received selection operation performed on the text content, the target text format is applied to the target text respectively indicated by each selection operation.

根据本公开的一个或多个实施例,应用单元进一步用于:响应于接收到对文本内容中的第一内容的选择操作,将第一内容的格式变更为目标文本格式;以及,响应于接收到对文本内容中的第二内容的选择操作,将第二内容的格式变更为目标文本格式。根据本公开的一个或多个实施例,应用单元进一步用于:在显示格式设置窗口的同时,接收对文本内容的多次选择操作,并将目标文本格式应用到每一次选择操作对应的目标文本。According to one or more embodiments of the present disclosure, the application unit is further configured to: in response to receiving a selection operation on the first content in the text content, change the format of the first content to the target text format; and, in response to receiving To the selection operation of the second content in the text content, the format of the second content is changed to the target text format. According to one or more embodiments of the present disclosure, the application unit is further configured to: while displaying the format setting window, receive multiple selection operations on the text content, and apply the target text format to the target text corresponding to each selection operation .

第三方面,根据本公开的一个或多个实施例,提供了一种电子设备,包括:至少一个处理器和存储器;In a third aspect, according to one or more embodiments of the present disclosure, an electronic device is provided, including: at least one processor and a memory;

存储器存储计算机执行指令;the memory stores computer-executable instructions;

至少一个处理器执行存储器存储的计算机执行指令,使得至少一个处理器执行如上第一方面以及第一方面各种可能涉及的文本格式设置方法。At least one processor executes the computer-executed instructions stored in the memory, so that the at least one processor executes the above first aspect and various text format setting methods that may be involved in the first aspect.

第四方面,根据本公开的一个或多个实施例,提供了一种计算机可读存储介质,计算机可读存储介质中存储有计算机执行指令,当处理器执行计算机执行指令时,实现如上第一方面以及第一方面各种可能涉及的文本格式设置方法。In the fourth aspect, according to one or more embodiments of the present disclosure, there is provided a computer-readable storage medium, in which computer-executable instructions are stored, and when the processor executes the computer-executable instructions, the above first Aspect and various text formatting methods that may be involved in the first aspect.

第五方面,根据本公开的一个或多个实施例,提供了一种计算机程序产品,包括计算机程序,计算机程序被处理器执行时实现如上第一方面以及第一方面各种可能涉及的文本格式设置方法。In the fifth aspect, according to one or more embodiments of the present disclosure, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the above first aspect and various text formats that may be involved in the first aspect are realized. Setting method.

以上描述仅为本公开的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本公开中所涉及的公开范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离上述公开构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本公开中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。The above description is only a preferred embodiment of the present disclosure and an illustration of the applied technical principles. Those skilled in the art should understand that the disclosure scope involved in this disclosure is not limited to the technical solution formed by the specific combination of the above-mentioned technical features, but also covers the technical solutions formed by the above-mentioned technical features or Other technical solutions formed by any combination of equivalent features. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this disclosure.

此外,虽然采用特定次序描绘了各操作,但是这不应当理解为要求这些操作以所示出的特定次序或以顺序次序执行来执行。在一定环境下,多任务和并行处理可能是有利的。同样地,虽然在上面论述中包含了若干具体实现细节,但是这些不应当被解释为对本公开的范围的限制。在单独的实施例的上下文中描述的某些特征还可以组合地实现在单个实施例中。相反地,在单个实施例的上下文中描述的各种特征也可以单独地或以任何合适的子组合的方式实现在多个实施例中。In addition, while operations are depicted in a particular order, this should not be understood as requiring that the operations be performed in the particular order shown or performed in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while the above discussion contains several specific implementation details, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.

尽管已经采用特定于结构特征和/或方法逻辑动作的语言描述了本主题,但是应当理解所附权利要求书中所限定的主题未必局限于上面描述的特定特征或动作。相反,上面所描述的特定特征和动作仅仅是实现权利要求书的示例形式。Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims.

Claims (17)

1.一种文本格式设置方法,包括:1. A text formatting method, comprising: 在文档显示界面中显示文本内容和格式设置窗口;Display the text content and format setting window in the document display interface; 确定用户在格式设置窗口设置的目标文本格式;Determine the target text format set by the user in the format setting window; 响应于接收到对所述文本内容的多次选择操作,将所述目标文本格式应用到每一次选择操作对应的目标文本。In response to receiving multiple selection operations on the text content, the target text format is applied to the target text corresponding to each selection operation. 2.根据权利要求1所述的方法,其特征在于,所述格式设置窗口设置在所述文本内容一侧。2. The method according to claim 1, wherein the format setting window is set on one side of the text content. 3.根据权利要求1所述的方法,其特征在于,所述在文档显示界面中显示文本内容和格式设置窗口,包括:3. The method according to claim 1, wherein the displaying the text content and the formatting window in the document display interface comprises: 在文档显示界面中显示文本内容;所述文档显示界面中包括第一控件;displaying text content in the document display interface; the document display interface includes a first control; 响应于检测到对所述第一控件执行的触发操作,在所述文档显示界面中显示所述格式设置窗口。In response to detecting a trigger operation performed on the first control, the format setting window is displayed in the document display interface. 4.根据权利要求1所述的方法,其特征在于,所述格式设置窗口包括:选择格式区域和/或预览格式区域,其中:4. The method according to claim 1, wherein the format setting window includes: select a format area and/or preview a format area, wherein: 所述选择格式区域包括多个格式选项;The selection format area includes a plurality of format options; 所述预览格式区域用于展示用户选择的格式选项在文本上的应用效果。The format preview area is used to display the application effect of the format option selected by the user on the text. 5.根据权利要求4所述的方法,其特征在于,所述方法还包括:5. method according to claim 4, is characterized in that, described method also comprises: 若一格式选项被触发后,在选择格式区域中,突出显示该格式选项。If a format option is triggered, highlight the format option in the format selection area. 6.根据权利要求5所述的方法,其特征在于,所述突出显示该格式选项包括:6. The method according to claim 5, wherein said highlighting the format option comprises: 将该格式选项的背景色显示为与未被触发的其他格式选项的背景色不同的颜色。Displays the background color of this formatting option as a different color than the background color of other formatting options that are not triggered. 7.根据权利要求1所述的方法,其特征在于,所述格式设置窗口还包括用于关闭所述格式设置窗口的第二控件;7. The method according to claim 1, wherein the format setting window further comprises a second control for closing the format setting window; 以及所述方法还包括:And the method also includes: 响应于接收到对所述第二控件执行的触发操作,在所述文档显示界面中隐藏所述格式设置窗口。In response to receiving a trigger operation performed on the second control, the format setting window is hidden in the document display interface. 8.根据权利要求4所述的方法,其特征在于,所述确定用户在格式设置窗口中设置的目标文本格式,包括:8. The method according to claim 4, wherein said determining the target text format that the user sets in the format setting window comprises: 根据先后接收到的用户对至少一个所述格式选项执行的触发操作,确定目标文本格式。The target text format is determined according to successively received trigger operations performed by the user on at least one of the format options. 9.根据权利要求8所述的方法,其特征在于,所述根据先后接收到的用户对至少一个所述格式选项执行的触发操作,确定目标文本格式,包括:9. The method according to claim 8, wherein the determining the target text format according to the received trigger operations performed by the user on at least one of the format options includes: 若至少一个所述格式选项包括不同类别的格式选项,将所述至少一个格式选项各自对应的格式进行组合,得到所述目标文本格式。If at least one of the format options includes format options of different categories, the formats corresponding to the at least one format option are combined to obtain the target text format. 10.根据权利要求8所述的方法,其特征在于,所述方法还包括:在所述预览格式区域显示显示所述目标文本格式的应用效果。10. The method according to claim 8, further comprising: displaying an application effect of the target text format in the preview format area. 11.根据权利要求1所述的方法,其特征在于,所述格式设置窗口还包括格式应用开关;以及11. The method according to claim 1, wherein the format setting window further comprises a format application switch; and 所述响应于接收到对所述文本内容的多次选择操作,将所述目标文本格式应用到每一次选择操作对应的目标文本,包括:In response to receiving multiple selection operations on the text content, applying the target text format to the target text corresponding to each selection operation includes: 在所述格式应用开关处于打开状态下,响应于接收到对所述文本内容的多次选择操作,将所述目标文本格式应用到每一次选择操作对应的目标文本。When the format application switch is on, in response to receiving multiple selection operations on the text content, the target text format is applied to the target text corresponding to each selection operation. 12.根据权利要求1所述的方法,其特征在于,所述响应于接收到对所述文本内容的多次选择操作,将所述目标文本格式应用到每一次选择操作对应的目标文本,包括:12. The method according to claim 1, wherein, in response to receiving multiple selection operations on the text content, applying the target text format to the target text corresponding to each selection operation comprises : 响应于接收到对所述文本内容中的第一内容的选择操作,将所述第一内容的格式变更为所述目标文本格式;以及,响应于接收到对所述文本内容中的第二内容的选择操作,将所述第二内容的格式变更为所述目标文本格式。In response to receiving a selection operation on a first content in the text content, changing the format of the first content to the target text format; and, in response to receiving a selection operation on a second content in the text content to change the format of the second content to the target text format. 13.根据权利要求1所述的方法,其特征在于,所述响应于接收到对所述文本内容的多次选择操作,将所述目标文本格式应用到每一次选择操作对应的目标文本,包括:13. The method according to claim 1, wherein, in response to receiving multiple selection operations on the text content, applying the target text format to the target text corresponding to each selection operation comprises : 在显示所述格式设置窗口的同时,接收对所述文本内容的多次选择操作,并将所述目标文本格式应用到每一次选择操作对应的目标文本。While displaying the format setting window, multiple selection operations on the text content are received, and the target text format is applied to the target text corresponding to each selection operation. 14.一种文本格式设置装置,包括:14. A text formatting device comprising: 显示单元,用于在文档显示界面中显示文本内容和格式设置窗口;a display unit, configured to display text content and a format setting window in the document display interface; 确定单元,用于确定用户在格式设置窗口设置的目标文本格式;Determination unit, used to determine the target text format set by the user in the format setting window; 应用单元,用于响应于接收到对所述文本内容的多次选择操作,将所述目标文本格式应用到每一次选择操作对应的目标文本。The application unit is configured to, in response to receiving multiple selection operations on the text content, apply the target text format to the target text corresponding to each selection operation. 15.一种电子设备,包括:处理器和存储器;15. An electronic device comprising: a processor and a memory; 所述存储器存储计算机执行指令;the memory stores computer-executable instructions; 所述处理器执行所述存储器存储的计算机执行指令,使得所述处理器执行如权利要求1至13中任一项所述的文本格式设置方法。The processor executes the computer-executable instructions stored in the memory, so that the processor executes the text formatting method according to any one of claims 1 to 13. 16.一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有计算机执行指令,当处理器执行所述计算机执行指令时,实现如权利要求1至13中任一项所述的文本格式设置方法。16. A computer-readable storage medium, wherein computer-readable instructions are stored in the computer-readable storage medium, and when the processor executes the computer-executable instructions, any one of claims 1 to 13 is implemented. The text formatting method described. 17.一种计算机程序产品,包括计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1至13中任一项所述的文本格式设置方法。17. A computer program product, comprising a computer program, characterized in that, when the computer program is executed by a processor, the text format setting method according to any one of claims 1 to 13 is implemented.
CN202310208420.8A 2023-02-27 2023-02-27 Text format setting method and device and electronic equipment Pending CN116151189A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202310208420.8A CN116151189A (en) 2023-02-27 2023-02-27 Text format setting method and device and electronic equipment
PCT/CN2024/077906 WO2024179342A1 (en) 2023-02-27 2024-02-21 Text format setting method and apparatus, and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310208420.8A CN116151189A (en) 2023-02-27 2023-02-27 Text format setting method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN116151189A true CN116151189A (en) 2023-05-23

Family

ID=86356254

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310208420.8A Pending CN116151189A (en) 2023-02-27 2023-02-27 Text format setting method and device and electronic equipment

Country Status (2)

Country Link
CN (1) CN116151189A (en)
WO (1) WO2024179342A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024179342A1 (en) * 2023-02-27 2024-09-06 北京字跳网络技术有限公司 Text format setting method and apparatus, and electronic device
CN119647418A (en) * 2024-11-01 2025-03-18 百度在线网络技术(北京)有限公司 Document processing method, device, equipment and storage medium based on large model

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7111238B1 (en) * 2000-06-23 2006-09-19 Microsoft Corporation System and method for maintaining text formatting consistency within an electronic document
US6886133B2 (en) * 2001-06-07 2005-04-26 Microsoft Corporation Interactive formatting interface
CN110728112B (en) * 2019-10-10 2025-05-06 腾讯科技(深圳)有限公司 A web document editing method, device, terminal and storage medium
CN110929484B (en) * 2019-11-12 2023-09-26 北京小米移动软件有限公司 Text processing method, device and storage medium
CN116151189A (en) * 2023-02-27 2023-05-23 北京字跳网络技术有限公司 Text format setting method and device and electronic equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024179342A1 (en) * 2023-02-27 2024-09-06 北京字跳网络技术有限公司 Text format setting method and apparatus, and electronic device
CN119647418A (en) * 2024-11-01 2025-03-18 百度在线网络技术(北京)有限公司 Document processing method, device, equipment and storage medium based on large model

Also Published As

Publication number Publication date
WO2024179342A1 (en) 2024-09-06

Similar Documents

Publication Publication Date Title
CN110300966B (en) Enhanced pivot table creation and interaction
US9317186B2 (en) Document publishing model
US20160124931A1 (en) Input of electronic form data
CN113377365B (en) Code display method, device, device, computer readable storage medium and product
CN110389807B (en) Interface translation method and device, electronic equipment and storage medium
US20140115435A1 (en) Creating and publishing different versions of documents
WO2022218034A1 (en) Interaction method and apparatus, and electronic device
CN116151189A (en) Text format setting method and device and electronic equipment
JP2024543965A (en) VIDEO PROCESSING METHOD, VIDEO PROCESSING APPARATUS AND COMPUTER-READABLE STORAGE MEDIUM
US12190049B2 (en) Document processing method, apparatus and device, and medium
WO2023160578A1 (en) Information processing method and apparatus, and terminal and storage medium
CN115268890A (en) Information processing method and device and electronic equipment
CN107168738A (en) Application tool management method, device, equipment and storage medium
CN109635304A (en) Multi-language system data processing method and device
US12056336B2 (en) Document content point-and-select method, electronic apparatus and medium
US20250225699A1 (en) Information display method and apparatus, and electronic device and storage medium
US20150058774A1 (en) Gesture-based visualization of financial data
CN113282285B (en) Code writing method, device, electronic equipment and storage medium
CN109190097B (en) Method and apparatus for outputting information
US9575633B2 (en) User interface utility across service providers
CN113177175A (en) Information display method, information display device, medium, and electronic device
US20240402897A1 (en) Method, apparatus, electronic device and storage medium for displaying information
WO2025136221A9 (en) Interaction method and apparatus for table document, electronic device, and storage medium
WO2023056901A1 (en) Document processing method and apparatus, terminal, and storage medium
WO2025260767A1 (en) Table data processing method and apparatus, and device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination