How create characters emplacements in a HTML form? - html

Hello,I want to create a HTML form to create a pdf file.
My problem : I don't find how create the boxes for the characters emplacements (see the following screen shot of an exemple of a pdf file)
It's just | and _ or image or an existing html element ?
Thanks,
Thomas

These should be regular form input elements (most propably of type text) as they're going to be filled by the user.
They won't look the same as in this image though by default (they'll look better), you'll need to style them accordingly.

Related

Can Word automatically find the titles and apply the corresponding style to them?

I'm desperately trying to convert an html to word or pdf with updated table of contents with page numbers (initially an R-markdown doc -> html).
When opening my HTML to word, the 650 page (!) document does not display page numbers or table of contents, although the titles are saved as titles.
One suggested solution was that the document may have become corrupted during conversion. It was therefore necessary to copy / paste all the text on another document and save it.
Indeed, when I copy and paste the text leaving all styles, pagination is possible.
But I need to have my titles and create an automatic table of contents!
I have the list of titles at the beginning of the document, but they are not identified as titles by Word.
Could there be a way that Word automatically applies the Heading 1 style to all sentences starting with 1, 2, 3 etc; Heading 2 style to all sentences starting with 1.1, 1.2, 2.1, 2.3 etc. And so on?
Maybe a Macro ? (I don't know anything about VBA :( )
Thanks in advance!
You can easily do this without using any VBA code just by using Find and Replace, e.g.
If you don't know how to use wildcards see: https://wordmvp.com/FAQs/General/UsingWildcards.htm

Dynamically produce html based on templates

I am trying to automate a workflow for automatically creating HTML newsletters based on information stored in a spreadsheet.
Currently, I am using a newsletter drag and drop tool, in which several pre-programmed blocks are available (e.g. full column block, 2 column block etc). When creating a newsletter, I drag and drop a block and fill in my content (e.g. uploading an image, inserting a url). This is all well and good, however, since I have to create the same newsletter in 10 different languages, this process is quiet time consuming and prone to human error. While all newsletters are the same in terms of layout, the images and urls differ.
To solve this issue, I would like to get rid of the drag and drop process, and instead automate the workflow in some other way.
One idea that I have already tried, but that doesn't seem like the perfect option to me, is to dynamically create the needed HTMLs in Excel. Basically, the idea is to take the existing block template structure, and put it into Excel with some formulas.
I could then copy and paste the links to the images (in a simple format, such as EN1.jpg, ES1.jpg, etc.), as well as to urls (url.com, url.es).
This is some example block:
<img alt="" align="center" width="700" style="max-width:700px;" class="resetWidth" border="0" src="IMAGE" />
My final expected result is something like this:
I define the layout in a very quick manner (e.g. writing fullcolumn, half column, fullcolumn). The corresponding code is taken from the template. I then provide the attributes (image url, link url) in the form of a list or so. The end result should then be 10 html files that I simply have to upload to the newsletter software.
I would appreciate it very much if anyone had any ideas on this.
Another option for translating the page is to do something like this https://www.w3schools.com/howto/howto_google_translate.asp
it adds a selection for languages to translate into.
As for automating the images, you could set up folders for each langauge and reuse the name of images based on where you want them so they would be placed in the correct location.
All you'll have to do it replace the images with the same file names and swap the default language on the Google Translator.
So something like this that the html will stay the same with regards to the image names
For the link variables you may be able to write some JS or another language to take advantage of the
<html lang="">
and based on which lang is set, insert a set of links to the file.

Create custom templates using ckeditor, tinymce or any online editor

I am not sure if the title represents what exactly I need to do, But here is the details. I am building a website using PHP that allows people to create different templates, then they should select one of them and then fill the fields to fill the placeholders. For example consider the following image
The name of the recipient could be a placeholder so some part of the template can be
Dear {recipient}
{body}
and I prepare two fields for recipient and the body and it will be replaced by the value of the corresponding field. I can do this. What I can't do is how to let the user to align the placeholders in the paper. For example there is a placeholder for the date that must be at right of the page, or any other placeholder that can be place inside the paper (same as the following image). I would like to know if ckeditor or any other editor allows me to create such template?
The structure of the template must be kept in A4 or A5 print page.
I’m having trouble understanding your question. If you're looking for templates in TinyMCE editor, I think you should try using template plugin for tinymce - there is one for wordpress. You can write your own plugin too, there was question about it.

django-displaying data the way they are entered by the user

I have a models.py file where i have a textfield
models.py
class xyz(models.Models):
abc=models.TextField()
I am using html form to save the data for the abc field.
The problem is that if i enter the data in multiple lines in the form and try to display it, the whole matter is displayed in a single line.
So what is the error?
Is it in the models or what?
Thanks in advance.
The user enters a plain text, and than you are trying to show it as HTML. these are different formats.
There are a lot of possibilities, the simplest one is to let the user enter HTML and than everything will work as expected.
To do this, use some HTML editor like tinymce
Other solution is to use some markup formatting

How do I get table-like formatting in a textbox or textarea?

I'm using TinyMCE textareas or textboxes for an event logger app, and I need the text to be formatted a certain way. Something like this:
I can't figure out how to do this without a table, which I cannot nest in the textarea or textbox. Any suggestions?
You cannot -layout- content in a textbox or textarea. You want to either go for TinyMCE as an iframe (where layout is broken relatively easy), or create separate inputfields for dates and logs (and layout using html/css).
TinyMCE has a table plugin that you can use. Have you tried that?
Search for "tinymce table plugin". Your example seems to be a 3x2 table.
You may also want to look into the TinyMCE template plugin.
Like Jeff Yang mentioned, you can use tables to help your users lay out their content without CSS (it makes me cringe, but yes on CMS-driven sites with users of all types editing content, I still give them a table to save me headaches).
The template plugin will allow you to set up your own table, lock it in place, and then let the users select it from a dropdown. So, you could set up a table to your specifications above, name it "2-column with dates" or something, and train your users to select that when they needed it.
The plugin also has a preview option so your users can pick and choose exactly which template they need.