How to use the @ckeditor/ckeditor5-engine/src/view/containerelement function in @ckeditor/ckeditor5-engine

To help you get started, we’ve selected a few @ckeditor/ckeditor5-engine examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Tangerine-Community / Tangerine / client-v3 / ckeditor / plugins / ckeditor5-acasi / src / acasi.js View on Github external
.toElement( (element) => {
        console.log("data.modelToView form element: ")
        const id = element.item.getAttribute('id')
        const onchange = element.item.getAttribute('onchange')
        let container = new ViewContainerElement( 'form', {'id': id, 'onchange': onchange} );
        // let container = new ViewContainerElement( 'form', {'id': id} );
        return container
      })
    // Build converter from model element to view element is used to render the getData output for the widget when you create new Elements in the editor.
github Tangerine-Community / Tangerine / client-v3 / ckeditor / plugins / ckeditor5-acasi / src / acasi.js View on Github external
.toElement( (element) => {
        console.log("data.modelToView tangy-acasi element: ")
        const introSrc = element.item.getAttribute('intro-src')
        const name = element.item.getAttribute('name')
        // const name = 'test'
        let container = new ViewContainerElement( 'tangy-acasi', {'intro-src': introSrc, 'name': name} );
        return container
      })
    buildModelConverter().for( data.modelToView )
github Tangerine-Community / Tangerine / client-v3 / ckeditor / plugins / ckeditor5-acasi / src / acasi.js View on Github external
.toElement( (element) => {
        console.log("modelToView figure element")
        const klass = element.item.getAttribute('class')
        const container = new ViewContainerElement( 'figure', { class: klass } );
        // let container = new ViewContainerElement( 'figure', {'class': klass}, toImageWidget(new ViewEmptyElement( 'img' )) );
        // const widget = toWidget( container );
        // widget.setAttribute( 'contenteditable', true );
        return container;
      } );
github ckeditor / ckeditor5-image / tests / widget / widget.js View on Github external
.toElement( () => {
						const b = new AttributeContainer( 'b' );
						const div = new ViewContainer( 'div', null, b );

						return toWidget( div );
					} );
github ckeditor / ckeditor5-image / tests / widget / widgetengine.js View on Github external
.toElement( () => {
						const element = toWidget( new ViewContainer( 'div' ), { label: 'element label' } );

						return element;
					} );
github Tangerine-Community / Tangerine / client-v3 / ckeditor / plugins / ckeditor5-acasi / src / acasi.js View on Github external
.toElement( (element) => {
        console.log("modelToView form element")
        const formContainer = new ViewContainerElement( 'figure', { class: 'tangy-form' } );
        const formWdiget = toFormWidget( 'form', formContainer );
        formWdiget.setAttribute( 'contenteditable', true );
        return formWdiget;
      } );
github Tangerine-Community / Tangerine / client-v3 / ckeditor / plugins / ckeditor5-acasi / src / acasi.js View on Github external
.toElement( (element) => {
        console.log("modelToView tangy-acasi element")
        const widgetContainer = new ViewContainerElement( 'figure', { class: 'tangy-acasi' });
        const widget = toAcasiWidget( widgetContainer );
        widget.setAttribute( 'contenteditable', true );
        return widget;
      } );
github ckeditor / ckeditor5-image / src / conversionutils / modelconversionutils.js View on Github external
export function elementToElement( modelElementName, viewElement, options = {} ) {
	options = Object.assign({}, { priority: 'normal', insertAtStart: true }, options );
	viewElement = typeof viewElement == 'string' ? new ViewContainerElement( viewElement ) : viewElement;

	return dispatcher => {
		dispatcher.on( 'insert:' + modelElementName, insertElement( viewElement, options ), { priority: options.priority } );
	}
}
github ckeditor / ckeditor5-image / src / conversionutils / utils / elementtoelement.js View on Github external
export default function elementToElement( modelElementName, viewElement, options = {} ) {
	options = Object.assign( {}, { priority: 'normal', insertAtStart: true }, options );
	viewElement = typeof viewElement == 'string' ? new ViewContainerElement( viewElement ) : viewElement;

	return dispatcher => {
		dispatcher.on( 'insert:' + modelElementName, insertElement( viewElement, options ), { priority: options.priority } );
	};
}