How to have the same font for text that is copied from a text box to a text box

I have a text area in my web application. My users can copy text from the keyboard and paste it into textarea.

They want the same text font of the wordpad document to appear in the text box. How can we achieve this?

+6
source share
2 answers

You can save some formatting using a rich text editor such as tinyMCE ( http://www.tinymce.com/ ). But you are pretty much limited to sans-serif (arial-like) and serifs (at times) when it comes to fonts. If you are not using webfonts. But even with websites, you are limited to the fonts you define, and since websites often have slightly different names than desktop fonts (e.g. Meta MT becomes Meta Web), you will not get the correct font when pasting from WordPad

+1
source

I don’t think you can have the font automatically in the text area. You can give them a WYSIWYG editor that has access to fonts, and then you have to upload the entire WordPress font to your server (even if it’s legal, you will need to check EULA on WordPad), then I believe that you should create a link to the font in the dll or on this page. Here's a link that talks about using fonts.

http://randsco.com/index.php/2009/07/04/p680

This is actually more of a headache than you want to deal with.

0
source

Source: https://habr.com/ru/post/897439/


All Articles