Implement the native Kindle system and read comments from the system.

Source: Internet
Author: User

Start with Kindle and start Epub by yourself. We have been using the native system. The pop-up comment code used is as follows:

<P class = "p_footnote" id = "ref_footnotebookmark_end_9_1"> <span style = "font-size: 0.75em; Vertical-align: Super; "> <a href =" # ref_footnotebookmark_start_9_1 "> ① </a> </span> comments </P>

Gradually, due to the need to create Epub, I began to use more systems. At this time, the native system prompts invalid annotation code, which caused great inconvenience-I had to make two different Epub to adapt to system switching. For more information, see the pop-up comment Code as follows:

<Ol class = "duokan-footnote-content"> <li class = "duokan-footnote-item" id = "a_1_1"> <a href = "# c_1_1"> here is note </LI> </OL>

So I began to look for a way to make the pop-up window annotations support native and more. The above Code shows that the pop-up window comment of the native system is based on the label <p>, and the comment of the pop-up window comment of the system depends on <ol>, so I have an idea, if two labels are nested, can two system pop-up windows be implemented?

At first, I nested <p> in <li> and <p> in <A>. The Code is as follows:

1 <ol class = "duokan-footnote-content"> 2 <li class = "duokan-footnote-item" id = "a_1_1"> 3 <p> <a href =" # c_1_1 "> here is the comment </a> </P> 4 </LI> 5 </OL> 6 <! -- <P> nested in <li> -->
1 <ol class = "duokan-footnote-content"> 2 <li class = "duokan-footnote-item" id = "a_1_1"> 3 <a href = "# c_1_1"> <p> note </P> </a> 4 </LI> 5 </OL> 6 <! -- <P> nested in <A> -->

However, both methods are invalid in actual tests. But under the guidance of Forum friends, I found such a method. The Code is as follows:

1 <ol class = "duokan-footnote-content"> 2 <li class = "duokan-footnote-item" id = "ref_footnotebookmark_end_1_1"> 3 <P class = "F"> <a href = "# ref_footnotebookmark_start_1_1"> here is a comment </a> ?? & Amp; #8203 ;?????? </P> 4 </LI> 5 </OL>

 

P.s. "& #8203;" this string is zero-width space (zero-width non-wrap space)

P.s. wildcard characters can be used for batch modification as follows:

Search: <li class = "duokan-footnote-item" id = "(.*?) "> <A href = "#(.*?) "> (.*?) </LI>

Replace: <li class = "duokan-footnote-item" id = "\ 1"> <P class = "F"> <a href = "# \ 2"> \ 3 </ a> & #8203 ;????????? </P>

Implement the native Kindle system and read comments from the system.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.