hudozka app added edit from 2018.02
This commit is contained in:
1 parent
6805e07434
commit
759f1217b5
57 files changed
+3630
-1247
No files matched your search
@@ -0,0 +1,44 @@
|
||||
import Token from './Token'
|
||||
import {trim} from '../fn'
|
||||
import {getHtml} from './index'
|
||||
|
||||
export default class TextToken extends Token {
|
||||
static test(data) {
|
||||
return true
|
||||
}
|
||||
|
||||
constructor(options) {
|
||||
super({
|
||||
...options,
|
||||
name: 'text',
|
||||
})
|
||||
}
|
||||
|
||||
merge(token) {
|
||||
const data = [this.data, token.data].join('\n')
|
||||
|
||||
return new TextToken(this.getMergeOptions({
|
||||
data: trim(data),
|
||||
}))
|
||||
}
|
||||
|
||||
async getData() {
|
||||
const html = getHtml(this.data)
|
||||
return {html}
|
||||
}
|
||||
|
||||
// async compile() {
|
||||
// // return getHtml(this.getData())
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
// return (
|
||||
// <div
|
||||
// className='MarkerWidgetHtml'
|
||||
// dangerouslySetInnerHTML={{__html: html}}
|
||||
// />
|
||||
// )
|
||||
// }
|
||||
}
|
||||
Reference in new issue
Block a user