Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!doctype html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
- <meta name="description" content="">
- <meta name="author" content="Mark Otto, Jacob Thornton, and Bootstrap contributors">
- <meta name="generator" content="Hugo 0.80.0">
- <title>Administración Blog</title>
- </head>
- <body>
- <div class="container-fluid">
- <div class="row">
- <main role="main" class="col-md-9 ml-sm-auto col-lg-10 px-md-4">
- <div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom">
- <h1 class="h2">Crear Entrada</h1>
- </div>
- <div class="table-responsive">
- <form>
- <div class="form-group">
- <label for="titulo" class="negritatxt">Titulo</label>
- <input type="text" class="form-control" id="titulo" name="titulo" aria-describedby="tituloHelp" required>
- </div>
- <div class="form-group">
- <label for="contenido" class="negritatxt">Contenido</label>
- <textarea class="form-control" id="contenido" rows="3" required></textarea>
- </div>
- <div class="form-group">
- <label for="imgdestacada"class="negritatxt">Imagen Destacada</label>
- <div class="custom-file">
- <input type="file" class="custom-file-input" id="imgdestacada">
- <label class="custom-file-label" for="imgdestacada">Selecciona un Archivo</label>
- </div>
- </div>
- <div class="form-group">
- <label for="slug" class="negritatxt">Slug</label>
- <input type="text" class="form-control" id="slug" name="slug" aria-describedby="tituloHelp" readonly>
- </div>
- <button type="submit" class="btn btn-primary">Aceptar</button>
- </form>
- </div>
- </main>
- </div>
- </div>
- <script src="https://cdn.tiny.cloud/1/t2537jv6fs00yo0ry56l6ry7mb53wmv1bydm5ruxsslormaa/tinymce/6/tinymce.min.js" referrerpolicy="origin"></script>
- <script>
- tinymce.init({
- selector: 'textarea#contenido',
- plugins: 'a11ychecker advcode casechange export formatpainter image editimage linkchecker autolink lists checklist media mediaembed pageembed permanentpen powerpaste table advtable tableofcontents tinycomments tinymcespellchecker image code',
- toolbar: 'a11ycheck addcomment showcomments casechange checklist code export formatpainter link image editimage pageembed permanentpen table tableofcontents',
- toolbar_mode: 'floating',
- tinycomments_mode: 'embedded',
- tinycomments_author: 'Author name',
- /* enable title field in the Image dialog*/
- image_title: true,
- /* enable automatic uploads of images represented by blob or data URIs*/
- automatic_uploads: true,
- file_picker_types: 'image',
- /* and here's our custom image picker*/
- file_picker_callback: (cb, value, meta) => {
- const input = document.createElement('input');
- input.setAttribute('type', 'file');
- input.setAttribute('accept', 'image/*');
- input.addEventListener('change', (e) => {
- const file = e.target.files[0];
- const reader = new FileReader();
- reader.addEventListener('load', () => {
- /*
- Note: Now we need to register the blob in TinyMCEs image blob
- registry. In the next release this part hopefully won't be
- necessary, as we are looking to handle it internally.
- */
- const id = 'blobid' + (new Date()).getTime();
- const blobCache = tinymce.activeEditor.editorUpload.blobCache;
- const base64 = reader.result.split(',')[1];
- const blobInfo = blobCache.create(id, file, base64);
- blobCache.add(blobInfo);
- /* call the callback and populate the Title field with the file name */
- cb(blobInfo.blobUri(), { title: file.name });
- });
- reader.readAsDataURL(file);
- });
- input.click();
- },
- content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:16px }'
- });
- </script>
- </body>
- </html>
Add Comment
Please, Sign In to add comment