1

Whenever I retrieve the contents of an RichText field, any images contained within are returned with absolute width and height, which in turn breaks my responsive design. This happens even if I use the CKEditor as an input device and create the document via an Xpage. Changing the image properties in the Notes client does not have any impact either.

Before I start manipulating my HTML source output to remove the tags I wanted to ask whether there is a setting to prevent this behaviour or what exactly the best practise was to get your images out without width and height?

1 Answers1

0

Not sure if you found a solution or not, but you can manipulate the source in runtime using jQuery. You can then use jQuery to add the Bootstrap responsive class to make the images fit nicely wherever they are. Try something like this in the onClientLoad (client side script):

$("img").removeAttr("width");
$("img").removeAttr("height");
$("img").addClass("img-responsive");

Good luck!