开发者

Blog paragraph tagging

开发者 https://www.devze.com 2023-03-03 07:09 出处:网络
I had built a weblog using JSP technology. I\'m thinking to make my application a bit more interesting by implementing the idea of paragraph tagging. Let\'s say I have enter开发者_JAVA技巧ed 3 paragra

I had built a weblog using JSP technology. I'm thinking to make my application a bit more interesting by implementing the idea of paragraph tagging. Let's say I have enter开发者_JAVA技巧ed 3 paragraphs of content into the 'Body' field of my new blog entry. Is it possible to apply different tags to each paragraph? Normally we enter tags which tagged to the whole blog entry, but not on specific paragraph. How can I make it in programming? I don't know if this question is programming-related or not but I need some guides on implementing this 'paragraph tagging' idea in a more user-friendly way. Thanks.


On the UI side, I suppose much depends on finding a design that fits with your current approach and works for your users; but if starting from a totally clean slate I'd be tempted to display a 'tagging' view after the user finishes drafting their post, in which they can highlight each paragraph in turn and enter appropriate tags into an input field.

Structuring the data in Java ought to be fairly straightforward: one might consider treating the blog post as a list of paragraph objects, each having a member variable containing its set of tags.

As an aside, I can't help pondering whether the tags a user is likely to assign to any given paragraph won't merely be some key words that could be automatically extracted from its text—in which case, perhaps such tagging could be avoided altogether?

0

精彩评论

暂无评论...
验证码 换一张
取 消