I just integrate CKEditor 4 in my web, the problem is when I paste HTML code into edit area like this
enter image description here
the value I got is enter image description here
So, Is there a way I can store Raw Html like the first picture?
UPDATE: I want CKEditor know when I paste HTML Code, Output HTML also is raw HTML
UPDATE:
I add these lines to my config.js
config.htmlEncodeOutput = false;
config.fullPage = true;
config.basicEntities = false;
It solved the problem
Related
i'm trying to manipulate pdf and i tried some of opensource libraries (e.g pdfSharp, pdfjet) and i cannot achive what i must do. Because pdfsharp add it with a new page to pdf, or pdfjet put an advert into pdf. So, i cannot use those libraries.
What i must achive is:
i must put a string at the end of the last page of pdf. If last page have enough space to put the string, then there is no need to add a new page, otherwise, string can be splitted or add a new page to pdf.
Here is a code sample i tried;
HtmlToPdf renderer = new IronPdf.HtmlToPdf();
IronPdf.PdfDocument doc = IronPdf.PdfDocument.FromFile(existingPdfPath);
doc.AppendPdf(renderer.RenderHtmlAsPdf(stringAddToPdf));
doc.SaveAs(newPdfPath);
Thanks for helps,
From what I can understand, AppendPdf is actually designed to always insert a new page..
https://ironpdf.com/c%23-pdf-documentation/html/M_IronPdf_PdfDocument_AppendPdf.htm
My suggestion would be to add the string as a footer as this should be possible either with AddHeaders/AddFooters/AddHTMLHeaders/AddHTMLFooters
https://ironpdf.com/c%23-pdf-documentation/html/Methods_T_IronPdf_PdfDocument.htm
I try to put this in the source code of CKEditor:
<h2>Title</h2>
It automatically transforms into this:
<h2>Title</h2>
I tried setting config.allowedContent = true; in config.js, but it does not do anything.
Thank you
Please have a look at below issues:
https://dev.ckeditor.com/ticket/9457
https://github.com/ckeditor/ckeditor-dev/issues/514
CKEditor in general doesn't support transparent content model, but perhaps based on tip from second link, you will be able to achieve that result by changing the editor DTD.
Found a very similar question here: CKEditor classes being stripped
I am using CKEditor 4.2, and I have found it automatically changes content/formats.
For example I have a plugin which automatically creates a new page and a link to it in the text editor, if I create a new page called 'newPage' it creates this code:
<p> </p>
<p><a class="wiki_page_link" href="newpage">newpage</a></p>
This is shown when I click the source button on the CKEditor, now if I click it again, it shows the button again but it's different, AND if I click the source button to view the source code again it displays this code:
<p> </p>
<p>newpage</p>
Now I don't know why CKEditor has automatically changed the link, but now the link won't work. And this is occurring a number of times, for example if I add a new link using the same plugin then the original 'newPage' link is automatically changed. If I have an image of set n x m width and height then load the CKEditor then the width and height are discarded and the image is set to it's default size. If a title is set to be in the center and the CKEditor is used to change the page this centering is defaulted to the normal left of the page.
Any advice would be appreciated,
Thank you
I have finally found a solution to this. The reason it took me so long is because links like this:
CKEditor classes being stripped
to the CKEditor website always say you turn CKEDITOR.config.allowedContent to 'true' and it only provides examples to trying to turn off individual plugins, but I needed to disable it over the entire system.
To disable Advanced Content Filtering throughout the entire CKEditor - in the config.js file insert the line:
config.allowedContent = true;
Hope this helps someone else.
Hey I have this textarea that makes the text into pdf when I press generate.
And now I want a qr code img to get added. The problem is the pdf can't detect it, but only make space for it.
Example if I add a img like:
<img src="http://upload.wikimedia.org/wikipedia/commons/b/b6/Image_created_with_a_mobile_phone.png"/>
it works.
But if I add something like
<img src="http://chart.apis.google.com/chart?chf=a,s,000000|bg,s,FFFFFF&chs=300x300&chld=M|4&cht=qr&chl=++++++++++++++++++++++++++++test%0A++++++++++++++++++++++&choe=UTF-8"/>
It wont work
Any ideas how I can make this work?
I think you should download it first into local disk, then you could write local address of that image in 'src='.
img src="http://localhost/blabla/image/chart.png"/>
Maybe its because your url isnt image, but php page. So pdf converter couldnt display it in to pdf.
While creating and learning bootstrap page. I came across the content attribute of css I read few articles and I got how it works. But following code snippet shows me an image icon but the content attribute value really isn't the image url but a code. I'm not clear as how we can show the image without the url and where is the image coming from?
.test.glass i:before {
content: "\e001";
}
Following is the html element to show an image icon using above css:
<span class="test glass"><i></i></span>
But what is "\e001" is that an image code or something else?
they are utf8 codes. there are plenty of sites describing the glyphs for different standard fonts but you can also define your own font set with whatever images you choose as whatever character.
if you use a webfont, from fontello for example but are plenty of sites like that one, you can define what image to use as character \e0001 and whenever you want to use that image, you must make sure you use that font-face for the element and use the utf8 code to display the image. in html it would be someting like <span class="iconfont"></span>. if you add the image with css then is like in your example.