When copy paste data from ms word the indent format is not retained I am using Tinymce 4.0.19
Related
Even though I've set the parameter paste_enable_default_filters = false, seems like there is a bug in TinyMCE editor or I'm missing something. It actually keeps most of the text format when I paste a text from an external document.
However, I've a text in a Word document; it's in Times New Roman format. But when I copy-paste it into the editor, it only paste 1 line as Times New Roman, the rest is has been formatted to the default font family.
Why is this happening, why it only paste 1 line as in Times New Roman format while the rest is also in Times New Roman format? I'm open to any ideas.
I want to use the tinymce editor for visualizing special chars like a paragraph like this: ¶
It should only visualize it. The value of the input should contain only plain text.
Is there a setup param to force tinymce to work in plain text mode?
You can retrieve content from the TinyMCE editor as HTML or plaintext. To retrieve the content as plaintext specify format: 'text' when you get the content. For example:
// Get the contents of the currently active editor as plain text
tinymce.activeEditor.getContent({format: 'text'});
For more information about getContent, see: https://www.tiny.cloud/docs/api/tinymce/tinymce.editor/#getcontent.
I'm trying to paste content from a word doc into a tinymce instance. The content contains the § (paragraph) character, but TinyMce changes it into an li tag.
Is there a way to config TinyMce to allow special characters like §?
What you are seeing is behavior around the Paste plugin when a sentence starts with that character.
When it starts with that character the Paste plugin treats that like a list element. If the character is anywhere other than the first character TinyMCE does not create a list element.
The best thing to do is to open a bug report on the issue tracker for TinyMCE so the developers are aware of this issue.
https://github.com/tinymce/tinymce/issues
I am exporting an org document to odt using org-odt-export-to-odt (Org-mode version 8.2.6 and emacs 23) and I would like the first page to get the OrgFirstPage style and the following pages to get the OrgPage style.
I tried using a custom style file created by exporting an empty org file to odt and modifying it with LibreOffice so that the first page has the OrgFirstPage style and the second one has the OrgPage style. I referenced it in my org file with #+ODT_STYLES_FILE: but all pages in the exported document have the Standard style.
I'm sure my exported odt file uses my custom style file because I also added a header to the standard page style and I see it in the exported odt file.
Is there a way to set the page style in the org file?
This seems very hard to do.
I'm pasting html code with <pre> into tinymce editor.
All the whitespaces are gone inside the <pre>
e.g. I'm trying to copy StackOverflow's <pre><code>block as in
def foo():
help me
It seems, tinymce trims whitespaces in <pre><code><span> and newlines are removed
How can I preserve it?
I'm using 3.5.3 btw
First of all you should set the entity encoding setting to raw
tinymce.init({
...
entity_encoding: "raw",
...´
But TinyMCE adds <br /> elements on line breaks if you edit your text. Here is a setup for syntay highlighting and preformatted text in NopCommerce, it is almost the same in WordPress or whatever.
TinyMCE Preformatted Text and Syntax Highlighting