<script src="../class/ckeditor5/build/ckeditor.js"></script>
<script>ClassicEditor
.create( document.querySelector( '#editor' ), {
toolbar: {
items: [
'heading',
'|',
'bold',
'italic',
'link',
'bulletedList',
'numberedList',
'|',
'indent',
'outdent',
'|',
'blockQuote',
'insertTable',
'undo',
'redo',
'fontBackgroundColor',
'fontColor',
'fontSize',
'fontFamily',
'highlight',
'horizontalLine'
]
},
language: 'zh',
table: {
contentToolbar: [
'tableColumn',
'tableRow',
'mergeTableCells'
]
},
licenseKey: '',
} )
.then( editor => {
window.editor = editor;
} )
.catch( error => {
console.error( 'Oops, something gone wrong!' );
console.error( 'Please, report the following error in the https://github.com/ckeditor/ckeditor5 with the build id and the error stack trace:' );
console.warn( 'Build id: dygf44s5ml6x-yvi4tsrqc2ex' );
console.error( error );
} )
;
</script>
<style>
.ck-editor__editable {
min-height: 8rem;
}
</style>
<textarea id="editor" class="form-control" name="directions" >{$content.directions}</textarea>
find_one()
function find_one($sn = "")
{
global $db;
/****省略***/
/**********註記以下********/
//$data['directions'] = htmlspecialchars($data['directions'], ENT_QUOTES);
}
<div class="row">
<label class="col-sm-3 text-right">
描述
</label>
<div class="col-sm-9">
{$content.directions}
</div>
</div>