what's the proper method of customizing placeholder text in the search field?
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 115
- Joined: Mon Jul 10, 2023 11:49 am
what's the proper method of customizing placeholder text in the search field?
Since I want to tell users to split Chinese keywords with more than 3 words into several parts, for example, split 数据库操作 to 数据 库 操作, so I'm trying to add a custom prompt text in the search field of webhelp. My guess is to modify the placeholder text for the input element of class wh_search_textfield.
For example,
<div class=" wh_search_input "><form id="searchForm" method="get" role="search" action="search.html"><div><input type="search" placeholder="为什么啊 为什么 " class="wh_search_textfield" id="textToSearch" name="searchQuery" aria-label="搜索查询" required="required"><button type="submit" class="wh_search_button" aria-label="搜索"><span class="search_input_text">搜索</span></button></div></form></div>
Note that I used the search-in-header template (https://github.com/oxygenxml/oxygen-pub ... -in-header), so I added the preceding div scripts to the move-search-in-header.xsl. see attached.
But insert the div scripts to here doesn't work at all:
Thank you!
For example,
<div class=" wh_search_input "><form id="searchForm" method="get" role="search" action="search.html"><div><input type="search" placeholder="为什么啊 为什么 " class="wh_search_textfield" id="textToSearch" name="searchQuery" aria-label="搜索查询" required="required"><button type="submit" class="wh_search_button" aria-label="搜索"><span class="search_input_text">搜索</span></button></div></form></div>
Note that I used the search-in-header template (https://github.com/oxygenxml/oxygen-pub ... -in-header), so I added the preceding div scripts to the move-search-in-header.xsl. see attached.
move-search-in-header.zip
But insert the div scripts to here doesn't work at all:
image.png
Because in the output I have the following layout:image.png
So which file should I modify to customize the placeholder text in a search field?Thank you!
You do not have the required permissions to view the files attached to this post.
-
- Site Admin
- Posts: 275
- Joined: Thu Dec 24, 2009 11:21 am
Re: what's the proper method of customizing placeholder text in the search field?
Alin Balasa
Software Developer
<oXygen/> XML Editor
http://www.oxygenxml.com
Software Developer
<oXygen/> XML Editor
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service