Feature request #4080

Html formatted labels

Added by Borys Jurgiel almost 13 years ago. Updated almost 7 years ago.

Assignee:Nathan Woodrow
Category:Map Canvas
Pull Request or Patch supplied:No Resolution:
Easy fix?:No Copied to github as #:14063


In addition to expression based labels (#3488), it would be great to have a partial html formatting (e.g. <font size> <b> <i> <br> and <hr>)
Especially the horizontal line is often required:

some_field || '<hr/>' || another_field

HTML_Editor.jpg (28.7 KB) Azlan Budi, 2014-05-07 09:44 PM

htmllabels.png (22.7 KB) Nathan Woodrow, 2016-02-28 03:10 AM


#1 Updated by cgsbob - over 12 years ago

  • Pull Request or Patch supplied set to No

I'd also like to see a WYSIWYG editor like the Redmine editor I'm typing in now. Then you don't have to remember the markup language.

#2 Updated by Pirmin Kalberer over 11 years ago

  • Target version changed from Version 2.0.0 to Future Release - Nice to have

#3 Updated by Giedrius Vaivilavičius over 10 years ago

Make a bold or italic, and change the color of individual words Label. Example: the first line is bold in red text, font 12, second row 10 green italic font.

#4 Updated by Antonio Locandro over 10 years ago

I agree this would be an useful feature, and also in combination with a WYSIWYG editor would make a powerful combo if possible

#5 Updated by Azlan Budi almost 10 years ago

CKeditor like WYSIWYG editor on top of HTML formSomething like this in Map composer, where you can also do tables easily.
Probably a simplified version can be used in other function such as Text Annotation.

#6 Updated by Mete Ercan Pakdil over 8 years ago

Hello there,

Last week I made a presentation about my paper titled "Smart Aeronautical Chart Management System Design" in GeoAdvances 2015, Kuala Lumpur.

In the "Questions" part of my presentation, a professor from UCL (unfortunately I don't remember her name) asked me "why not a open source GIS instead of ArcGIS". I explained that aeronautical charts need special labels and OS GIS apps do not have this functionality yet. The professor suggested me here to request this functionality.

Indeed, Borys Jurgiel already asked it but it is changed to "Nice to Have". However, this is very important in aeronautical charts. I beleive by using of HTML capabilities, we can produce charts in QGIS. Only two commercial apps from ESRI and Luciad can make it.

Paper: http://www.isprs-ann-photogramm-remote-sens-spatial-inf-sci.net/II-2-W2/index.html

#7 Updated by Martin HOFFMANN about 8 years ago

A little up because this feature request just popped up again 5 days ago at GIS Stack Exchange

And for the record theses very similar questions are being up-voted on regular basis and still don't have satisfactory answers.

As I said in the latest thread, this is one of my last "damn ArcGis is still better on that" point...

#8 Updated by Nathan Woodrow about 8 years ago

  • % Done changed from 0 to 10
  • File htmllabels.png added
  • Assignee set to Nathan Woodrow

Work in progress

#9 Updated by Martin HOFFMANN over 7 years ago

Hello this seems partially implemented in 2.16.2

If I input this in the expression editor:

format('<h1>This</h1><b style="color: blue">%1 a %2</b>','is', 'test')

I can seen the formatted result preview in the expression editor but not in the canvas.
Is it normal? People may thing this is working while actually it is still in development...

#10 Updated by mr twister over 7 years ago

In 2.18.0 the formatted result is still in the preview of the expression editor but not in the canvas visible. This is a feature I have been waiting for a long time.

#11 Updated by Harrissou Santanna about 7 years ago

mr twister wrote:

This is a feature I have been waiting for a long time.

Please, do not simply wait for it. Help devs make it a reality (there's already a work in progress at https://github.com/qgis/QGIS/pull/2856). If you are looking for it, you can advertise on it, (help) raise a funding/crowfunding on it and, given all interested people here (plus those who didn't express their interest), it might be doable.
See http://nyalldawson.net/2016/08/how-to-effectively-get-things-changed-in-qgis/

#12 Updated by Giovanni Manghi almost 7 years ago

  • Easy fix? set to No

Also available in: Atom PDF