WO2017190465A1 - 选中富文本的方法、装置和电子设备 - Google Patents

选中富文本的方法、装置和电子设备 Download PDF

Info

Publication number
WO2017190465A1
WO2017190465A1 PCT/CN2016/100271 CN2016100271W WO2017190465A1 WO 2017190465 A1 WO2017190465 A1 WO 2017190465A1 CN 2016100271 W CN2016100271 W CN 2016100271W WO 2017190465 A1 WO2017190465 A1 WO 2017190465A1
Authority
WO
WIPO (PCT)
Prior art keywords
cursor
picture
address path
string corresponding
tail
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2016/100271
Other languages
English (en)
French (fr)
Inventor
李树鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Le Holdings Beijing Co Ltd
Lemobile Information Technology (Beijing) Co Ltd
Original Assignee
Le Holdings Beijing Co Ltd
Lemobile Information Technology (Beijing) Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Le Holdings Beijing Co Ltd, Lemobile Information Technology (Beijing) Co Ltd filed Critical Le Holdings Beijing Co Ltd
Publication of WO2017190465A1 publication Critical patent/WO2017190465A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • 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
    • G06F3/0486Drag-and-drop
    • 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
    • G06F3/04812Interaction techniques based on cursor appearance or behaviour, e.g. being affected by the presence of displayed objects
    • 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/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures

Definitions

  • the user may need to select some rich text to perform copying, pasting, etc.
  • some rich text For a mobile terminal with a touch screen, the user will long press the touch screen on the rich text, and then drag the header with the finger.
  • the cursor and the trailing cursor select the rich text between the first cursor and the trailing cursor.
  • rich text with pictures since the contact area between the finger and the touch screen is large, in the case where the text portion is in close proximity to the picture, as shown in FIG. 1A and FIG.
  • the technical problem to be solved by the present application is that the existing scheme selects a part of the address path string corresponding to the picture when the rich text is selected.
  • the embodiment of the present application provides a method for selecting rich text, including: displaying a first cursor and a tail cursor at a position where the long press operation is sensed according to a long press operation of the user; Operation, obtaining the position of the dragged head cursor and the trailing cursor; determining whether the position of the dragged head cursor and/or the tail cursor is within the address path string corresponding to the image; The cursor in the address path string moves outside the address path string corresponding to the picture.
  • the step of moving the cursor in the address path character string corresponding to the picture to the address path character string corresponding to the picture further includes: when it is the tail cursor And moving the trailing cursor forward to the front of the address path string corresponding to the picture.
  • the step of moving the cursor in the address path character string corresponding to the picture to the address path character string corresponding to the picture includes: determining that the picture is in the picture Whether the cursor in the corresponding address path string is at the front or the back of the address path string corresponding to the picture; when in the front part, moving the front cursor to the picture corresponding to The address path is in front of the string.
  • the step of moving the cursor in the address path character string corresponding to the picture to the address path character string corresponding to the picture further includes: when in the back part And moving the cursor at the back to the rear of the address path string corresponding to the picture.
  • the mobile unit includes: a first determining subunit, configured to determine whether the cursor in the address path string corresponding to the picture is a first cursor or a tail cursor; the first movement The subunit is configured to move the head cursor backward to the address path character string corresponding to the picture when the first determining subunit determines that it is the head cursor.
  • Embodiments of the present application further provide an electronic device including at least one processor; and a memory communicably coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor Executing, by the at least one processor, the at least one processor to enable the at least one processor to display a head cursor and a tail cursor at a position where the long press operation is sensed according to a long press operation of the user; Drag operation, obtain the position of the dragged head cursor and the tail cursor; determine whether the position of the dragged head cursor and/or the tail cursor is within the address path string corresponding to the image; The cursor in the address path string corresponding to the picture moves to the outside of the address path string corresponding to the picture.
  • the moving the cursor in the address path character string corresponding to the picture to the address path character string corresponding to the picture includes: determining that the address path corresponding to the picture is Whether the cursor in the string is the first cursor or the tail cursor; when it is the first cursor, the header cursor is moved backward to the address path string corresponding to the image.
  • the moving the cursor in the address path character string corresponding to the picture to the address path character string corresponding to the picture further includes: when it is a tail cursor, The trailing cursor moves forward to the front of the address path string corresponding to the picture.
  • the electronic device that moves the cursor in the address path character string corresponding to the picture to the address path character string corresponding to the picture includes determining that the address path character corresponding to the picture is Whether the cursor in the string is in the front or the back of the address path string corresponding to the picture; when in the front part, moving the cursor in the front to the address path string corresponding to the picture In front.
  • the address path word corresponding to the picture is The movement of the cursor in the character string to the address path character string corresponding to the picture further includes moving the rear cursor back to the address path character string corresponding to the picture when in the back part.
  • Embodiments of the present application also provide a non-volatile computer storage medium storing computer-executable instructions that, when executed by an electronic device, enable an electronic device to operate according to a user's long press Displaying a head cursor and a tail cursor at a position where the long press operation is sensed; acquiring a position of the dragged head cursor and the trailing cursor according to a user drag operation; determining the dragged head cursor and The position of the trailing cursor is in the address path string corresponding to the picture; the cursor in the address path string corresponding to the picture is moved outside the address path string corresponding to the picture.
  • the moving the cursor in the address path character string corresponding to the picture to the address path character string corresponding to the picture comprises: determining that the picture is in the picture Whether the cursor in the corresponding address path string is the first cursor or the tail cursor; when it is the first cursor, the header cursor is moved backward to the address path string corresponding to the image.
  • the moving the cursor in the address path character string corresponding to the picture to the address path character string corresponding to the picture comprises: determining that the picture is in the picture Whether the cursor in the corresponding address path string is at the front or the back of the address path string corresponding to the picture; when in the front part, moving the front cursor to the picture corresponding to The address path is in front of the string.
  • the moving the cursor in the address path character string corresponding to the picture to the address path character string corresponding to the picture further includes: when in the back part And moving the cursor at the back to the rear of the address path string corresponding to the picture.
  • the embodiment of the present application further provides a computer program product, the computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions, wherein when the program The instructions, when executed by a computer, cause the computer to perform any of the methods described above.
  • the method, device, and electronic device for selecting rich text provided by the embodiment of the present application, when the mobile terminal detects that the position of the first cursor and/or the tail cursor after the drag is within the address path string corresponding to the image, The cursor in the address path string corresponding to the picture is moved outside the address path string corresponding to the picture, so that a part of the address path string corresponding to the selected picture can be avoided.
  • FIG. 2 shows a flow chart of a method of selecting rich text in accordance with an embodiment of the present application
  • FIG. 3 shows a flow diagram of one embodiment of a method of selecting rich text in accordance with an embodiment of the present application
  • FIG. 4 shows a flow chart of another embodiment of a method of selecting rich text in accordance with an embodiment of the present application
  • FIG. 5 shows a schematic diagram of an apparatus for selecting rich text according to an embodiment of the present application
  • FIG. 6 is a schematic diagram showing the hardware structure of an electronic device according to an embodiment of the present application.
  • connection or integral connection; may be mechanical connection or electrical connection; may be directly connected, may also be indirectly connected through an intermediate medium, or may be internal communication of two components, may be wireless connection, or may be wired connection.
  • connection or integral connection; may be mechanical connection or electrical connection; may be directly connected, may also be indirectly connected through an intermediate medium, or may be internal communication of two components, may be wireless connection, or may be wired connection.
  • the embodiment of the present application provides a method for selecting rich text, which is applicable to mobile terminals such as mobile phones and tablet computers. As shown in FIG. 2, the method includes the following steps:
  • the long press operation is usually performed with a finger, and of course, it can also be a touch pen or the like.
  • the first cursor and the tail cursor may be located at both ends of the foreign word to select the foreign word.
  • the first cursor and the tail cursor may be located in the Chinese character. At both ends, when the Chinese character is selected, when the Chinese character has a Chinese character that is composed of the Chinese character, the first cursor and the tail cursor may be located at both ends of the composed word to select the word.
  • step S300 Determine whether the position of the first cursor and/or the tail cursor after the drag is in the picture Within the address path string, if yes, step S400 is performed. If not, the cursor is in normal text, and the user can perform operations such as copying and pasting normally.
  • the foregoing step S400 may include:
  • the steps S401-S403 are used to select a picture, and the user needs to perform a long press operation at the position of the picture to select the picture, and the user operation is still too complicated.
  • the foregoing step S400 may include:
  • the device includes:
  • the mobile unit 400 may include:
  • both the first moving subunit and the second moving subunit perform an operation.
  • the first cursor is moved backward to the address path character string corresponding to the picture
  • the tail cursor is moved forward to the front of the address path string corresponding to the picture, so that the picture is not selected to avoid the selection.
  • a part of the address path string corresponding to the image If the user also wants to select an image, the user can select the image by performing a long press at the position of the image.
  • the second determining sub-unit is configured to determine whether the cursor in the address path string corresponding to the picture is in the front or the rear of the address path string corresponding to the picture.
  • a third mobile subunit configured to: when the second determining subunit determines that the cursor in the address path string corresponding to the picture is in front of the address path character string corresponding to the picture, move the cursor forward to the picture The corresponding address path is in front of the string.
  • the tail cursor is moved forward to the front of the address path string corresponding to the picture to avoid selecting the picture; in FIG. 1C, the first cursor is moved forward to the address path string corresponding to the picture. In front, to select the picture.
  • a fourth mobile subunit configured to move the cursor backward to the picture when the second determining subunit determines that the cursor in the address path string corresponding to the picture is at the back of the address path string corresponding to the picture
  • the corresponding address path string is behind.
  • the first cursor is moved backward to the address path string corresponding to the picture to avoid selecting the picture; in FIG. 1D, the tail cursor is moved backward to the address path string corresponding to the picture. Rear to select the picture.
  • the mobile terminal determines the user according to whether the cursor in the address path character string corresponding to the picture is in the front or the back of the address path character string corresponding to the picture. Whether you want to select the picture, and then select or avoid the selected picture accordingly, which avoids a part of the address path string corresponding to the selected picture, and does not require the user to add additional operations, thereby bringing a good experience to the user.
  • the moving the cursor in the address path character string corresponding to the picture to the address path character string corresponding to the picture includes: determining that the picture is corresponding to the picture Whether the cursor in the address path string is the first cursor or the tail cursor; when it is the first cursor, the header cursor is moved backward to the address path string corresponding to the image.
  • the moving the cursor in the address path character string corresponding to the picture to the address path character string corresponding to the picture further includes: when it is a tail cursor, The trailing cursor moves forward to the front of the address path string corresponding to the picture.
  • the cursor that is in the address path character string corresponding to the picture is moved to the address path character string corresponding to the picture, and includes determining that the address is in the picture. Whether the cursor in the path string is in the front or the back of the address path string corresponding to the picture; when in the front part, moving the front cursor to the address path corresponding to the picture In front of the string.
  • moving the cursor in the address path character string corresponding to the picture to the address path character string corresponding to the picture further includes: when in the back part, The cursor at the rear moves backwards to the end of the address path string corresponding to the picture.
  • Embodiments of the present application also provide a non-volatile computer storage medium storing computer-executable instructions that, when executed by an electronic device, enable an electronic device to operate according to a user's long press Displaying a head cursor and a tail cursor at a position where the long press operation is sensed; acquiring a position of the dragged head cursor and the trailing cursor according to a user drag operation; determining the dragged head cursor and The position of the trailing cursor is in the address path string corresponding to the picture; the cursor in the address path string corresponding to the picture is moved outside the address path string corresponding to the picture.
  • the moving the cursor in the address path character string corresponding to the picture to the address path character string corresponding to the picture includes: determining that the location is Whether the cursor in the address path string corresponding to the picture is the first cursor or the tail cursor; when it is the first cursor, the header cursor is moved backward to the address path string corresponding to the picture.
  • the moving the cursor in the address path character string corresponding to the picture to the address path character string corresponding to the picture further includes: When the tail cursor is displayed, the tail cursor is moved forward to the front of the address path string corresponding to the picture.
  • the moving the cursor in the address path character string corresponding to the picture to the address path character string corresponding to the picture further includes: when in the At the rear, the cursor at the rear is moved backward to the address path character string corresponding to the picture.
  • the embodiment of the present application further provides a computer program product, the computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions, wherein when the program The instructions, when executed by a computer, cause the computer to perform any of the methods described above.
  • embodiments of the present application can be provided as a method, system, or computer program product.
  • the present application can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment in combination of software and hardware.
  • the application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the device is implemented in a flow chart A function specified in a block or blocks of a process or multiple processes and/or block diagrams.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
  • the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

本申请公开了一种选中富文本的方法、装置和电子设备,其中所述方法包括:根据用户的长按操作,在感测到所述长按操作的位置处显示首部光标和尾部光标;根据用户的拖动操作,获取拖动后的首部光标和尾部光标的位置;判断所述拖动后的首部光标和/或尾部光标的位置是否处于图片所对应的地址路径字符串内;将处于所述图片所对应的地址路径字符串内的光标移动到所述图片所对应的地址路径字符串外。由此,可以避免选中图片所对应的一部分地址路径字符串。

Description

选中富文本的方法、装置和电子设备
交叉引用
本申请为在2016年05月04日提交中国专利局、申请号为201610289755.7、发明名称为“选中富文本的方法和装置”的中国专利申请的继续申请,本申请要求在2016年05月04日提交中国专利局、申请号为201610289755.7、发明名称为“选中富文本的方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及计算机移动终端技术领域,具体涉及一种选中富文本的方法、装置和电子设备。
背景技术
在移动互联网时代,手机等移动终端在人们生活中的应用越来越广泛。人们也习惯于在移动终端上进行文本编辑。目前,越来越多的应用都会采用富文本编辑器来实现图文混排编辑,例如即时通讯应用和便签应用等。对于即时通讯应用而言,对话框采用图文混排编辑,会使得用户在进行网络聊天时更加生动;对于便签应用而言,在便签中插入拍摄的图片会使得便签的记录更为方便和具体。图片通常是以地址路径字符串的形式插入到富文本中的,例如以<img src=”图片地址”>的形式,富文本编辑器调用出该地址路径上的图片,从而可以在富文本编辑器上显示出图片。
用户在进行富文本编辑时,可能会需要选中部分富文本,以执行复制、粘贴等操作,对于带有触摸屏的移动终端而言,用户会在富文本上长按触摸屏,然后用手指拖动首部光标和尾部光标,从而选中首部光标与尾部光标之间的富文本。对于带有图片的富文本而言,由于手指与触摸屏的接触面积较大,在文字部分与图片紧邻的情况下,如图1A和图1B所示,当用 户仅希望选中文字时,首部光标或尾部光标可能被拖动到图片内,反映在富文本编辑器中,光标实际上位于图片所对应的地址路径字符串中,在这种情况下,如果用户执行复制、粘贴的操作,有可能粘贴出来的文本除了用户需要选中文字外,还带有例如“<img src=”XXXX”这样的字符串,用户不得不再将这些多余的字符串删除。而当用户希望也选中图片时,如图1C和图1D所示,光标也不能正好完全选中图片,在执行复制、粘贴的操作后,粘贴出来的文本也只是选中的文字和部分地址路径字符串,由于地址路径字符串是不完整的,富文本编辑器也无法调用出图片显示,给用户带来不好的使用体验。
发明内容
本申请要解决的技术问题在于现有方案在选中富文本时会选中图片所对应的一部分地址路径字符串。
为此,本申请实施例提供了一种选中富文本的方法,包括:根据用户的长按操作,在感测到所述长按操作的位置处显示首部光标和尾部光标;根据用户的拖动操作,获取拖动后的首部光标和尾部光标的位置;判断所述拖动后的首部光标和/或尾部光标的位置是否处于图片所对应的地址路径字符串内;将处于所述图片所对应的地址路径字符串内的光标移动到所述图片所对应的地址路径字符串外。
上述选中富文本的方法,优选地,所述将处于所述图片所对应的地址路径字符串内的光标移动到所述图片所对应的地址路径字符串外的步骤包括:判断处于所述图片所对应的地址路径字符串内的光标是首部光标还是尾部光标;当是首部光标时,将所述首部光标向后移动到所述图片所对应的地址路径字符串后方。
上述选中富文本的方法,优选地,所述将处于所述图片所对应的地址路径字符串内的光标移动到所述图片所对应的地址路径字符串外的步骤还包括:当是尾部光标时,将所述尾部光标向前移动到所述图片所对应的地址路径字符串前方。
上述选中富文本的方法,优选地,所述将处于所述图片所对应的地址路径字符串内的光标移动到所述图片所对应的地址路径字符串外的步骤包括:判断处于所述图片所对应的地址路径字符串内的光标处于所述图片所对应的地址路径字符串的前部还是后部;当处于前部时,将所述处于前部的光标向前移动到所述图片所对应的地址路径字符串前方。
上述选中富文本的方法,优选地,所述将处于所述图片所对应的地址路径字符串内的光标移动到所述图片所对应的地址路径字符串外的步骤还包括:当处于后部时,将所述处于后部的光标向后移动到所述图片所对应的地址路径字符串后方。
相应地,本申请另一实施例公开了一种选中富文本的装置,包括:显示单元,用于根据用户的长按操作,在感测到所述长按操作的位置处显示首部光标和尾部光标;获取单元,用于根据用户的拖动操作,获取拖动后的首部光标和尾部光标的位置;判断单元,用于判断所述拖动后的首部光标和/或尾部光标的位置是否处于图片所对应的地址路径字符串内;移动单元,用于在所述判断单元判断所述拖动后的首部光标和/或尾部光标的位置处于所述图片所对应的地址路径字符串内时,将处于所述图片所对应的地址路径字符串内的光标移动到所述图片所对应的地址路径字符串外。
上述的选中富文本的装置,优选地,所述移动单元包括:第一判断子单元,用于判断处于所述图片所对应的地址路径字符串内的光标是首部光标还是尾部光标;第一移动子单元,用于在所述第一判断子单元判断是首部光标时,将所述首部光标向后移动到所述图片所对应的地址路径字符串后方。
上述的选中富文本的装置,优选地,所述移动单元还包括:第二移动子单元,用于在所述第一判断子单元判断是尾部光标时,将所述尾部光标向前移动到所述图片所对应的地址路径字符串前方。
上述的选中富文本的装置,优选地,所述移动单元包括:第二判断子单元,用于判断处于所述图片所对应的地址路径字符串内的光标处于所述图片所对应的地址路径字符串的前部还是后部;第三移动子单元,用于在 所述第二判断子单元判断处于前部时,将所述处于前部的光标向前移动到所述图片所对应的地址路径字符串前方。
上述的选中富文本的装置,优选地,所述移动单元还包括:第四移动子单元,用于在所述第二判断子单元判断处于后部时,将所述处于后部的光标向后移动到所述图片所对应的地址路径字符串后方。
本申请实施例又提供了一种电子设备,包括至少一个处理器;以及,与所述至少一个处理器通信连接的存储器;其中,所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够根据用户的长按操作,在感测到所述长按操作的位置处显示首部光标和尾部光标;根据用户的拖动操作,获取拖动后的首部光标和尾部光标的位置;判断所述拖动后的首部光标和/或尾部光标的位置是否处于图片所对应的地址路径字符串内;将处于所述图片所对应的地址路径字符串内的光标移动到所述图片所对应的地址路径字符串外。
上述的电子设备,优选地,所述将处于所述图片所对应的地址路径字符串内的光标移动到所述图片所对应的地址路径字符串外包括:判断处于所述图片所对应的地址路径字符串内的光标是首部光标还是尾部光标;当是首部光标时,将所述首部光标向后移动到所述图片所对应的地址路径字符串后方。
上述的电子设备,优选地,所述将处于所述图片所对应的地址路径字符串内的光标移动到所述图片所对应的地址路径字符串外还包括:当是尾部光标时,将所述尾部光标向前移动到所述图片所对应的地址路径字符串前方。
上述的电子设备,优选地,所述将处于所述图片所对应的地址路径字符串内的光标移动到所述图片所对应的地址路径字符串外包括判断处于所述图片所对应的地址路径字符串内的光标处于所述图片所对应的地址路径字符串的前部还是后部;当处于前部时,将所述处于前部的光标向前移动到所述图片所对应的地址路径字符串前方。
上述的电子设备,优选地,所述将处于所述图片所对应的地址路径字 符串内的光标移动到所述图片所对应的地址路径字符串外还包括当处于后部时,将所述处于后部的光标向后移动到所述图片所对应的地址路径字符串后方。
本申请实施例还提供了一种非易失性计算机存储介质,所述存储介质存储有计算机可执行指令,所述计算机可执行指令当由电子设备执行时使得电子设备能够根据用户的长按操作,在感测到所述长按操作的位置处显示首部光标和尾部光标;根据用户的拖动操作,获取拖动后的首部光标和尾部光标的位置;判断所述拖动后的首部光标和/或尾部光标的位置是否处于图片所对应的地址路径字符串内;将处于所述图片所对应的地址路径字符串内的光标移动到所述图片所对应的地址路径字符串外。
上述非易失性计算机存储介质,优选地,所述将处于所述图片所对应的地址路径字符串内的光标移动到所述图片所对应的地址路径字符串外包括:判断处于所述图片所对应的地址路径字符串内的光标是首部光标还是尾部光标;当是首部光标时,将所述首部光标向后移动到所述图片所对应的地址路径字符串后方。
上述非易失性计算机存储介质,优选地,所述将处于所述图片所对应的地址路径字符串内的光标移动到所述图片所对应的地址路径字符串外还包括:当是尾部光标时,将所述尾部光标向前移动到所述图片所对应的地址路径字符串前方。
上述非易失性计算机存储介质,优选地,所述将处于所述图片所对应的地址路径字符串内的光标移动到所述图片所对应的地址路径字符串外包括:判断处于所述图片所对应的地址路径字符串内的光标处于所述图片所对应的地址路径字符串的前部还是后部;当处于前部时,将所述处于前部的光标向前移动到所述图片所对应的地址路径字符串前方。
上述非易失性计算机存储介质,优选地,所述将处于所述图片所对应的地址路径字符串内的光标移动到所述图片所对应的地址路径字符串外还包括:当处于后部时,将所述处于后部的光标向后移动到所述图片所对应的地址路径字符串后方。
本申请实施例还提供了一种计算机程序产品,所述计算机程序产品包括存储在非暂态计算机可读存储介质上的计算机程序,所述计算机程序包括程序指令,其特征在于,当所述程序指令被计算机执行时,使所述计算机执行上述任一所述的方法。
本申请实施例所提供的选中富文本的方法、装置和电子设备,移动终端在检测到拖动后的首部光标和/或尾部光标的位置处于图片所对应的地址路径字符串内时,将处于图片所对应的地址路径字符串内的光标移动到该图片所对应的地址路径字符串外,从而可以避免选中图片所对应的一部分地址路径字符串。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1A至图1D示出了选中富文本时光标被拖动到图片内的示意图;
图2示出了根据本申请实施例的选中富文本的方法的流程图;
图3示出了根据本申请实施例的选中富文本的方法的一个具体实施方式的流程图;
图4示出了根据本申请实施例的选中富文本的方法的另一个具体实施方式的流程图;
图5示出了根据本申请实施例的选中富文本的装置的示意图;
图6示出了根据本申请实施例的电子设备的硬件结构示意图。
具体实施方式
下面将结合附图对本发明的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
在本发明的描述中,需要说明的是,术语“中心”、“上”、“下”、“左”、“右”、“竖直”、“水平”、“内”、“外”等指示的方位或位置关系为基于附图所示的方位或位置关系,仅是为了便于描述本发明和简化描述,而不是指示或暗示所指的装置或元件必须具有特定的方位、以特定的方位构造和操作,因此不能理解为对本发明的限制。此外,术语“第一”、“第二”、“第三”仅用于描述目的,而不能理解为指示或暗示相对重要性。
在本发明的描述中,需要说明的是,除非另有明确的规定和限定,术语“安装”、“相连”、“连接”应做广义理解,例如,可以是固定连接,也可以是可拆卸连接,或一体地连接;可以是机械连接,也可以是电连接;可以是直接相连,也可以通过中间媒介间接相连,还可以是两个元件内部的连通,可以是无线连接,也可以是有线连接。对于本领域的普通技术人员而言,可以具体情况理解上述术语在本发明中的具体含义。
此外,下面所描述的本发明不同实施方式中所涉及的技术特征只要彼此之间未构成冲突就可以相互结合。
本申请实施例提供了一种选中富文本的方法,适用于手机、平板电脑等移动终端,如图2所示,该方法包括如下步骤:
S100.根据用户的长按操作,在感测到长按操作的位置处显示首部光标和尾部光标。对于手机、平板电脑等移动终端而言,该长按操作通常是用手指完成的,当然也可以是触碰笔等。当用户对某个外文单词进行长按时,首部光标和尾部光标可以位于该外文单词的两端以选中该外文单词,当用户对某个汉字进行长按时,首部光标和尾部光标可以位于该汉字的两端以选中该汉字,当该汉字前后存在与该汉字组成词语的汉字时,首部光标和尾部光标可以位于所组成的词语两端以选中该词语。
S200.根据用户的拖动操作,获取拖动后的首部光标和尾部光标的位置。用户可以用手指或触碰笔等拖动首部光标和尾部光标,以选中所需要的富文本,在拖动结束后,移动终端可以很容易地获取到拖动后的首部光标和尾部光标的位置。
S300.判断拖动后的首部光标和/或尾部光标的位置是否处于图片所对 应的地址路径字符串内,如果是则执行步骤S400,如果否,则说明光标处于普通文字中,用户可正常进行复制、粘贴等操作。
S400.将处于图片所对应的地址路径字符串内的光标移动到该图片所对应的地址路径字符串外。
通过上述方法步骤,移动终端在检测到拖动后的首部光标和/或尾部光标的位置处于图片所对应的地址路径字符串内时,将处于图片所对应的地址路径字符串内的光标移动到该图片所对应的地址路径字符串外,从而可以避免选中图片所对应的一部分地址路径字符串。
作为一种优选实施方式,如图3所示,上述步骤S400可以包括:
S401.判断处于图片所对应的地址路径字符串内的光标是首部光标还是尾部光标,当是首部光标时执行步骤S402,当是尾部光标时执行步骤S403。
S402.将该首部光标向后移动到该图片所对应的地址路径字符串后方。如图1A所示,当图片例如以<img src=”图片地址”>的形式插入到富文本中时,将光标移到在后的尖括号“>”后方。
S403.将该尾部光标向前移动到该图片所对应的地址路径字符串前方。如图1B所示,当图片例如以<img src=”图片地址”>的形式插入到富文本中时,将光标移到在前的尖括号“<”前方。
当然,当首部光标与尾部光标都处于图片所对应的地址路径字符串内时,则步骤S402和步骤S403都会执行。通过上述方法步骤,将首部光标向后移动到该图片所对应的地址路径字符串后方,将尾部光标向前移动到该图片所对应的地址路径字符串前方,从而不选中图片,以避免选中图片所对应的一部分地址路径字符串。如果用户还希望选中图片,则用户只需在图片的位置处执行长按操作即可以选中图片。
然而,采用步骤S401-S403是无法选中图片的,用户需要复制图片还需要在图片的位置处执行长按操作以选中图片,用户操作上仍然过于复杂。作为一种改进实施方式,如图4所示,上述步骤S400可以包括:
S404.判断处于图片所对应的地址路径字符串内的光标处于图片所对 应的地址路径字符串的前部还是后部,当处于图片所对应的地址路径字符串的前部时,执行步骤S405,当处于图片所对应的地址路径字符串的后部时,执行步骤S406。
S405.将该光标向前移动到该图片所对应的地址路径字符串前方。
如图1B所示,由于尾部光标处于图片所对应的地址路径字符串的前部,可以判断出用户实际上是不希望选中该图片的,因此当图片例如以<img src=”图片地址”>的形式插入到富文本中时,将光标移到在前的尖括号“<”前方,以避免选中该图片
如图1C所示,由于首部光标处于图片所对应的地址路径字符串的前部,可以判断出用户实际上是希望选中该图片的,因此当图片例如以<img src=”图片地址”>的形式插入到富文本中时,将光标移到在前的尖括号“<”前方,以选中该图片。
S406.将该光标向后移动到该图片所对应的地址路径字符串后方。
如图1A所示,由于首部光标处于图片所对应的地址路径字符串的后部,可以判断出用户实际上是不希望选中该图片的,因此当图片例如以<img src=”图片地址”>的形式插入到富文本中时,将光标移到在后的尖括号“>”后方,以避免选中该图片。
如图1D所示,由于尾部光标处于图片所对应的地址路径字符串的后部,可以判断出用户实际上是希望选中该图片的,因此当图片例如以<img src=”图片地址”>的形式插入到富文本中时,将光标移到在后的尖括号“>”后方,以选中该图片。
通过上述方法步骤,移动终端根据处于图片所对应的地址路径字符串内的光标处于图片所对应的地址路径字符串的前部还是后部来判断用户是否希望选中该图片,进而相应地选中或避免选中图片,既避免了选中图片所对应的一部分地址路径字符串,也无需用户增加额外的操作,给用户带来良好的体验。
相应地,本申请另一实施例提供了一种选中富文本的装置,适用于手机、平板电脑等移动终端,如图5所示,该装置包括:
显示单元100,用于根据用户的长按操作,在感测到长按操作的位置处显示首部光标和尾部光标。对于手机、平板电脑等移动终端而言,该长按操作通常是用手指完成的,当然也可以是触碰笔等。当用户对某个外文单词进行长按时,首部光标和尾部光标可以位于该外文单词的两端以选中该外文单词,当用户对某个汉字进行长按时,首部光标和尾部光标可以位于该汉字的两端以选中该汉字,当该汉字前后存在与该汉字组成词语的汉字时,首部光标和尾部光标可以位于所组成的词语两端以选中该词语。
获取单元200,用于根据用户的拖动操作,获取拖动后的首部光标和尾部光标的位置。用户可以用手指或触碰笔等拖动首部光标和尾部光标,以选中所需要的富文本,在拖动结束后,移动终端可以很容易地获取到拖动后的首部光标和尾部光标的位置。
判断单元300,用于判断拖动后的首部光标和/或尾部光标的位置是否处于图片所对应的地址路径字符串内。当拖动后的首部光标和/或尾部光标的位置不处于图片所对应的地址路径字符串内时,说明光标处于普通文字中,用户可正常进行复制、粘贴等操作。
移动单元400,用于在判断单元300判断拖动后的首部光标和/或尾部光标的位置处于图片所对应的地址路径字符串内时,将处于图片所对应的地址路径字符串内的光标移动到该图片所对应的地址路径字符串外。
通过上述各个单元,移动终端在检测到拖动后的首部光标和/或尾部光标的位置处于图片所对应的地址路径字符串内时,将处于图片所对应的地址路径字符串内的光标移动到该图片所对应的地址路径字符串外,从而可以避免选中图片所对应的一部分地址路径字符串。
作为一种优选实施方式,上述移动单元400可以包括:
第一判断子单元,用于判断处于图片所对应的地址路径字符串内的光标是首部光标还是尾部光标。
第一移动子单元,用于在第一判断子单元判断处于图片所对应的地址路径字符串内的光标是首部光标时,将该首部光标向后移动到该图片所对应的地址路径字符串后方。如图1A所示,当图片例如以<img src=”图片地 址”>的形式插入到富文本中时,将光标移到在后的尖括号“>”后方。
第二移动子单元,用于在第一判断子单元判断处于图片所对应的地址路径字符串内的光标是尾部光标时,将该尾部光标向前移动到该图片所对应的地址路径字符串前方。如图1B所示,当图片例如以<img src=”图片地址”>的形式插入到富文本中时,将光标移到在前的尖括号“<”前方。
当然,当首部光标与尾部光标都处于图片所对应的地址路径字符串内时,则第一移动子单元和第二移动子单元都会执行操作。通过上述各个子单元,将首部光标向后移动到该图片所对应的地址路径字符串后方,将尾部光标向前移动到该图片所对应的地址路径字符串前方,从而不选中图片,以避免选中图片所对应的一部分地址路径字符串。如果用户还希望选中图片,则用户只需在图片的位置处执行长按操作即可以选中图片。
作为一种改进实施方式,上述移动单元400可以包括:
第二判断子单元,用于判断处于图片所对应的地址路径字符串内的光标处于图片所对应的地址路径字符串的前部还是后部。
第三移动子单元,用于在第二判断子单元判断处于图片所对应的地址路径字符串内的光标处于图片所对应的地址路径字符串的前部时,将该光标向前移动到该图片所对应的地址路径字符串前方。在图1B中,将尾部光标向前移动到该图片所对应的地址路径字符串前方,以避免选中该图片;在图1C中,将首部光标向前移动到该图片所对应的地址路径字符串前方,以选中该图片。
第四移动子单元,用于在第二判断子单元判断处于图片所对应的地址路径字符串内的光标处于图片所对应的地址路径字符串的后部时,将该光标向后移动到该图片所对应的地址路径字符串后方。在图1A中,将首部光标向后移动到该图片所对应的地址路径字符串后方,以避免选中该图片;在图1D中,将尾部光标向后移动到该图片所对应的地址路径字符串后方,以选中该图片。
通过上述各个子单元,移动终端根据处于图片所对应的地址路径字符串内的光标处于图片所对应的地址路径字符串的前部还是后部来判断用户 是否希望选中该图片,进而相应地选中或避免选中图片,既避免了选中图片所对应的一部分地址路径字符串,也无需用户增加额外的操作,给用户带来良好的体验。
本申请实施例还提供了一种移动终端,其包括如上所述的选中富文本的装置。在检测到拖动后的首部光标和/或尾部光标的位置处于图片所对应的地址路径字符串内时,将处于图片所对应的地址路径字符串内的光标移动到该图片所对应的地址路径字符串外,从而可以避免选中图片所对应的一部分地址路径字符串。
本申请实施例又提供了一种电子设备,包括至少一个处理器810;以及,与所述至少一个处理器810通信连接的存储器800;其中,所述存储器800存储有可被所述至少一个处理器810执行的指令,所述指令被所述至少一个处理器810执行,以使所述至少一个处理器810能够:根据用户的长按操作,在感测到所述长按操作的位置处显示首部光标和尾部光标;根据用户的拖动操作,获取拖动后的首部光标和尾部光标的位置;判断所述拖动后的首部光标和/或尾部光标的位置是否处于图片所对应的地址路径字符串内;将处于所述图片所对应的地址路径字符串内的光标移动到所述图片所对应的地址路径字符串外。所述电子设备还包括与所述存储器800和所述处理器电连接的输入装置830和输出装置840,所述电连接优选为通过总线连接。
本实施例的电子设备,优选地,所述将处于所述图片所对应的地址路径字符串内的光标移动到所述图片所对应的地址路径字符串外包括:判断处于所述图片所对应的地址路径字符串内的光标是首部光标还是尾部光标;当是首部光标时,将所述首部光标向后移动到所述图片所对应的地址路径字符串后方。
本实施例的电子设备,优选地,所述将处于所述图片所对应的地址路径字符串内的光标移动到所述图片所对应的地址路径字符串外还包括:当是尾部光标时,将所述尾部光标向前移动到所述图片所对应的地址路径字符串前方。
本实施例的电子设备,优选地,所述将处于所述图片所对应的地址路径字符串内的光标移动到所述图片所对应的地址路径字符串外包括判断处于所述图片所对应的地址路径字符串内的光标处于所述图片所对应的地址路径字符串的前部还是后部;当处于前部时,将所述处于前部的光标向前移动到所述图片所对应的地址路径字符串前方。
本实施例的电子设备,优选地,所述将处于所述图片所对应的地址路径字符串内的光标移动到所述图片所对应的地址路径字符串外还包括当处于后部时,将所述处于后部的光标向后移动到所述图片所对应的地址路径字符串后方。
本申请实施例还提供了一种非易失性计算机存储介质,所述存储介质存储有计算机可执行指令,所述计算机可执行指令当由电子设备执行时使得电子设备能够根据用户的长按操作,在感测到所述长按操作的位置处显示首部光标和尾部光标;根据用户的拖动操作,获取拖动后的首部光标和尾部光标的位置;判断所述拖动后的首部光标和/或尾部光标的位置是否处于图片所对应的地址路径字符串内;将处于所述图片所对应的地址路径字符串内的光标移动到所述图片所对应的地址路径字符串外。
本实施例的非易失性计算机存储介质,优选地,所述将处于所述图片所对应的地址路径字符串内的光标移动到所述图片所对应的地址路径字符串外包括:判断处于所述图片所对应的地址路径字符串内的光标是首部光标还是尾部光标;当是首部光标时,将所述首部光标向后移动到所述图片所对应的地址路径字符串后方。
本实施例的非易失性计算机存储介质,优选地,所述将处于所述图片所对应的地址路径字符串内的光标移动到所述图片所对应的地址路径字符串外还包括:当是尾部光标时,将所述尾部光标向前移动到所述图片所对应的地址路径字符串前方。
本实施例的非易失性计算机存储介质,优选地,所述将处于所述图片所对应的地址路径字符串内的光标移动到所述图片所对应的地址路径字符串外包括:判断处于所述图片所对应的地址路径字符串内的光标处于所述 图片所对应的地址路径字符串的前部还是后部;当处于前部时,将所述处于前部的光标向前移动到所述图片所对应的地址路径字符串前方。
本实施例的非易失性计算机存储介质,优选地,所述将处于所述图片所对应的地址路径字符串内的光标移动到所述图片所对应的地址路径字符串外还包括:当处于后部时,将所述处于后部的光标向后移动到所述图片所对应的地址路径字符串后方。
本申请实施例还提供了一种计算机程序产品,所述计算机程序产品包括存储在非暂态计算机可读存储介质上的计算机程序,所述计算机程序包括程序指令,其特征在于,当所述程序指令被计算机执行时,使所述计算机执行上述任一所述的方法。
本领域内的技术人员还应理解,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本申请是参照根据本申请实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的,应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个 流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
显然,上述实施例仅仅是为清楚地说明所作的举例,而并非对实施方式的限定。对于所属领域的普通技术人员来说,在上述说明的基础上还可以做出其它不同形式的变化或变动。这里无需也无法对所有的实施方式予以穷举。而由此所引伸出的显而易见的变化或变动仍处于本发明创造的保护范围之中。

Claims (21)

  1. 一种选中富文本的方法,其特征在于,包括:
    根据用户的长按操作,在感测到所述长按操作的位置处显示首部光标和尾部光标;
    根据用户的拖动操作,获取拖动后的首部光标和尾部光标的位置;
    判断所述拖动后的首部光标和/或尾部光标的位置是否处于图片所对应的地址路径字符串内;
    将处于所述图片所对应的地址路径字符串内的光标移动到所述图片所对应的地址路径字符串外。
  2. 根据权利要求1所述的选中富文本的方法,其特征在于,所述将处于所述图片所对应的地址路径字符串内的光标移动到所述图片所对应的地址路径字符串外的步骤包括:
    判断处于所述图片所对应的地址路径字符串内的光标是首部光标还是尾部光标;
    当是首部光标时,将所述首部光标向后移动到所述图片所对应的地址路径字符串后方。
  3. 根据权利要求2所述的选中富文本的方法,其特征在于,所述将处于所述图片所对应的地址路径字符串内的光标移动到所述图片所对应的地址路径字符串外的步骤还包括:
    当是尾部光标时,将所述尾部光标向前移动到所述图片所对应的地址路径字符串前方。
  4. 根据权利要求1所述的选中富文本的方法,其特征在于,所述将处于所述图片所对应的地址路径字符串内的光标移动到所述图片所对应的地址路径字符串外的步骤包括:
    判断处于所述图片所对应的地址路径字符串内的光标处于所述图片所对应的地址路径字符串的前部还是后部;
    当处于前部时,将所述处于前部的光标向前移动到所述图片所对应的地址路径字符串前方。
  5. 根据权利要求4所述的选中富文本的方法,其特征在于,所述将处于所述图片所对应的地址路径字符串内的光标移动到所述图片所对应的地址路径字符串外的步骤还包括:
    当处于后部时,将所述处于后部的光标向后移动到所述图片所对应的地址路径字符串后方。
  6. 一种选中富文本的装置,其特征在于,包括:
    显示单元,用于根据用户的长按操作,在感测到所述长按操作的位置处显示首部光标和尾部光标;
    获取单元,用于根据用户的拖动操作,获取拖动后的首部光标和尾部光标的位置;
    判断单元,用于判断所述拖动后的首部光标和/或尾部光标的位置是否处于图片所对应的地址路径字符串内;
    移动单元,用于在所述判断单元判断所述拖动后的首部光标和/或尾部光标的位置处于所述图片所对应的地址路径字符串内时,将处于所述图片所对应的地址路径字符串内的光标移动到所述图片所对应的地址路径字符串外。
  7. 根据权利要求6所述的选中富文本的装置,其特征在于,所述移动单元包括:
    第一判断子单元,用于判断处于所述图片所对应的地址路径字符串内的光标是首部光标还是尾部光标;
    第一移动子单元,用于在所述第一判断子单元判断是首部光标时,将所述首部光标向后移动到所述图片所对应的地址路径字符串后方。
  8. 根据权利要求7所述的选中富文本的装置,其特征在于,所述移动单元还包括:
    第二移动子单元,用于在所述第一判断子单元判断是尾部光标时,将所述尾部光标向前移动到所述图片所对应的地址路径字符串前方。
  9. 根据权利要求6所述的选中富文本的装置,其特征在于,所述移动单元包括:
    第二判断子单元,用于判断处于所述图片所对应的地址路径字符串内的光标处于所述图片所对应的地址路径字符串的前部还是后部;
    第三移动子单元,用于在所述第二判断子单元判断处于前部时,将所述处于前部的光标向前移动到所述图片所对应的地址路径字符串前方。
  10. 根据权利要求9所述的选中富文本的装置,其特征在于,所述移动单元还包括:
    第四移动子单元,用于在所述第二判断子单元判断处于后部时,将所述处于后部的光标向后移动到所述图片所对应的地址路径字符串后方。
  11. 一种电子设备,其特征在于,包括至少一个处理器;以及,与所述至少一个处理器通信连接的存储器;其中,所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够:
    根据用户的长按操作,在感测到所述长按操作的位置处显示首部光标和尾部光标;
    根据用户的拖动操作,获取拖动后的首部光标和尾部光标的位置;
    判断所述拖动后的首部光标和/或尾部光标的位置是否处于图片所对应的地址路径字符串内;
    将处于所述图片所对应的地址路径字符串内的光标移动到所述图片所对应的地址路径字符串外。
  12. 根据权利要求11所述的电子设备,其特征在于,所述将处于所述图片所对应的地址路径字符串内的光标移动到所述图片所对应的地址路径字符串外包括:
    判断处于所述图片所对应的地址路径字符串内的光标是首部光标还是尾部光标;
    当是首部光标时,将所述首部光标向后移动到所述图片所对应的地址路径字符串后方。
  13. 根据权利要求12所述的电子设备,其特征在于,所述将处于所述图片所对应的地址路径字符串内的光标移动到所述图片所对应的地址路径 字符串外还包括:
    当是尾部光标时,将所述尾部光标向前移动到所述图片所对应的地址路径字符串前方。
  14. 根据权利要求11所述的电子设备,其特征在于,所述将处于所述图片所对应的地址路径字符串内的光标移动到所述图片所对应的地址路径字符串外包括:
    判断处于所述图片所对应的地址路径字符串内的光标处于所述图片所对应的地址路径字符串的前部还是后部;
    当处于前部时,将所述处于前部的光标向前移动到所述图片所对应的地址路径字符串前方。
  15. 根据权利要求14所述的电子设备,其特征在于,所述将处于所述图片所对应的地址路径字符串内的光标移动到所述图片所对应的地址路径字符串外还包括:
    当处于后部时,将所述处于后部的光标向后移动到所述图片所对应的地址路径字符串后方。
  16. 一种非易失性计算机存储介质,其特征在于,所述存储介质存储有计算机可执行指令,所述计算机可执行指令当由电子设备执行时使得电子设备能够:
    根据用户的长按操作,在感测到所述长按操作的位置处显示首部光标和尾部光标;
    根据用户的拖动操作,获取拖动后的首部光标和尾部光标的位置;
    判断所述拖动后的首部光标和/或尾部光标的位置是否处于图片所对应的地址路径字符串内;
    将处于所述图片所对应的地址路径字符串内的光标移动到所述图片所对应的地址路径字符串外。
  17. 根据权利要求16所述的非易失性计算机存储介质,其特征在于,所述将处于所述图片所对应的地址路径字符串内的光标移动到所述图片所对应的地址路径字符串外包括:
    判断处于所述图片所对应的地址路径字符串内的光标是首部光标还是尾部光标;
    当是首部光标时,将所述首部光标向后移动到所述图片所对应的地址路径字符串后方。
  18. 根据权利要求17所述的非易失性计算机存储介质,其特征在于,所述将处于所述图片所对应的地址路径字符串内的光标移动到所述图片所对应的地址路径字符串外还包括:
    当是尾部光标时,将所述尾部光标向前移动到所述图片所对应的地址路径字符串前方。
  19. 根据权利要求16所述的非易失性计算机存储介质,其特征在于,所述将处于所述图片所对应的地址路径字符串内的光标移动到所述图片所对应的地址路径字符串外包括:
    判断处于所述图片所对应的地址路径字符串内的光标处于所述图片所对应的地址路径字符串的前部还是后部;
    当处于前部时,将所述处于前部的光标向前移动到所述图片所对应的地址路径字符串前方。
  20. 根据权利要求18所述的非易失性计算机存储介质,其特征在于,所述将处于所述图片所对应的地址路径字符串内的光标移动到所述图片所对应的地址路径字符串外还包括:
    当处于后部时,将所述处于后部的光标向后移动到所述图片所对应的地址路径字符串后方。
  21. 一种计算机程序产品,所述计算机程序产品包括存储在非暂态计算机可读存储介质上的计算机程序,所述计算机程序包括程序指令,其特征在于,当所述程序指令被计算机执行时,使所述计算机执行上述任一权利要求所述的方法。
PCT/CN2016/100271 2016-05-04 2016-09-27 选中富文本的方法、装置和电子设备 Ceased WO2017190465A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610289755.7A CN105955629A (zh) 2016-05-04 2016-05-04 选中富文本的方法和装置
CN201610289755.7 2016-05-04

Publications (1)

Publication Number Publication Date
WO2017190465A1 true WO2017190465A1 (zh) 2017-11-09

Family

ID=56913938

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/100271 Ceased WO2017190465A1 (zh) 2016-05-04 2016-09-27 选中富文本的方法、装置和电子设备

Country Status (2)

Country Link
CN (1) CN105955629A (zh)
WO (1) WO2017190465A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105955629A (zh) * 2016-05-04 2016-09-21 乐视控股(北京)有限公司 选中富文本的方法和装置
CN107943391A (zh) * 2017-11-15 2018-04-20 宁波麦博韦尔移动电话有限公司 一种长按快速计算方法及系统
CN114510909A (zh) * 2020-10-29 2022-05-17 华为技术有限公司 一种基于终端设备的数据选择方法与电子设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101183354A (zh) * 2007-12-12 2008-05-21 腾讯科技(深圳)有限公司 彩虹文本实现方法及装置
CN102929524A (zh) * 2012-09-20 2013-02-13 东莞宇龙通信科技有限公司 一种页面内容的选取方法和装置
CN103135901A (zh) * 2013-02-04 2013-06-05 广东欧珀移动通信有限公司 移动终端中精确选择文本文字的方法及该移动终端
CN105511784A (zh) * 2015-12-02 2016-04-20 北京新美互通科技有限公司 一种基于压力检测的信息输入方法、装置,及移动终端
CN105955629A (zh) * 2016-05-04 2016-09-21 乐视控股(北京)有限公司 选中富文本的方法和装置

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4254573B2 (ja) * 2004-02-27 2009-04-15 株式会社日立製作所 表示方法および表示装置
CN104516621A (zh) * 2013-09-27 2015-04-15 北京新媒传信科技有限公司 一种显示光标的方法及装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101183354A (zh) * 2007-12-12 2008-05-21 腾讯科技(深圳)有限公司 彩虹文本实现方法及装置
CN102929524A (zh) * 2012-09-20 2013-02-13 东莞宇龙通信科技有限公司 一种页面内容的选取方法和装置
CN103135901A (zh) * 2013-02-04 2013-06-05 广东欧珀移动通信有限公司 移动终端中精确选择文本文字的方法及该移动终端
CN105511784A (zh) * 2015-12-02 2016-04-20 北京新美互通科技有限公司 一种基于压力检测的信息输入方法、装置,及移动终端
CN105955629A (zh) * 2016-05-04 2016-09-21 乐视控股(北京)有限公司 选中富文本的方法和装置

Also Published As

Publication number Publication date
CN105955629A (zh) 2016-09-21

Similar Documents

Publication Publication Date Title
US20230143275A1 (en) Software clipboard
CN103577042B (zh) 用于提供消息功能的方法及其电子装置
WO2021129186A1 (zh) 一种文件处理方法、电子设备、系统和存储介质
EP2811731B1 (en) Electronic device for editing dual image and method thereof
BR102013030675A2 (pt) equipamento e método de gerenciamento de uma pluralidade de objetos exibidos em tela sensível ao toque
CN105518604A (zh) 对套索选择的反馈
CN107797971A (zh) 文档批注方法、装置和电子设备
JP2014110056A (ja) 終了効果を表示するモバイル装置及びその制御方法
CN104317498A (zh) 便携式终端及其操作方法
CN103593180B (zh) 一种在应用程序中添加文件的方法和装置
CN109145272B (zh) 文本渲染和布局方法、装置、设备和存储介质
CN103616982A (zh) 一种在触摸屏设备上新建文件夹的方法及触摸屏设备
CN108475221A (zh) 用于提供多任务处理视图的方法和装置
WO2017032307A1 (zh) 一种文件夹的合并方法及装置
CN110704647A (zh) 一种内容处理方法及装置
CN104123383A (zh) 一种在媒体应用中使用的方法及装置
CN111524210A (zh) 用于生成绘图的方法和装置
US9841881B2 (en) Two step content selection with auto content categorization
CN108646994A (zh) 信息处理方法、装置、移动终端及存储介质
CN106354378B (zh) 一种快速选中多个目标的方法和装置
US10990267B2 (en) Two step content selection
WO2017190465A1 (zh) 选中富文本的方法、装置和电子设备
CN107239351B (zh) 粘贴方法及装置
WO2018000655A1 (zh) 富文本编辑方法、装置、移动终端和电子设备
CN110929484A (zh) 文本处理方法、装置及存储介质

Legal Events

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

Ref country code: DE

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

Ref document number: 16900987

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 16900987

Country of ref document: EP

Kind code of ref document: A1