mirror of
https://github.com/ash-project/ash_admin.git
synced 2024-09-19 21:03:52 +12:00
feat: add markdown attributes
This commit is contained in:
parent
e2bd5f3d5f
commit
ce1e0aef20
2 changed files with 5 additions and 28 deletions
|
@ -77,9 +77,10 @@ Hooks.JsonView = {
|
|||
}
|
||||
}
|
||||
|
||||
const init = (element, initialValue) => new EasyMDE({
|
||||
const init = (element) => new EasyMDE({
|
||||
element: element,
|
||||
forceSync: true
|
||||
forceSync: true,
|
||||
initialValue: element.getAttribute("value")
|
||||
})
|
||||
|
||||
Hooks.MarkdownEditor = {
|
||||
|
@ -87,32 +88,8 @@ Hooks.MarkdownEditor = {
|
|||
const id = this.el.getAttribute("data-target-id")
|
||||
const el = document.getElementById(id)
|
||||
init(el)
|
||||
},
|
||||
// updated(){
|
||||
// console.log(this.el.value)
|
||||
// const textArea = init(this.el, this.el.value);
|
||||
// // textArea.codemirror.on("change", ( ) => {
|
||||
// // console.log(textArea.value())
|
||||
// // // this.pushEventTo(this.el, "")
|
||||
// // })
|
||||
|
||||
// // init(document.getElementById(inputId));
|
||||
|
||||
// // textArea.codemirror.on("change", ( ) => {
|
||||
// // this.pushEventTo(
|
||||
// // this.el,
|
||||
// // "handle_clientside_richtext",
|
||||
// // {richtext_data: textArea.value()}
|
||||
// // );
|
||||
// // this.handleEvent(
|
||||
// // "richtext_event",
|
||||
// // (richtext_data) => textArea.value(richtext_data)
|
||||
// // )
|
||||
// // })
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Hooks.Actor = {
|
||||
mounted() {
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue