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
user
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
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/103Formatting, i.e. changing of presentation of documents
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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; CALCULATING OR 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

The embodiment of the disclosure provides a text format setting method, a text format setting device and electronic equipment, wherein the method comprises the following steps: displaying text content and a format setting window in a document display interface; determining a target text format set by a user in a 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, and the text format setting process is made independent of the text due to the provision of a separate format setting window outside the text content. The original format of the text content is not affected by the text format editing process. In addition, the efficiency of batch formatting is improved.

Description

Text format setting method and device and electronic equipment
Technical Field
The embodiment of the disclosure relates to the technical field of computers, in particular to a text format setting method and device and electronic equipment.
Background
The user may edit the text using a document editing application. After or during text editing, the user may set or adjust the text format, e.g., set font, font size, color, alignment, etc., of the text.
When there is more text content, the user wishes to format multiple texts in the text content in batches. Current document editing applications provide for batch formatting artifacts, such as format brushes, which can be used to batch format multiple paragraphs in text content.
In some application scenarios, when the existing batch formatting tool is used for carrying out batch formatting on the text, the problem of low efficiency caused by inconvenient operation exists.
Disclosure of Invention
The embodiment of the disclosure provides a text format setting method, a text format setting device and electronic equipment, which are used for solving the problem that the efficiency of batch formatting of texts by a batch formatting tool in the related technology is low.
In a first aspect, an embodiment of the present disclosure provides a text format setting method, including:
displaying text content and a format setting window in a document display interface;
determining a target text format set by a user in a format setting window;
and in response to receiving multiple selection operations on the text content, applying the target text format to target text corresponding to each selection operation.
In a second aspect, an embodiment of the present disclosure provides a text format setting apparatus, including:
A display unit for displaying text content and a format setting window in a document display interface;
a determining unit, configured to determine a target text format set by a user in a format setting window;
and the application unit is used for responding to the received multiple selection operations on the text content and applying 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 computer-executable instructions stored by the memory to cause the at least one processor to perform the text format setting method as described above in the first aspect and various possible references to the first aspect.
In a fourth aspect, embodiments of the present disclosure provide a computer-readable storage medium having stored therein computer-executable instructions which, when executed by a processor, implement the text format setting method as described above in the first aspect and the various possible references to the first aspect.
In a fifth aspect, embodiments of the present disclosure provide a computer program product comprising a computer program which, when executed by a processor, implements the text format setting method of the first aspect and the various possible aspects of the first aspect as above.
According to the text format setting method, the text format setting device and the electronic equipment, text content and a format setting window are displayed in a document display interface; determining a target text format set by a user in a 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, and the text format setting process is made independent of the text content due to the provision of a separate format setting window outside the text content. The original format of the text content is not affected by the text format editing process. In addition, the target text formats set in the format setting window can be applied to the target texts indicated by the multiple selection operations, and the target text formats can be applied to other texts in the document through the selection operations again without executing any operation on the format setting window again after one operation is finished, so that the efficiency of text batch formatting is improved.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure or the solutions in the prior art, a brief description will be given below of the drawings that are needed in the embodiments or the description of the prior art, it being obvious that the drawings in the following description are some embodiments of the present disclosure, and that other drawings may be obtained from these drawings without inventive effort to a person of ordinary skill in the art.
Fig. 1 is a schematic flow chart of a text format setting method according to an embodiment of the disclosure;
fig. 2 is a second flowchart of a text format setting method according to an embodiment of the present disclosure;
FIG. 3A is a schematic diagram of a document display interface;
FIG. 3B is a schematic diagram of a document display interface;
fig. 4 is a flowchart illustrating a text format setting method according to an embodiment of the present disclosure;
FIG. 5 is a schematic diagram of a formatting window;
FIG. 6 is a schematic diagram of a formatting window;
fig. 7 is a block diagram of a text format setting device according to an embodiment of the present disclosure;
fig. 8 is a schematic hardware structure of an electronic device according to an embodiment of the disclosure.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present disclosure more apparent, the technical solutions of the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present disclosure, and it is apparent that the described embodiments are some embodiments of the present disclosure, but not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without inventive effort, based on the embodiments in this disclosure are intended to be within the scope of this disclosure.
Currently tools for formatting text in batches have a formatting brush. Batch formatting of text relies on a format brush function. When the format brush is used, the user needs to suck the target text format from the text, and then uses the format brush for the texts needing to be formatted in batches.
Batch format setting using a format brush requires setting the format in the body. That is, a portion of text needs to be selected from the body, and the portion of text needs to be formatted, for example, with ground color, with bold, with text color, with a font size or font, etc. In the format setting process described above, the native format of the portion of text will be changed. The partial format is set for the partial text in the format setting process, and if the format setting is abandoned in the format setting process, the application of the partial format to the partial text needs to be canceled. If the user forgets to cancel the application, the user will have some of these partial formats left in the text content, which is inconvenient for the user.
In addition, when the format brush is used for batch format setting, a user needs to select the text with the edited format first, and then click operation is performed on the format brush identifier to extract the format from the text with the edited format. After the formats are extracted, the extracted formats may be applied to some texts selected from the text contents by the user and then the key is pressed. However, if the edited format is still required to be used for other texts of the text content, the edited format text needs to be selected again, then the format is extracted by using the format brush, and the other texts are selected again to apply the extracted format. Thus, it is inefficient to format the text in batches.
In order to improve the above-described problems, the present disclosure provides a scheme in which a format setting window independent of text content is displayed in a document, a user may set a target text format in the format setting window, and after setting the target text format, the user may apply the target text format to target text indicated by each of at least one selection operation using at least one selection operation. Since the format setting window is independent of the text content, the user will not influence the format of the text content in the process of setting the format in the format setting window, and thus format legacy in the process of setting the format due to the format setting discard will not be generated. In addition, after the target text format is set, the target text format can be applied to a plurality of target texts of the text content by at least one selection operation of the user, so that the efficiency of batch formatting is improved. Batch formatting tools are also enriched.
Referring to fig. 1, fig. 1 is a flowchart illustrating a text format setting method according to an embodiment of the disclosure. The method comprises the following steps:
the execution subject 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 a terminal device, or the like.
S101: text content and a format setting window are displayed in a document display interface.
The document page here may be an online document page or an offline document page.
The text content in the document page can be edited in real time or can be edited in history.
The text content may include words, symbols, numbers, letters, etc.
In some application scenarios, the format setting window may be a window in a floating window form or a popup window form. In these application scenarios, the format setting window described above may be set above the text content.
In some embodiments, the format setting window may be disposed at one side of the text content. I.e. text content and format setting window are displayed side by side in the document display interface.
In one example, the format settings window described above may be displayed on the right side of the text content. The format setting window 202 as shown in fig. 2 is provided on the right side of the text content 201.
In one example, the format settings window described above may also be displayed on the left side of the text content.
In these embodiments, the user may view both text content and the format settings window in the document display interface without occlusion.
S102: and determining a target text format set by the user in the format setting window.
In some embodiments, the user may utilize format items in a toolbar carried by the document editing application itself to set the target text format in the format setting window.
In one example, the user may enter the reference text in a format settings window and then apply the format selected in the toolbar on the reference text.
In one example, default reference text may be displayed in the format settings window described above. The user may apply the selected format to these reference texts.
For example, the text in the format setting window may be selected, and then one of the format items in the toolbar carried by the document display interface may be clicked, and the format item may be applied to the text. Through multiple operations, formats corresponding to different format items can be sequentially applied to the text. Upon detecting the end of the format setting operation, a combination of the above-described different formats may be taken as the target text format.
As one implementation, a control for indicating completion of the format setting operation may be set in the format setting window. The user may trigger the control. When the execution body receives the triggering operation of the control by the user, the execution body can be regarded as the end of the format setting operation.
As another implementation manner, in the process of editing the format in the format setting window by the user, for any one format setting operation, the execution body combines the format set before the format setting operation and the format set by the current setting operation. When it is detected that the user performs a selection operation on the text content, a combination format before the user performs the selection operation on the text content may be set as a target text format.
In the process that the user sets the target text format in the format setting window, the format of the text content is not changed.
S103: in response to receiving multiple selection operations on the text content, a target text format is applied to the target text corresponding to each selection operation.
After the target text format is set by the format setting window, the user may select a target text to which the target text format is to be applied from the text content.
In one example, the user may perform multiple selection operations on the text content. Each selection operation selects a portion of text content, and the text selected by the next selection operation can be used as the target text of the next selection operation. After the selection operation is finished, the target text format may be applied to the target text.
It will be appreciated that the user may also perform a selection operation to select all text to which the target text format is to be applied as target text. After the end of the selection operation of the user is detected, the target text format is applied to the target text selected by the selection operation.
In some embodiments, the step S103 includes: in response to receiving a selection operation of a first content in the text content, changing a format of the first content to a target text format; and changing the format of the second content to the target text format in response to receiving a selection operation of the second content from the text contents.
In these embodiments, the first content and the second content may be respective components of text content. In some application scenarios, there may be no overlapping content between the first content and the second content.
That is, after the target text format is determined in step S102, the user may select the partial contents to be applied with the target text format, respectively, through a plurality of selection operations, and further, after the partial contents are selected, the target text format may be automatically applied to the partial contents respectively selected through the respective selection operations.
Illustratively, the user selects the first content a in the first selection operation, and the execution body may apply the target text format to the first content a. After the user performs the first selection operation, a second selection operation may be performed immediately after the second selection operation in which the second content B is selected, and the execution body may apply the target text format to the second content B.
In these embodiments, after setting the target text format, the user can apply the target text format to different contents among the text contents by performing the selection operation on the different contents, respectively, so that the operation of selecting different text contents through a plurality of selection operations to apply the same target text format can be simplified.
In some embodiments, the step S103 further includes: and receiving multiple selection operations on the text content while displaying the format setting window, and applying the target text format to the target text corresponding to each selection operation.
In these embodiments, the document display interface may continue to display the format settings window after the target text format is set in the format settings window. The user may then perform a content selection operation in the document content.
That is, while the format setting window and the document content are displayed in the document display interface, the target text format may be sequentially applied to the content selected by each selection operation, respectively, according to the received multiple selection operations of the document content by the user.
In these embodiments, when the format setting window and the document content are displayed simultaneously in the document display interface, the target text format is applied to the partial text content corresponding to each selection operation according to the received multiple selection operations performed on the document content, so that the user can check whether the format applied to the partial text content is the same as the target text format set by the format setting window, which is beneficial for the user to confirm the accuracy of the format applied to the selected content.
That is, after the user has set the target text format in the format setting window, the target text format may be applied to a plurality of target texts through a plurality of selection operations. There is no need to perform any operation on the format setting window before each selection operation on the target text to apply the above-described target text format. The operation of applying the same target text format to different target texts through multiple operations by the user is simplified.
In the embodiment, text content and a format setting window are displayed in a document display interface; determining a target text format set by a user in a format setting window; and applying the target text format to the target text respectively indicated by each selection operation according to the received at least one selection operation on the text content. The text format setting process is made independent of the text, since a separate format setting window is provided outside the text content. The original format of the text content is not affected by the text format editing process. In addition, the target text formats set in the format setting window can be applied to the target texts indicated by the multiple selection operations, and the target text formats can be applied to other texts in the document through the selection operations again without executing any operation on the format setting window again after one operation is finished, so that the efficiency of batch formatting is improved.
Referring to fig. 2, fig. 2 is a second flowchart of a text format setting method according to an embodiment of the disclosure. The method comprises the following steps:
s201: displaying text content in a document display interface; the document display interface includes a first control.
S202: and in response to detecting the triggering operation performed on the first control, displaying a format setting window in the document display interface.
The following is a description with reference to fig. 3A and 3B. FIG. 3A is a schematic diagram of a document display interface; FIG. 3B is a schematic diagram of a document display interface.
As shown in fig. 3A, the document display interface 301 displays text content "XX … XX", where "X" refers to arbitrary characters, symbols, and letters. 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 indicating a display format setting window.
When the user needs to perform format setting, a triggering operation, such as clicking, touching, etc., can be performed on the first control 302. Upon detecting that the user has performed a triggering operation on the first control 302 described above, as shown in fig. 3B, a format setting window 304 may be displayed in the document display interface 301. While text content 303 is also displayed in the document display interface 301. In some application scenarios, the format setting window does not overlap with the text content.
It will be appreciated 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 text content display area originally in the document display interface may be narrowed, so that the text content and the format setting window may be displayed side by side in the document display interface.
The user may set the target text format in the displayed format setting window.
S203: and determining a target text format set by the user in the format setting window.
S204: in response to receiving multiple selection operations on the text content, a target text format is applied to the target text corresponding to each selection operation.
The specific implementation of steps S203 and S204 may refer to relevant parts of the embodiment shown in fig. 1, which is not described here.
S205: the format setting window further comprises a second control for closing the format setting window; and in response to receiving the triggering operation executed on the second control, hiding the format setting window in the document display interface.
Referring to FIG. 3B, a second control 305 may be displayed in the format settings window 304. The identification of the second control may include any text, symbol, letter, etc. The second control may be a control for indicating hiding the format setting window.
The user can perform triggering operations, such as clicking or touching, on the second control, 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 text content can be adjusted so that the display area of the text content is suitable for the whole document display interface.
Compared with the embodiment shown in fig. 1, the text format setting method provided in this embodiment highlights the display and hiding of the format setting window. Thus, the user can call the format setting window as needed in the document display interface to set the target text format, and apply the target text format in the text content. After the target text format is set, the format setting window can be hidden, so that the text interface integrally displays text contents. That is, the format setting window can be displayed and hidden by the user according to the needs, and the user experience can be improved.
Referring to fig. 4, fig. 4 is a flowchart illustrating a text format setting method according to an embodiment of the disclosure. The method comprises the following steps:
s401: displaying text content and a format setting window in a document display interface; the format setting window includes: a selection format area and a preview format area, wherein the selection format area comprises a plurality of format options, and the preview format area is used for displaying the application effect of the format options selected by a user on the text.
Referring now to fig. 5, a schematic diagram of a formatting window is shown in fig. 5. As shown in fig. 5, the format settings window includes a selection format area 501 and/or a preview format area 502.
A plurality of format options may be included in the select format area 501. For example, a format option "T" for setting a text as a body, a format option "H1" for setting a text as a primary title, a format option "H2" for setting a text as a secondary title, a format option "H3" for setting a text as a tertiary title, a format option "Hn" for setting a text as an n-level title, a format option 504 for setting a text as a sequence table, a format option 505 for setting a text as a no sequence table, a format option "B" for boldly displaying a text, a format option "I" for setting a text as an italic, a format option 506 for setting an underline for a text, and the like. The format options described herein and shown in fig. 5 are merely exemplary illustrations of format options and are not exhaustive illustrations of format options.
The user may select one format option in the selected format area, and correspondingly, a display effect of a format corresponding to the format option selected by the user may be displayed in the text in the preview format area.
For example, as shown in FIG. 5, after the user clicks on the format option 507 that adds a strikethrough to the text, the text displayed in the preview format area 502 may apply the strikethrough.
In addition, a format setting window identifier 503, such as "batch setting format" in fig. 5, is also displayed in the above-described format setting window.
By providing a format selection area in the format setting window and providing a plurality of format options in the format selection area for the user to select, convenience is provided for the user to set the target text format, and the efficiency of setting the target text format by the user can be improved. In addition, a preview format area is provided in the format setting window, and a user can browse the application effect of the selected format in the preview format area, so that before the user applies the target text format in the text content, the application effect of the target text format in the text can be previewed, and the format in the text content is not affected before the user determines the target text format. Mutual independence of format setting and text content display is facilitated. Format carryover due to the process of setting the target text format in the text content is avoided.
S402: and determining the target text format according to the trigger operation which is successively received and is executed by the user on at least one format option of the selected format area.
S403: and displaying the application effect of the format option selected by the user on the text in the preview format area.
The user may perform a triggering operation on one format option at a time, thereby selecting the format corresponding to the format option at the time as a component of the target text format.
It should be understood that the target text format may include a single format or a combination format formed by combining a plurality of formats.
The target text format may be determined based on a triggering operation performed by the user on different format options multiple times.
If the user performs an even number of triggers on a format option, the format option corresponding to the format will not be determined to be part of the target text format. If the user performs an odd number of triggering operations on one format option, determining the format corresponding to the format option as a component part of the target text format.
The formats respectively indicated by the different format options corresponding to the multiple triggering operations of the user can be combined to obtain the target text format.
And if the at least one format option comprises format options of different categories, combining the formats corresponding to the at least one format option respectively to obtain the target text format.
In some embodiments, if the user triggers the operation multiple times to correspond to the format of the same category, the format of the category corresponding to the last trigger operation of the user is taken as a component part of the target text format.
Schematically, if the user performs the triggering operation on the format option "H1" and the format option "H2" successively, the format "secondary title" corresponding to the format option "H2" is taken as a component of the target text format.
Illustratively, if the at least one format option includes a format option of "T", "B" and an application background color, combining the text format indicated by the "T" format option, the bold format indicated by the "B" format option and the application background color format to obtain the target text format.
It can be appreciated that, each time the user performs a triggering operation on one format option, a format application effect corresponding to the triggering operation can be displayed in the preview format area. For example, the format corresponding to the time and the history effect are overlapped and applied on the text of the preset area.
In these embodiments, determining the target text format by different categories of formats triggered by the user may enable the user to determine the target text format desired by the user in conjunction with the format preview effect of the preview area before applying the respective formats to the text content. The user experience may be improved.
In some embodiments, if a format option is triggered, the format option is highlighted in the selected format area.
Illustratively, highlighting the format option includes increasing the area of the display area of the format option.
Illustratively, highlighting the format option includes setting a display color of the identification of the format option to a different display color than the identifications of other non-triggered format options.
In these embodiments, by highlighting the triggered format option, the user may be made aware of which formats have been applied as part of the target text format. The user is facilitated to determine whether to continue using other formats or revising the already applied formats.
In some embodiments, if a format option is triggered, the background color of the format option is displayed as a different color than the background color of other format options that are not triggered.
Illustratively, in the selected format region, the background color of the unselected format option is displayed as the first color. The background color of the triggered format option is displayed as a 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.
Illustratively, the background color of the format option "B" is displayed as gray or white before being triggered by the trigger operation. After being triggered, the background color of the format option "B" is displayed as yellow.
In these embodiments, by displaying the background color of the format option as a different color than the background color of other format options that are not triggered, the user can quickly learn which formats have been selected and which have not. The user is facilitated to determine whether to continue using other formats or revising the already applied formats. The method is beneficial to improving the setting efficiency of the target text format.
S404: in response to receiving multiple selection operations on the text content, a target text format is applied to the target text corresponding to each selection operation.
The specific implementation of step S404 may refer to step S103 shown in fig. 1, which is not described herein.
Compared with the embodiment shown in fig. 1, the text format setting method provided by the present embodiment highlights setting the target text format according to the format option provided by 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 by the user is improved, and the efficiency of applying the target text format in the text content is improved.
In some alternative implementations of the text format setting methods shown in fig. 1, 2 and 4, the format setting window further includes a format application switch for indicating the application format; and
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 on state, applying the target text format to the target text respectively indicated by each selection operation according to at least one selection operation performed on the text content by the user
Referring to fig. 6, fig. 6 is a schematic diagram of a 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 finally determines the target text format under the cooperation of the preview format area browsing the format application effect. After the target text format is set, the application switch may be turned on, i.e., set to an on state. In the application switch on state, the user can apply the target text format to the text in the text content.
It will be appreciated that the user may open the format application switch before performing the triggering operation on the format option, or may open the format application switch after the user has set the target text format.
When the application switch is in an on state, the user may perform a selection operation on the text content, thereby applying the target text format to the target text indicated by the selection operation.
It will be appreciated that the user may also turn off the application switch. That is, the application switch is set to the off state. When the application switch is in the off state, the user cannot set the format in the window for any text application format in the text content.
In these embodiments, by setting a format application switch in the format setting window, the application switch is operated by the user to turn on or off the application switch, thereby controlling whether or not the target text format is applied in the text content. The method is beneficial to realizing the controllability of the target text format application and can improve the user experience.
Corresponding to the text format setting method of the above embodiment, fig. 7 is a block diagram of the structure of the text format setting apparatus provided by the embodiment of the present disclosure. For ease of illustration, only portions relevant to embodiments of the present disclosure are shown. Referring to fig. 7, the apparatus 70 includes: a display unit 701, a determination unit 702, and an application unit 703. Wherein:
a display unit 701 for displaying text content and a format setting window in a document display interface;
A determining unit 702, configured to determine a target text format set by a user in a format setting window;
an application unit 703, configured to apply, in response to receiving a plurality of selection operations on the text content, the target text format to the target text corresponding to each selection operation.
In some embodiments of the present disclosure, the format setting window is provided at the text content side.
In some embodiments of the present disclosure, the display unit 701 is further configured to:
displaying text content in a document display interface; the document display interface comprises a first control;
and in response to detecting the triggering operation performed on the first control, displaying a format setting window in the document display interface.
In some embodiments of the present disclosure, the format settings window includes: selecting a format area and/or a preview format area, wherein:
the selected format area includes a plurality of format options;
the preview format area is used to show the application effect of the format option selected by the user on the text.
In some embodiments of the present disclosure, the display unit 701 is further configured to:
if a format option is triggered, the format option is highlighted in the selected format area.
In some embodiments of the present disclosure, the display unit 701 is further configured to: the background color of the format option is displayed as a different color than the background color of other format options that are not triggered. In some embodiments of the present disclosure, the format settings window further comprises a second control for closing the format settings window; the display unit 701 is further configured to: and in response to receiving the triggering operation executed on the second control, hiding the format setting window in the document display interface.
In some embodiments of the present disclosure, the determining unit 702 is further configured to: and determining the target text format according to the trigger operation which is successively received and is executed by the user on at least one format option of the selected format area.
In some embodiments of the present disclosure, the determining unit 702 is further configured to: and if the at least one format option comprises format options of different categories, combining the formats corresponding to the at least one format option respectively to obtain the target text format.
In some embodiments of the present disclosure, the apparatus 70 further comprises a display unit (not shown in the figures) for: and displaying the application effect of the display target text format in the preview format area.
In some embodiments of the present disclosure, the format settings window further includes a format application switch for indicating an application format; the application unit 703 is further configured to:
in response to detecting that the format application switch is in an on state, the target text format is applied to the target text indicated by each selection operation according to the received at least one selection operation performed on the text content.
In some embodiments of the present disclosure, the application unit 703 is further configured to: in response to receiving a selection operation of a first content in the text content, changing a format of the first content to a target text format; and in response to receiving a selection operation of a second content of the text content, changing a format of the second content to a target text format.
In some embodiments of the present disclosure, the application unit 703 is further configured to: and receiving multiple selection operations on the text content while displaying the format setting window, and applying the target text format to the target text corresponding to each selection operation.
In order to achieve the above embodiments, the embodiments of the present disclosure further provide an electronic device.
Referring to fig. 8, a schematic diagram of an electronic device 800 suitable for implementing embodiments of the present disclosure is shown, where the electronic device 800 may be various terminal devices, servers. The terminal device may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a personal digital assistant (Personal Digital Assistant, PDA for short), a tablet (Portable Android Device, PAD for short), a portable multimedia player (Portable Media Player, PMP for short), an in-vehicle terminal (e.g., an in-vehicle navigation terminal), and the like, and a fixed terminal such as a digital TV, a desktop computer, and the like. Etc. The electronic device shown in fig. 8 is merely an example and should not be construed to limit the functionality and scope of use of the disclosed embodiments.
As shown in fig. 8, the electronic device 800 may include a processing means (e.g., a central processor, a graphics processor, etc.) 801 that may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 802 or a program loaded from a storage 808 into a random access Memory (Random Access Memory, RAM) 803. In the RAM 803, various programs and data required for the operation of the electronic device 800 are also stored. The processing device 801, the ROM 802, and the RAM 803 are connected to each other by a bus 804. An input/output (I/O) interface 805 is also connected to the bus 804.
In general, the following devices may be connected to the I/O interface 805: input devices 806 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, and the like; an output device 807 including, for example, a liquid crystal display (Liquid Crystal Display, LCD for short), a speaker, a vibrator, and the like; storage 808 including, for example, magnetic tape, hard disk, etc.; communication means 809. The communication means 809 may allow the electronic device 800 to communicate wirelessly or by wire with other devices to exchange data. While fig. 8 shows an electronic device 800 having various means, it is to be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via communication device 809, or installed from storage device 808, or installed from ROM 802. The above-described functions defined in the methods of the embodiments of the present disclosure are performed when the computer program is executed by the processing device 801.
It should be noted that the computer readable medium described in the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device.
The computer-readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to perform the methods shown in the above-described embodiments.
Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. 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 the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a local area network (Local Area Network, LAN for short) or a wide area network (Wide Area Network, WAN for short), or it may be connected to an external computer (e.g., connected via the internet using an internet service provider).
The flowcharts 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 the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). 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 the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments of the present disclosure may be implemented by means of software, or may be implemented by means of hardware. The name of the unit does not constitute a limitation of the unit itself in some cases, and for example, the display unit may also be described as "a unit that displays text content and a format setting window in a document display interface".
The functions described above herein 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: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a Complex Programmable Logic Device (CPLD), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
According to a first aspect, according to one or more embodiments of the present disclosure, there is provided a text format setting method, including:
displaying text content and a format setting window in a document display interface;
determining a target text format set by a user in a format setting window;
in response to receiving multiple selection operations on the text content, a target text format is applied to the target text corresponding to each selection operation.
In accordance with one or more embodiments of the present disclosure, a format setting window is provided at the text content side.
In accordance with one or more embodiments of the present disclosure, displaying text content and a format settings window in a document display interface includes:
displaying text content in a document display interface; the document display interface comprises a first control;
and in response to detecting the triggering operation performed on the first control, displaying a format setting window in the document display interface.
In accordance with one or more embodiments of the present disclosure, the format settings window includes: selecting a format area and/or a preview format area, wherein:
the selected format area includes a plurality of format options;
the preview format area is used to show the application effect of the format option selected by the user on the text.
According to one or more embodiments of the present disclosure, the method further comprises: if a format option is triggered, the format option is highlighted in the selected format area.
Highlighting the format option, according to one or more embodiments of the present disclosure, includes:
the background color of the format option is displayed as a different color than the background color of other format options that are not triggered. In accordance with one or more embodiments of the present disclosure, the format settings window further includes a second control for closing the format settings window;
the method further comprises:
and in response to receiving the triggering operation executed on the second control, hiding the format setting window in the document display interface.
According to one or more embodiments of the present disclosure, determining a target text format set by a user in a format setting window includes:
and determining the target text format according to the trigger operation of the received user on the at least one format option.
According to one or more embodiments of the present disclosure, determining a target text format according to a trigger operation performed by a successively received user on at least one format option includes:
and if the at least one format option comprises format options of different categories, combining the formats corresponding to the at least one format option respectively to obtain the target text format.
According to one or more embodiments of the present disclosure, the method further comprises: and displaying the application effect of the display target text format in the preview format area.
In accordance with one or more embodiments of the present disclosure, the format settings window further includes a format application switch; and
according to the received selection operation performed on the text in the document, applying the target text format to the target text indicated by the selection operation, including:
in response to detecting that the format application switch is in an on state, the target text format is applied to the target text indicated by each selection operation according to the received at least one selection operation performed on the text content.
According to one or more embodiments of the present disclosure, in response to receiving a plurality of selection operations on text content, applying a target text format to target text corresponding to each selection operation, includes:
in response to receiving a selection operation of a first content in the text content, changing a format of the first content to a target text format; and in response to receiving a selection operation of a second content of the text content, changing a format of the second content to a target text format.
According to one or more embodiments of the present disclosure, in response to receiving a plurality of selection operations on text content, applying a target text format to target text corresponding to each selection operation, includes:
And receiving multiple selection operations on the text content while displaying the format setting window, and applying the target text format to the target text corresponding to each selection operation.
In a second aspect, according to one or more embodiments of the present disclosure, there is provided a text format setting apparatus including:
a display unit for displaying text content and a format setting window in a document display interface;
a determining unit, configured to determine a target text format set by a user in a format setting window;
and the application unit is used for responding to the received multiple selection operations on the text content and applying the target text format to the target text corresponding to each selection operation.
In accordance with one or more embodiments of the present disclosure, a format setting window is provided at the text content side.
According to one or more embodiments of the present disclosure, the display unit is further configured to:
displaying text content in a document display interface; the document display interface comprises a first control;
and in response to detecting the triggering operation performed on the first control, displaying a format setting window in the document display interface.
In accordance with one or more embodiments of the present disclosure, the format settings window includes: selecting a format area and/or a preview format area, wherein:
The selected format area includes a plurality of format options;
the preview format area is used to show the application effect of the format option selected by the user on the text.
According to one or more embodiments of the present disclosure, the display unit is further configured to:
if a format option is triggered, the format option is highlighted in the selected format area.
According to one or more embodiments of the present disclosure, the display unit is further configured to: the background color of the format option is displayed as a different color than the background color of other format options that are not triggered. In accordance with one or more embodiments of the present disclosure, the format settings window further includes a second control for closing the format settings window; the display unit is further configured to: and in response to receiving the triggering operation executed on the second control, hiding the format setting window in the document display interface.
According to one or more embodiments of the present disclosure, the determining unit is further configured to: and determining the target text format according to the trigger operation which is successively received and is executed by the user on at least one format option of the selected format area.
According to one or more embodiments of the present disclosure, the determining unit is further configured to: and if the at least one format option comprises format options of different categories, combining the formats corresponding to the at least one format option respectively to obtain the target text format.
According to one or more embodiments of the present disclosure, the apparatus further comprises a display unit for: and displaying the application effect of the display target text format in the preview format area.
In accordance with one or more embodiments of the present disclosure, the format settings window further includes a format application switch for indicating an application format; the application unit is further configured to:
in response to detecting that the format application switch is in an on state, the target text format is applied to the target text indicated by each selection operation according to the received at least one selection operation performed on the text content.
According to one or more embodiments of the present disclosure, the application unit is further configured to: in response to receiving a selection operation of a first content in the text content, changing a format of the first content to a target text format; and in response to receiving a selection operation of a second content of the text content, changing a format of the second content to a target text format. According to one or more embodiments of the present disclosure, the application unit is further configured to: and receiving multiple selection operations on the text content while displaying the format setting window, and applying 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, there is provided an electronic device comprising: at least one processor and memory;
the memory stores computer-executable instructions;
at least one processor executes computer-executable instructions stored in a memory, causing the at least one processor to perform the text format setting method as described above in the first aspect and various possible references to the first aspect.
In a fourth aspect, according to one or more embodiments of the present disclosure, there is provided a computer-readable storage medium having stored therein computer-executable instructions which, when executed by a processor, implement the text format setting method as described above in the first aspect and the various possible aspects of the first aspect.
In a fifth aspect, according to one or more embodiments of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the text format setting method of the first aspect and the various possible aspects as described above.
The foregoing description is only of the preferred embodiments of the present disclosure and description of the principles of the technology being employed. It will be appreciated by persons skilled in the art that the scope of the disclosure referred to in this disclosure is not limited to the specific combinations of features described above, but also covers other embodiments which may be formed by any combination of features described above or equivalents thereof without departing from the spirit of the disclosure. Such as those described above, are mutually substituted with the technical features having similar functions disclosed in the present disclosure (but not limited thereto).
Moreover, although operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. In certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the present 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 example forms of implementing the claims.

Claims (17)

1. A text format setting method, comprising:
displaying text content and a format setting window in a document display interface;
Determining a target text format set by a user in a format setting window;
and in response to receiving multiple selection operations on the text content, applying the target text format to target text corresponding to each selection operation.
2. The method of claim 1, wherein the formatting window is disposed on a side of the text content.
3. The method of claim 1, wherein displaying text content and a format settings window in a document display interface comprises:
displaying text content in a document display interface; the document display interface comprises a first control;
and in response to detecting the triggering operation performed on the first control, displaying the format setting window in the document display interface.
4. The method of claim 1, wherein the format setting window comprises: selecting a format area and/or a preview format area, wherein:
the selected format area includes a plurality of format options;
the preview format area is used for displaying the application effect of the format option selected by the user on the text.
5. The method according to claim 4, wherein the method further comprises:
If a format option is triggered, the format option is highlighted in the selected format area.
6. The method of claim 5, wherein highlighting the format option comprises:
the background color of the format option is displayed as a different color than the background color of other format options that are not triggered.
7. The method of claim 1, wherein the format settings window further comprises a second control for closing the format settings window;
the method further comprises:
and in response to receiving a triggering operation executed on the second control, hiding the format setting window in the document display interface.
8. The method of claim 4, wherein determining the target text format set by the user in the format setting window comprises:
and determining a target text format according to the trigger operation of the received user on at least one format option.
9. The method of claim 8, wherein determining the target text format based on the trigger operation performed by the successively received user on at least one of the format options comprises:
And if at least one of the format options comprises format options of different categories, combining the formats corresponding to the at least one format option respectively to obtain the target text format.
10. The method of claim 8, wherein the method further comprises: and displaying the application effect of the target text format in the preview format area.
11. The method of claim 1, wherein the format settings window further comprises a format application switch; and
the responding to the receiving of multiple selection operations on the text content, the target text format is applied to the target text corresponding to each selection operation, and the method comprises the following steps:
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 under the condition that the format application switch is in an on state.
12. The method of claim 1, wherein in response to receiving multiple selection operations of 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 of a first content in the text content, changing a format of the first content to the target text format; and in response to receiving a selection operation of a second content in the text content, changing a format of the second content to the target text format.
13. The method of claim 1, wherein in response to receiving multiple selection operations of the text content, applying the target text format to the target text corresponding to each selection operation comprises:
and receiving multiple selection operations on the text content while displaying the format setting window, and applying the target text format to the target text corresponding to each selection operation.
14. A text format setting apparatus comprising:
a display unit for displaying text content and a format setting window in a document display interface;
a determining unit, configured to determine a target text format set by a user in a format setting window;
and the application unit is used for responding to the received multiple selection operations on the text content and applying the target text format to the target text corresponding to each selection operation.
15. An electronic device, comprising: a processor and a memory;
the memory stores computer-executable instructions;
the processor executes the computer-executable instructions stored in the memory, causing the processor to perform the text format setting method according to any one of claims 1 to 13.
16. A computer-readable storage medium having stored therein computer-executable instructions which, when executed by a processor, implement the text format setting method of any one of claims 1 to 13.
17. A computer program product comprising a computer program, characterized in that the computer program, when executed by a processor, implements the text format setting method of any one of claims 1 to 13.
CN202310208420.8A 2023-02-27 2023-02-27 Text format setting method and device and electronic equipment Pending CN116151189A (en)

Priority Applications (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

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 (1)

Country Link
CN (1) CN116151189A (en)

Similar Documents

Publication Publication Date Title
CN110046021B (en) Page display method, device, system, equipment and storage medium
CN109460233B (en) Method, device, terminal equipment and medium for updating native interface display of page
CN110389807B (en) Interface translation method and device, electronic equipment and storage medium
US20230024650A1 (en) Method and apparatus for selecting menu items, readable medium and electronic device
US11222171B2 (en) Enhanced pivot table creation and interaction
US20160124931A1 (en) Input of electronic form data
WO2023040948A1 (en) Information processing method and apparatus, and terminal and storage medium
CN113377366B (en) Control editing method, device, equipment, readable storage medium and product
CN109725970B (en) Method and device for displaying application client window and electronic equipment
WO2022218034A1 (en) Interaction method and apparatus, and electronic device
US20190095065A1 (en) Display control method of communication device, control method of server, and recording medium
US20220050562A1 (en) Methods and apparatuses for generating a hosted application
US20240094883A1 (en) Message selection method, apparatus and device
CN114415847A (en) Text information deleting method and device and electronic equipment
CN109683726B (en) Character input method, character input device, electronic equipment and storage medium
CN110262718B (en) Input method window setting method and device, mobile terminal and storage medium
CN110069186B (en) Method and equipment for displaying operation interface of application
CN116151189A (en) Text format setting method and device and electronic equipment
CN115268890A (en) Information processing method and device and electronic equipment
CN114327732B (en) Page configuration method, page configuration device, electronic equipment and computer readable medium
CN114185463B (en) Form processing method, form processing device, electronic equipment and storage medium
CN114385562A (en) Text information deleting method and device and electronic equipment
CN109190097B (en) Method and apparatus for outputting information
CN114580361A (en) Document processing method and device, electronic equipment and storage medium
CN113807058A (en) Text display method and text display device

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